source: rtems-libbsd/libbsd.txt @ e10d1cd

4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since e10d1cd was e10d1cd, checked in by Sebastian Huber <sebastian.huber@…>, on 12/13/13 at 09:57:03

BPF(4): Add support

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