source: rtems-libbsd/libbsd.txt @ 69b29a0

4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since 69b29a0 was 69b29a0, checked in by Sebastian Huber <sebastian.huber@…>, on 10/10/13 at 14:11:02

Disable user credentials and use default values

  • Property mode set to 100644
File size: 25.1 KB
Line 
1RTEMS BSD USB and TCP/IP Developers Guide
2=========================================
3Joel Sherrill <joel.sherrill@oarcorp.com>
4:Author Initials: JRS
5:toc:
6:icons:
7:numbered:
8:website: http://www.rtems.org/
9
10RTEMS uses FreeBSD as the source of its TCP/IP and USB stacks.
11This is a developers guide which captures information on the
12process of merging code from FreeBSD, building this library,
13RTEMS specific support files, and general guidelines on what
14modifications to the FreeBSD source are permitted.
15
16Goals of this effort are:
17
18* Update TCP/IP and provide USB in RTEMS
19* Ease updating to future FreeBSD versions
20* Ease tracking changes in FreeBSD code
21* Minimize manual changes in FreeBSD code
22* Define stable kernel/device driver API which is implemented
23by both RTEMS and FreeBSD. This is the foundation of the port.
24
25We will work to push our changes upstream to the FreeBSD Project
26and minimize changes required at each update point.
27
28**************************************************************
29This is a work in progress and is very likely to be incomplete.
30Please help by adding to it.
31**************************************************************
32
33== Source Code Version Information
34
35* FreeBSD 8.2 SVN r255967
36* RTEMS 4.11
37  - BSP must have support for all new BSD sys sections
38  - It is preferable if the BSP uses linkcmds.base.
39  - BSP must be from an architecture with Programmable Interrupt Controller
40    interrupt model.
41
42The latest port uses the FreeBSD sources as a Git submodule which will
43generally be referred to as the FreeBSD source in this document.  Previously a
44FreeBSD 8.2 SVN checkout was used.  The SVN checkout command corresponding to
45the current Git submodule commit is this
46  svn co http://svn.freebsd.org/base/releng/8.2 -r255967 freebsd-8.2
47
48== Issues and To Do
49* Per-CPU data should be enabled once the new stack is ready for SMP.
50
51* Per-CPU NETISR(9) should be enabled onece the new stack is ready for SMP.
52
53* Multiple routing tables are not supported.  Every FIB value is set to zero
54  (= BSD_DEFAULT_FIB).
55
56* Process identifiers are not supported.  Every PID value is set to zero
57  (= BSD_DEFAULT_PID).
58
59* User credentials are not supported.  The following functions allow the
60  operation for everyone
61  - prison_equal_ip4(),
62  - chgsbsize(),
63  - cr_cansee(),
64  - cr_canseesocket() and
65  - cr_canseeinpcb().
66
67* Sebastian Huber and Joel Sherrill discussed the need for a a basic USB
68  functionality test that is known to work on qemu pc.
69
70* Adapt generic IRQ PIC interface code to Simple Vectored Interrupt Model
71  so that those architectures can use new TCP/IP and USB code.
72
73* freebsd-userspace/rtems/include/sys/syslog.h is a copy from the old
74  RTEMS TCP/IP stack. For some reason, the __printflike markers do not
75  compile in this environment. We may want to use the FreeBSD syslog.h
76  and get this addressed.
77
78* in_cksum implementations for architectures not supported by FreeBSD.
79  This will require figuring out where to put implementations that do
80  not originate from FreeBSD and are populated via the script.
81
82* linker section issues: I have undefined symbols for
83  `_bsd__start_set_sysinit_set` and `_bsd__stop_set_sysinit_set`.
84  Is this the only type of new section magic?  What about the old sysctl_set?
85  I added this to my linkcmds. 
86
87[listing]
88----
89    /* sysinit section? */
90    . = ALIGN (16);
91    _bsd__start_set_sysinit_set = .;
92    *(set_sys_init_*);
93    _bsd__stop_set_sysinit_set = .;
94
95----
96
97* Why is the interrupt server used?  The BSD interrupt handlers can block on
98synchronization primitives like mutexes.  This is in contrast to RTEMS
99interrupt service routines.  The BSPs using the generic interrupt support must
100implement the `bsp_interrupt_vector_enable()` and
101`bsp_interrupt_vector_disable()` routines.  They normally enable/disable a
102particular interrupt source at the interrupt controller.  This can be used to
103implement the interrupt server.  The interrupt server is a task that wakes-up
104in case an associated interrupt happens.  The interrupt source is disabled in
105a generic interrupt handler that wakes-up the interrupt server task.   Once the
106postponed interrupt processing is performed in the interrupt server the
107interrupt source is enabled again.
108
109* Convert all BSP linkcmds to use a linkcmds.base so the sections are
110easier to insert.
111
112* rtems-bsd-init-with-irq.c:
113  rtems_bsd_initialize_with_interrupt_server() has reference to
114    rtems_interrupt_server_initialize() and this method is unimplemented
115    - XXX BSP implements pieces
116    - BSPs using this software stack must support it apparently.
117    - What about Simple Vectored architectures?
118
119* We carried over use of notepad 0 for per task information. This should
120be changed.
121
122* maxproc variable referenced by rtems-bsd-resource.c.  What should it
123be set to?
124
125* ngroups_max variable referenced by rtems-bsd-prot.c.  - What should
126it be set to?
127
128* NIC Device Drivers
129- Only common PCI NIC drivers have been included in the initial set. These
130do not include any system on chip or ISA drivers.
131- PCI configuration probe does not appear to happen to determine if a
132NIC is in I/O or memory space. We have worked around this by using a
133static hint to tell the fxp driver the correct mode. But this needs to
134be addressed.
135- The ISA drivers require more BSD infrastructure to be addressed. This was
136outside the scope of the initial porting effort.
137
138== FreeBSD Source
139
140You should be able to rely on FreebSD manual pages and documentation
141for details on the code itself.
142
143=== Automatically Generated FreeBSD Files
144
145The FreeBSD source tarball includes a file named Makefile.rtems which
146has stanzas to automatically generate some files using awk. For details
147on this, see http://www.freebsd.org/cgi/man.cgi?query=kobj&apropos=0&sektion=0&manpath=FreeBSD+9.0-RELEASE&arch=default&format=html
148
149XXX This needs more detail.
150
151=== Rules for Modifying FreeBSD Source
152
153* Only add lines.  Subtract code by added "ifndef __rtems__". This makes
154merging easier in the future.
155
156== libbsd Source
157
158=== What is in git
159
160The git source is a self-contained kit with FreeBSD and RTEMS components
161pre-merged. The Makefile in this kit is automatically generated.
162
163Any changes to sources in the freebsd or contrib directories will need to
164be merged upstream into our master FreeBSD svn checkout.
165
166The FreeBSD sources managed in the rtems-libbsd git repository (e.g. contrib
167and freebsd directories) contain the "managed" version of the
168FreeBSD source.  The FreeBSD SVN source is the "master" version. The
169freebsd-to-rtems.py script is used to transfer files between the two
170trees. In general terms, if you have modified FreeBSD (i.e. anything in the
171freebsd directory) in the rtems-libbsd tree, you will need to run the script
172in "revert" or "reverse" mode using the -R switch. This will copy the source
173back to your local copy of the FreeBSD source so you can run "svn diff" against
174the upstream FreeBSD source. If you want to transfer source files from the
175FreeBSD SVN checkout to the rtems-libbsd tree, then you must run the script in
176"forward" mode (the default).
177
178=== Building rtems-libbsd source
179
180You need to configure RTEMS for the desired BSP and install it. The
181following is the script used to build the powerpc/psim BSP for our
182internal testing purposes:
183
184[listing]
185----
186#! /bin/sh
187
188cd ${HOME}/newbsd
189rm -rf b-psim
190mkdir b-psim
191cd b-psim
192../git/rtems/configure --target=powerpc-rtems4.11 \
193  --enable-rtemsbsp=psim --disable-networking \
194  --enable-tests=samples \
195  --prefix=${HOME}/newbsd/bsp-install >c.log 2>&1 && \
196  make >b.log 2>&1 && \
197  make install >i.log 2>&1
198echo $?
199----
200
201Then edit the file config.inc to set RTEMS_MAKEFILE_PATH appropriately
202to indicate the ${prefix}/${target}/${BSP}.  Continuing on the above,
203the config.inc used to match the above is:
204
205[listing]
206----
207RTEMS_MAKEFILE_PATH = ${HOME}/newbsd/bsp-install/powerpc-rtems4.11/psim/
208INSTALL_BASE = ${HOME}/newbsd/install
209----
210
211The above installs the rtems-libbsd kit into a separate place from
212RTEMS and the BSP. The rtems-libbsd tests are built against an installed
213image of the rtems-libbsd. By keeping it in a separate installation point
214from RTEMS itself, this makes it easier to remove a libbsd installation
215and have a clean test point.
216
217[listing]
218----
219make
220make install
221make -C testsuite
222----
223
224At this point, we expect multiple linker errors. That is what we are
225currently working on.
226
227=== Organization
228
229The top level directory contains a few directories and files. The following
230are important to understand:
231
232* freebsd-to-rtems.py - script to convert to and free FreeBSD and RTEMS trees
233* Makefile - automatically generated
234* contrib/ - from FreeBSD by script.
235* freebsd/ - from FreeBSD by script.
236* rtemsbsd/ - RTEMS specific implementations of FreeBSD kernel support routines.
237* testsuite/ - RTEMS specific tests
238* libbsd.txt - Documentation in Asciidoc
239
240== Moving Code Between FreeBSD SVN and rtems-libbsd
241
242The script freebsd-to-rtems.py is used to copy code from FreeBSD to the
243rtems-libbsd tree and to reverse this process. This script attempts to
244automate this process as much as possible and performs some transformations
245on the FreeBSD code. Its command line arguments are shown below:
246
247[listing]
248----
249freebsd-to-rtems.py [args]
250  -?|-h|--help     print this and exit
251  -d|--dry-run     run program but no modifications
252  -D|--diff        provide diff of files between trees
253  -e|--early-exit  evaluate arguments, print results, and exit
254  -m|--makefile    just generate Makefile
255  -R|--reverse     default FreeBSD -> RTEMS, reverse that
256  -r|--rtems       RTEMS directory
257  -f|--freebsd     FreeBSD directory
258  -v|--verbose     enable verbose output mode
259----
260
261In its default mode of operation, freebsd-to-rtems.py is used to copy code
262from FreeBSD to the rtems-libbsd tree and perform transformations.  In forward
263mode, the script may be requested to just generate the Makefile.
264
265In "reverse mode", this script undoes those transformations and copies
266the source code back to the FreeBSD SVN tree. This allows us to do
267'svn diff', evaluate changes made by the RTEMS Project, and report changes
268back to FreeBSD upstream.
269
270In either mode, the script may be asked to perform a dry-run or be verbose.
271Also, in either mode, the script is also smart enough to avoid copying over
272files which have not changed. This means that the timestamps of files are
273not changed unless the contents change. The script will also report the
274number of files which changed. In verbose mode, the script will print
275the name of the files which are changed.
276
277The following is an example forward run with no changes.
278
279[listing]
280----
281$ ~/newbsd/git/libbsd-8.2/freebsd-to-rtems.py \
282    -r /home/joel/newbsd/git/libbsd-8.2 \
283    -f /home/joel/newbsd/libbsd/freebsd-8.2 -v
284Verbose:                yes
285Dry Run:                no
286Only Generate Makefile: no
287RTEMS Directory:        /home/joel/newbsd/git/libbsd-8.2
288FreeBSD Directory:      /home/joel/newbsd/libbsd/freebsd-8.2
289Direction:              forward
290Generating into /home/joel/newbsd/git/libbsd-8.2
2910 files were changed.
292----
293
294The script may also be used to generate a diff in either forward or reverse
295direction.
296
297== Initialization of rtems-libbsd
298
299The initialization of the rtems-libbsd is based on the FreeBSD SYSINIT(9)
300infrastructure.  The key to initializing a system is to ensure that the desired
301device drivers are explicitly pulled into the linked application.  This plus
302linking against the libbsd library will pull in the necessary FreeBSD
303infrastructure.
304
305The FreeBSD kernel is not a library like the RTEMS kernel.  It is a bunch of
306object files linked together.  If we have a library, then creating the
307executable is simple.  We begin with a start symbol and recursively resolve all
308references.  With a bunch of object files linked together we need a different
309mechanism.  Most object files don't know each other.  Lets say we have a driver
310module.  The rest of the system has no references to this driver module.  The
311driver module needs a way to tell the rest of the system: Hey, kernel I am
312here, please use my services!
313
314This registration of independent components is performed by SYSINIT(9) and
315specializations:
316
317http://www.freebsd.org/cgi/man.cgi?query=SYSINIT
318
319The SYSINIT(9) uses some global data structures that are placed in a certain
320section.  In the linker command file we need this:
321
322[listing]
323----
324.robsdsets : {
325    _bsd__start_set_modmetadata_set = .;
326    *(_bsd_set_modmetadata_set);
327    _bsd__stop_set_modmetadata_set = .;
328    _bsd__start_set_sysctl_set = .;
329    *(_bsd_set_sysctl_set);
330    _bsd__stop_set_sysctl_set = .;
331} > REGION_RODATA AT > REGION_RODATA_LOAD
332
333.rwbsdsets : {
334    _bsd__start_set_sysinit_set = .;
335    *(_bsd_set_sysinit_set);
336    _bsd__stop_set_sysinit_set = .;
337} > REGION_DATA AT > REGION_DATA_LOAD
338----
339
340Here you can see, that these global data structures are collected into
341continuous memory areas.  This memory area can be identified by start and stop
342symbols.  This constructs a table of uniform items.
343
344The low level FreeBSD code calls at some time during the initialization the
345mi_startup() function (machine independent startup).  This function will sort
346the SYSINIT(9) set and call handler functions which perform further
347initialization.  The last step is the scheduler invocation.
348
349The SYSINIT(9) routines are run in mi_startup() which is called by
350rtems_bsd_initialize().
351
352This is also explained in "The Design and Implementation of the FreeBSD
353Operating System" section 14.3 "Kernel Initialization".
354
355In RTEMS we have a library and not a bunch of object files.  Thus we need a way
356to pull-in the desired services out of the libbsd.  Here the
357"rtems-bsd-sysinit.h" comes into play.  The SYSINIT(9) macros have been
358modified and extended for RTEMS in "sys/kernel.h":
359
360[listing]
361----
362#ifndef __rtems__
363#define    C_SYSINIT(uniquifier, subsystem, order, func, ident) \
364    static struct sysinit uniquifier ## _sys_init = { \
365        subsystem, \
366        order, \
367        func, \
368        (ident) \
369    }; \
370    DATA_SET(sysinit_set,uniquifier ## _sys_init)
371#else /* __rtems__ */
372#define    SYSINIT_ENTRY_NAME(uniquifier) \
373    _bsd_ ## uniquifier ## _sys_init
374#define    SYSINIT_REFERENCE_NAME(uniquifier) \
375    _bsd_ ## uniquifier ## _sys_init_ref
376#define    C_SYSINIT(uniquifier, subsystem, order, func, ident) \
377    struct sysinit SYSINIT_ENTRY_NAME(uniquifier) = { \
378        subsystem, \
379        order, \
380        func, \
381        (ident) \
382    }; \
383    DATA_SET(sysinit_set,SYSINIT_ENTRY_NAME(uniquifier))
384#define    SYSINIT_REFERENCE(uniquifier) \
385    extern struct sysinit SYSINIT_ENTRY_NAME(uniquifier); \
386    static struct sysinit const * const \
387    SYSINIT_REFERENCE_NAME(uniquifier) __used \
388    = &SYSINIT_ENTRY_NAME(uniquifier)
389#define    SYSINIT_MODULE_REFERENCE(mod) \
390    SYSINIT_REFERENCE(mod ## module)
391#define    SYSINIT_DRIVER_REFERENCE(driver, bus) \
392    SYSINIT_MODULE_REFERENCE(driver ## _ ## bus)
393#endif /* __rtems__ */
394----
395
396Here you see that the SYSINIT(9) entries are no longer static.  The
397*_REFERENCE() macros will create references to the corresponding modules which
398are later resolved by the linker.  The application has to provide an object
399file with references to all required FreeBSD modules.
400
401The FreeBSD device model is quite elaborated (with follow-ups):
402
403http://www.freebsd.org/cgi/man.cgi?query=driver
404
405The devices form a tree with the Nexus device at a high-level.  This Nexus
406device is architecture specific in FreeBSD.  In RTEMS we have our own Nexus
407device, see "rtems-bsd-nexus.c".  It uses a table to add child devices:
408
409[listing]
410----
411const char *const _bsd_nexus_devices [] = {
412    #ifdef NEED_USB_OHCI
413        "ohci",
414    #endif
415    #ifdef NEED_USB_EHCI
416        "ehci",
417    #endif
418    #ifdef NEED_SDHC
419        "sdhci",
420    #endif
421    NULL
422};
423----
424
425This table must be provided by the application.
426
427=== SYSCTL_NODE Example
428
429During development, we had an undefined reference to
430_bsd_sysctl__net_children that we had trouble tracking down. Thanks to
431Chris Johns, we located it. He explained how to read SYSCTL_NODE
432definitions. This line from freebsd/netinet/in_proto.c is attempting
433to add the "inet" node to the parent node "_net".
434
435[listing]
436----
437SYSCTL_NODE(_net,      PF_INET,         inet,   CTLFLAG_RW, 0,
438        "Internet Family");
439----
440
441Our problem was that we could not find where _bsd_sysctl__net_children
442was defined. Chris suggested that when in doubt compile with -save-temps
443and look at the preprocessed .i files. But he did not need that. He
444explained that this the symbol name _bsd_sysctl__net_children was
445automatically generated by a SYSCTL_NODE as follows:
446
447* _bsd_ - added by RTEMS modifications to SYSCTL_NODE macro
448* sysctl_ - boilerplace added by SYSCTL_NODE macro
449* "" - empty string for parent node
450* net - name of SYSCTL_NODE
451* children - added by SYSCTL macros
452 
453This was all generated by a support macro declaring the node as this:
454
455[listing]
456----
457struct sysctl_oid_list SYSCTL_NODE_CHILDREN(parent, name);
458----
459
460Given this information, we located this SYSCTL_NODE declaration in
461kern/kern_mib.c
462
463[listing]
464----
465SYSCTL_NODE(, CTL_KERN,   kern,   CTLFLAG_RW, 0,
466        "High kernel, proc, limits &c");
467----
468
469== Core FreeBSD APIs and RTEMS Replacements ==
470
471=== SX(9) (Shared/exclusive locks) ===
472
473http://www.freebsd.org/cgi/man.cgi?query=sx
474
475Binary semaphores (this neglects the ability to allow shared access).
476
477=== MUTEX(9) (Mutual exclusion) ===
478
479http://www.freebsd.org/cgi/man.cgi?query=mutex
480
481Binary semaphores (not recursive mutexes are not supported this way).
482
483=== RWLOCK(9) (Reader/writer lock) ===
484
485http://www.freebsd.org/cgi/man.cgi?query=rwlock
486
487POSIX r/w lock.
488
489=== RMLOCK(9) (Reader/writer lock optimized for mostly read access patterns) ===
490
491Note:  This object was implemented as a wrapper for RWLOCK in the rm_lock header file.
492
493http://www.freebsd.org/cgi/man.cgi?query=rmlock
494
495POSIX r/w lock.
496
497=== CONDVAR(9) (Condition variables) ===
498
499http://www.freebsd.org/cgi/man.cgi?query=condvar
500
501POSIX condition variables with modifications (hack).
502
503=== CALLOUT(9) (Timer functions) ===
504
505http://www.freebsd.org/cgi/man.cgi?query=callout
506
507Timer server.
508
509=== TASKQUEUE(9) (Asynchronous task execution) ===
510
511http://www.freebsd.org/cgi/man.cgi?query=taskqueue
512
513TBD.
514
515=== KTHREAD(9), KPROC(9) (Tasks) ===
516
517http://www.freebsd.org/cgi/man.cgi?query=kthread
518
519http://www.freebsd.org/cgi/man.cgi?query=kproc
520
521Tasks.
522
523=== ZONE(9) (Zone allocator) ===
524
525http://www.freebsd.org/cgi/man.cgi?query=zone
526
527TBD.
528
529=== devfs (Device file system) ===
530
531Dummy, IMFS or new implementation (currently dummy).
532
533=== psignal (Signals) ===
534
535TBD.  Seems to be not needed.
536
537=== poll, select ===
538
539TBD.  Seems to be not needed.
540
541=== RMAN(9) (Resource management) ===
542
543http://www.freebsd.org/cgi/man.cgi?query=rman
544
545TBD.  Seems to be not needed.
546
547=== DEVCLASS(9), DEVICE(9), DRIVER(9), MAKE_DEV(9) (Device management) ===
548
549http://www.freebsd.org/cgi/man.cgi?query=devclass
550
551http://www.freebsd.org/cgi/man.cgi?query=device
552
553http://www.freebsd.org/cgi/man.cgi?query=driver
554
555http://www.freebsd.org/cgi/man.cgi?query=make_dev
556
557Use FreeBSD implementation as far as possible.  FreeBSD has a nice API for
558dynamic device handling.  It may be interesting for RTEMS to use this API
559internally in the future.
560
561=== BUS_SPACE(9), BUS_DMA(9) (Bus and DMA access) ===
562
563http://www.freebsd.org/cgi/man.cgi?query=bus_space
564
565http://www.freebsd.org/cgi/man.cgi?query=bus_dma
566
567Likely BSP dependent.  A default implementation for memory mapped linear access
568is easy to provide.  The current heap implementation supports all properties
569demanded by bus_dma (including the boundary constraint).
570
571== RTEMS Replacements by File Description ==
572
573Note:  Files with a status of USB are used by the USB test and have at least
574been partially tested.  If they contain both USB and Nic, then they are used
575by both and MAY contain methods that have not been tested yet.  Files that
576are only used by the Nic test are the most suspect.
577
578[listing]
579----
580rtems-libbsd File:      rtems-bsd-assert.c
581FreeBSD File:           rtems-bsd-config.h redefines BSD_ASSERT.
582Description:            This file contains the support method rtems_bsd_assert_func().
583Status:                 USB, Nic
584
585rtems-libbsd File:      rtems-bsd-autoconf.c
586FreeBSD File:           FreeBSD has BSP specific autoconf.c
587Description:            This file contains configuration methods that are used to setup the system.
588Status:                 USB
589
590rtems-libbsd File:      rtems-bsd-bus-dma.c
591FreeBSD File:           FreeBSD has BSP specific busdma_machdep.c
592Description:           
593Status:                 USB, Nic
594
595rtems-libbsd File:      rtems-bsd-bus-dma-mbuf.c       
596FreeBSD File:           FreeBSD has BSP specific busdma_machdep.c
597Description:           
598Status:                 Nic
599
600rtems-libbsd File:      rtems-bsd-callout.c             
601FreeBSD File:           kern/kern_timeout.c
602Description:           
603Status:                 USB, Nic
604
605rtems-libbsd File:      rtems-bsd-cam.c
606FreeBSD File:           cam/cam_sim.c
607Description:           
608Status:                 USB
609
610rtems-libbsd File:      rtems-bsd-condvar.c             
611FreeBSD File:           kern/kern_condvar.c
612Description:           
613Status:                 USB
614
615rtems-libbsd File:      rtems-bsd-copyinout.c
616FreeBSD File:           bsp specific copyinout.c )
617Description:            Note: The FreeBSD file is split with some methods being in rtems-bsd-support
618Status:                 Nic
619
620rtems-libbsd File:      rtems-bsd-delay.c
621FreeBSD File:           bsp specific file with multiple names
622Description:           
623Status:                 USB, Nic
624
625rtems-libbsd File:      rtems-bsd-descrip.c
626FreeBSD File:           kern/kern_descrip.c
627Description:           
628Status:                 Nic
629
630rtems-libbsd File:      rtems-bsd-generic.c             
631FreeBSD File:           kern/sys_generic.c
632Description:           
633Status:                 Nic
634
635rtems-libbsd File:      rtems-bsd-init.c
636FreeBSD File:           N/A
637Description:           
638Status:                 USB, Nic
639
640rtems-libbsd File:      rtems-bsd-init-with-irq.c
641FreeBSD File:           N/A
642Description:           
643Status:                 USB, Nic
644
645rtems-libbsd File:      rtems-bsd-jail.c
646FreeBSD File:           kern/kern_jail.c
647Description:           
648Status:                 USB, Nic
649
650rtems-libbsd File:      rtems-bsd-lock.c
651FreeBSD File:           kern/subr_lock.c
652Description:           
653Status:                 USB, Nic
654
655rtems-libbsd File:      rtems-bsd-log.c         
656FreeBSD File:           kern/subr_prf.c
657Description:           
658Status:                 Nic
659
660rtems-libbsd File:      rtems-bsd-malloc.c
661FreeBSD File:           kern/kern_malloc.c
662Description:           
663Status:                 USB, Nic
664
665rtems-libbsd File:      rtems-bsd-mutex.c
666FreeBSD File:           kern/kern_mutex.c
667Description:           
668Status:                 USB, Nic
669
670rtems-libbsd File:      rtems-bsd-newproc.c
671FreeBSD File:           N/A
672Description:           
673Status:                 Nic
674
675rtems-libbsd File:      rtems-bsd-nexus.c
676FreeBSD File:           bsp specific nexus.c
677Description:           
678Status:                 USB
679
680rtems-libbsd File:      rtems-bsd-panic.c               
681FreeBSD File:           boot/common/panic.c
682Description:           
683Status:                 USB, Nic
684
685rtems-libbsd File:      rtems-bsd-rwlock.c             
686FreeBSD File:           kern_rwlock.c
687Description:           
688Status:                 USB, Nic
689
690rtems-libbsd File:      rtems-bsd-shell.c               
691FreeBSD File:           N/A
692Description:           
693Status:                 USB
694
695rtems-libbsd File:      rtems-bsd-signal.c             
696FreeBSD File:           kern/kern_sig.c
697Description:           
698Status:                 Nic
699
700rtems-libbsd File:      rtems-bsd-smp.c                 
701FreeBSD File:           N/A
702Description:           
703Status:                 Nic
704
705rtems-libbsd File:      rtems-bsd-support.c             
706FreeBSD File:           bsp specific copyinout.c
707Description:            Note: the FreeBSD file is split with some methods being in rtems-bsd-copyinout.
708Status:                 USB, Nic
709
710rtems-libbsd File:      rtems-bsd-sx.c                 
711FreeBSD File:           kern/kern_sx.c
712Description:            Status: USB, Nic
713
714rtems-libbsd File:      rtems-bsd-synch.c               
715FreeBSD File:           kern/kern_synch.c
716Description:           
717Status:                 USB, Nic
718
719rtems-libbsd File:      rtems-bsd-syscalls.c           
720FreeBSD File:           User API for kern/uipc_syscalls.c
721Description:           
722Status:                 Nic
723
724rtems-libbsd File:      rtems-bsd-sysctlbyname.c       
725FreeBSD File:           User API for sysctlbyname(3)
726Description:           
727Status:
728
729rtems-libbsd File:      rtems-bsd-sysctl.c             
730FreeBSD File:           User API for sysctl(8)
731Description:           
732Status:
733
734rtems-libbsd File:      rtems-bsd-sysctlnametomib.c     
735FreeBSD File:           User API for sysctlnametomib
736Description:           
737Status:
738
739rtems-libbsd File:      rtems-bsd-taskqueue.c           
740FreeBSD File:           kern/subr_taskqueue.c
741Description:           
742Status:                 Nic
743
744rtems-libbsd File:      rtems-bsd-thread.c                     
745FreeBSD File:           kern/kern_kthread.c
746Description:           
747Status:                 USB, Nic
748
749rtems-libbsd File:      rtems-bsd-timeout.c             
750FreeBSD File:           kern/kern_timeout.c
751Description:           
752Status:                 Nic
753
754rtems-libbsd File:      rtems-bsd-timesupport.c         
755FreeBSD File:           kern/kern_clock.c
756Description:           
757Status:                 Nic
758
759rtems-libbsd File:      rtems-bsd-vm_glue.c             
760FreeBSD File:           vm/vm_glue.c
761Description:           
762Status:                 USB, Nic
763----
764
765== Notes by File ==
766
767altq_subr.c - Arbitrary choices were made in this file that RTEMS would
768not support tsc frequency change.  Additionally, the clock frequency
769for machclk_freq is always measured for RTEMS.
770
771conf.h - In order to add make_dev and destroy_dev, variables in the cdev
772structure that were not being used were conditionally compiled out. The
773capability of supporting children did not appear to be needed and was
774not implemented in the rtems version of these routines.
775 
776== NICs Status ==
777
778[listing]
779----
780Driver                  Symbol                          Status
781======                  ======                          ======
782RealTek                 _bsd_re_pcimodule_sys_init      Links
783EtherExpress            _bsd_fxp_pcimodule_sys_init     Links
784DEC tulip               _bsd_dc_pcimodule_sys_init      Links
785Broadcom BCM57xxx       _bsd_bce_pcimodule_sys_init     Links
786Broadcom BCM4401        _bsd_bfe_pcimodule_sys_init     Links
787Broadcom BCM570x        _bsd_bge_pcimodule_sys_init     Needs Symbols (A)
788E1000 IGB               _bsd_igb_pcimodule_sys_init     Links
789E1000 EM                _bsd_em_pcimodule_sys_init      Links
790----
791
792
793Symbols (A)
794         pci_get_vpd_ident
795 
796== Problems to report to FreeBSD ==
797
798The MMAP_NOT_AVAILABLE define is inverted on its usage.  When it is
799defined the mmap method is called. Additionally, it is not used
800thoroughly. It is not used in the unmap portion of the source.
801The file rec_open.c uses the define MMAP_NOT_AVAILABLE to wrap
802the call to mmap and file rec_close.c uses the munmap method.
803
804
805
Note: See TracBrowser for help on using the repository browser.