source: rtems-libbsd/libbsd.txt @ d652c3b

4.115-freebsd-12freebsd-9.3
Last change on this file since d652c3b was d652c3b, checked in by Sebastian Huber <sebastian.huber@…>, on Oct 9, 2013 at 12:03:56 PM

Avoid per-CPU NETISR(9)

SMP support should be enabled once the new stack is ready for this.

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