From 099b7eb535f725f9be3115238509e310bb59ccb0 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 23 May 2022 15:00:24 +0200 Subject: libbsd.txt: Move ported kernel features Remove obsolete file listing. --- CONTRIBUTING.rst | 23 +++++ libbsd.txt | 291 ------------------------------------------------------- 2 files changed, 23 insertions(+), 291 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 1113136c..c1268121 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -430,3 +430,26 @@ DHCPCD(8) client is a consumer of these events for example. Make sure that the interface flag ``IFF_UP`` and the interface driver flag ``IFF_DRV_RUNNING`` is set in case the link is up, otherwise ``ether_output()`` will return the error status ``ENETDOWN``. + +FreeBSD Kernel Features Ported to LibBSD +======================================== + +All lock based synchronization primitives are implemented through mutexes using +the priority inheritance protocol. + +* `BUS_DMA(9) `_: Bus and Machine Independent DMA Mapping Interface +* `BUS_SPACE(9) `_: Bus space manipulation functions +* `CALLOUT(9) `_: Execute a function after a specified length of time +* `CONDVAR(9) `_: Kernel condition variable +* `DEVICE(9) `_: An abstract representation of a device +* `DRIVER(9) `_: Structure describing a device driver +* `EPOCH(9) `_: Kernel epoch based reclamation +* `MUTEX(9) `_: Kernel synchronization primitives +* `RMAN(9) `_: Resource management functions +* `RMLOCK(9) `_: Kernel reader/writer lock optimized for read-mostly access patterns +* `RWLOCK(9) `_: Kernel reader/writer lock +* `SX(9) `_: Kernel shared/exclusive lock +* `SYSCTL(9) `_: Dynamic and static sysctl MIB creation functions +* `SYSINIT(9) `_: A framework for dynamic kernel initialization +* `TASKQUEUE(9) `_: Asynchronous task execution +* `UMA(9) `_: General-purpose kernel object allocator diff --git a/libbsd.txt b/libbsd.txt index fc748f24..cb8111bf 100644 --- a/libbsd.txt +++ b/libbsd.txt @@ -298,66 +298,6 @@ SYSCTL_NODE(, CTL_KERN, kern, CTLFLAG_RW, 0, "High kernel, proc, limits &c"); ---- -== Core FreeBSD APIs and RTEMS Replacements == - -=== SX(9) (Shared/exclusive locks) === - -http://www.freebsd.org/cgi/man.cgi?query=sx - -Binary semaphores (this neglects the ability to allow shared access). - -=== MUTEX(9) (Mutual exclusion) === - -http://www.freebsd.org/cgi/man.cgi?query=mutex - -Binary semaphores (not recursive mutexes are not supported this way). - -=== RWLOCK(9) (Reader/writer lock) === - -http://www.freebsd.org/cgi/man.cgi?query=rwlock - -POSIX r/w lock. - -=== RMLOCK(9) (Reader/writer lock optimized for mostly read access patterns) === - -Note: This object was implemented as a wrapper for RWLOCK in the rm_lock header file. - -http://www.freebsd.org/cgi/man.cgi?query=rmlock - -POSIX r/w lock. - -=== CONDVAR(9) (Condition variables) === - -http://www.freebsd.org/cgi/man.cgi?query=condvar - -POSIX condition variables with modifications (hack). - -=== CALLOUT(9) (Timer functions) === - -http://www.freebsd.org/cgi/man.cgi?query=callout - -Timer server. - -=== TASKQUEUE(9) (Asynchronous task execution) === - -http://www.freebsd.org/cgi/man.cgi?query=taskqueue - -TBD. - -=== KTHREAD(9), KPROC(9) (Tasks) === - -http://www.freebsd.org/cgi/man.cgi?query=kthread - -http://www.freebsd.org/cgi/man.cgi?query=kproc - -Tasks. - -=== ZONE(9) (Zone allocator) === - -http://www.freebsd.org/cgi/man.cgi?query=zone - -TBD. - === devfs (Device file system) === There is a minimal implementation based on IMFS. The mount point is fixed to @@ -370,237 +310,6 @@ for the device. TBD: remove empty paths on devfs_destroy(). -=== psignal (Signals) === - -TBD. Seems to be not needed. - -=== poll, select === - -TBD. Seems to be not needed. - -=== RMAN(9) (Resource management) === - -http://www.freebsd.org/cgi/man.cgi?query=rman - -TBD. Seems to be not needed. - -=== DEVCLASS(9), DEVICE(9), DRIVER(9), MAKE_DEV(9) (Device management) === - -http://www.freebsd.org/cgi/man.cgi?query=devclass - -http://www.freebsd.org/cgi/man.cgi?query=device - -http://www.freebsd.org/cgi/man.cgi?query=driver - -http://www.freebsd.org/cgi/man.cgi?query=make_dev - -Use FreeBSD implementation as far as possible. FreeBSD has a nice API for -dynamic device handling. It may be interesting for RTEMS to use this API -internally in the future. - -=== BUS_SPACE(9), BUS_DMA(9) (Bus and DMA access) === - -http://www.freebsd.org/cgi/man.cgi?query=bus_space - -http://www.freebsd.org/cgi/man.cgi?query=bus_dma - -Likely BSP dependent. A default implementation for memory mapped linear access -is easy to provide. The current heap implementation supports all properties -demanded by bus_dma (including the boundary constraint). - -== RTEMS Replacements by File Description == - -Note: Files with a status of USB are used by the USB test and have at least -been partially tested. If they contain both USB and Nic, then they are used -by both and MAY contain methods that have not been tested yet. Files that -are only used by the Nic test are the most suspect. - ----- -rtems-libbsd File: rtems-bsd-assert.c -FreeBSD File: rtems-bsd-config.h redefines BSD_ASSERT. -Description: This file contains the support method rtems_bsd_assert_func(). -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-autoconf.c -FreeBSD File: FreeBSD has BSP specific autoconf.c -Description: This file contains configuration methods that are used to setup the system. -Status: USB - -rtems-libbsd File: rtems-bsd-bus-dma.c -FreeBSD File: FreeBSD has BSP specific busdma_machdep.c -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-bus-dma-mbuf.c -FreeBSD File: FreeBSD has BSP specific busdma_machdep.c -Description: -Status: Nic - -rtems-libbsd File: rtems-bsd-callout.c -FreeBSD File: kern/kern_timeout.c -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-cam.c -FreeBSD File: cam/cam_sim.c -Description: -Status: USB - -rtems-libbsd File: rtems-bsd-condvar.c -FreeBSD File: kern/kern_condvar.c -Description: -Status: USB - -rtems-libbsd File: rtems-bsd-copyinout.c -FreeBSD File: bsp specific copyinout.c ) -Description: Note: The FreeBSD file is split with some methods being in rtems-bsd-support -Status: Nic - -rtems-libbsd File: rtems-bsd-delay.c -FreeBSD File: bsp specific file with multiple names -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-descrip.c -FreeBSD File: kern/kern_descrip.c -Description: -Status: Nic - -rtems-libbsd File: rtems-bsd-generic.c -FreeBSD File: kern/sys_generic.c -Description: -Status: Nic - -rtems-libbsd File: rtems-bsd-init.c -FreeBSD File: N/A -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-init-with-irq.c -FreeBSD File: N/A -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-jail.c -FreeBSD File: kern/kern_jail.c -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-lock.c -FreeBSD File: kern/subr_lock.c -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-log.c -FreeBSD File: kern/subr_prf.c -Description: -Status: Nic - -rtems-libbsd File: rtems-bsd-malloc.c -FreeBSD File: kern/kern_malloc.c -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-mutex.c -FreeBSD File: kern/kern_mutex.c -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-newproc.c -FreeBSD File: N/A -Description: -Status: Nic - -rtems-libbsd File: rtems-bsd-nexus.c -FreeBSD File: bsp specific nexus.c -Description: -Status: USB - -rtems-libbsd File: rtems-bsd-panic.c -FreeBSD File: boot/common/panic.c -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-rwlock.c -FreeBSD File: kern_rwlock.c -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-shell.c -FreeBSD File: N/A -Description: -Status: USB - -rtems-libbsd File: rtems-bsd-signal.c -FreeBSD File: kern/kern_sig.c -Description: -Status: Nic - -rtems-libbsd File: rtems-bsd-smp.c -FreeBSD File: N/A -Description: -Status: Nic - -rtems-libbsd File: rtems-bsd-support.c -FreeBSD File: bsp specific copyinout.c -Description: Note: the FreeBSD file is split with some methods being in rtems-bsd-copyinout. -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-sx.c -FreeBSD File: kern/kern_sx.c -Description: Status: USB, Nic - -rtems-libbsd File: rtems-bsd-synch.c -FreeBSD File: kern/kern_synch.c -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-syscalls.c -FreeBSD File: User API for kern/uipc_syscalls.c -Description: -Status: Nic - -rtems-libbsd File: rtems-bsd-sysctlbyname.c -FreeBSD File: User API for sysctlbyname(3) -Description: -Status: - -rtems-libbsd File: rtems-bsd-sysctl.c -FreeBSD File: User API for sysctl(8) -Description: -Status: - -rtems-libbsd File: rtems-bsd-sysctlnametomib.c -FreeBSD File: User API for sysctlnametomib -Description: -Status: - -rtems-libbsd File: rtems-bsd-taskqueue.c -FreeBSD File: kern/subr_taskqueue.c -Description: -Status: Nic - -rtems-libbsd File: rtems-bsd-thread.c -FreeBSD File: kern/kern_kthread.c -Description: -Status: USB, Nic - -rtems-libbsd File: rtems-bsd-timeout.c -FreeBSD File: kern/kern_timeout.c -Description: -Status: Nic - -rtems-libbsd File: rtems-bsd-timesupport.c -FreeBSD File: kern/kern_clock.c -Description: -Status: Nic - -rtems-libbsd File: rtems-bsd-vm_glue.c -FreeBSD File: vm/vm_glue.c -Description: -Status: USB, Nic ----- - == Notes by File == altq_subr.c - Arbitrary choices were made in this file that RTEMS would -- cgit v1.2.3