source: rtems-libbsd/libbsd.txt @ c99816e

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

Implement sysctl_handle_opaque()

FIXME: The snapshots are not reliable.

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