source: rtems-libbsd/libbsd.txt @ a9e26f5

4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since a9e26f5 was a9e26f5, checked in by Sebastian Huber <sebastian.huber@…>, on 10/28/13 at 15:42:55

TIMEOUT(9): Use timer server for callout_tick()

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