source: rtems-libbsd/libbsd.txt @ ea87228

4.115-freebsd-12freebsd-9.3
Last change on this file since ea87228 was ea87228, checked in by Sebastian Huber <sebastian.huber@…>, on Oct 28, 2013 at 9:45:22 AM

TASKQUEUE(9): Use FreeBSD implementation

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