1 .\" $NetBSD: intro.9,v 1.10 2009/03/11 13:52:49 joerg Exp $
3 .\" Copyright (c) 1997, 2007 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Jeremy Cooper, and Mindaugas Rasiukevicius.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE
22 .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
35 .Nd introduction to kernel internals
37 This section contains information related to the internal operation of the
39 It describes function interfaces and variables of use to the systems and device
42 In addition to the normal man page format, the kernel pages include an
44 .Bl -tag -width "CODE REFERENCES"
46 Contains the pathname(s) of the source file(s) which contain the definition
47 and/or source code of the variables or functions being documented.
50 Machine-dependent swap interface.
54 Introduction to kernel memory allocators.
56 .Xr memoryallocators 9 .
58 Machine-dependent portion of the virtual memory system.
62 Virtual memory system external interface.
66 Buffer cache interfaces.
74 Initiate I/O on raw devices.
78 I/O descriptor allocation interface.
82 Machine-dependent process exit.
86 Idle CPU while waiting for work.
90 Finish a fork operation.
94 Switch to another light weight process.
98 Current process and processor.
102 Set process uid and gid.
106 New processes and kernel threads.
111 Context switch notification.
113 .Xr cpu_need_resched 9 .
115 Process scheduling subsystem.
119 Software signal facilities.
123 Suspend the scheduler.
127 Return path to user-mode execution.
131 High-level file operations.
135 Convert an extended attribute namespace identifier to a string and
140 Operations on file entries.
144 In-kernel, file-system independent, file-meta data association.
148 File descriptor tables and operations.
152 File descriptor owner handling functions.
156 File system suspension helper subsystem.
160 Pathname lookup, cache and management.
166 Kernel interface to file systems.
170 Kernel representation of a file or directory and vnode attributes.
175 Kernel interfaces for manipulating output queues on network interfaces.
179 Externally visible ARP functions.
183 Ethernet and FDDI driver support functions and macros.
187 Core 802.11 network stack functions and rate adaptation based on
188 received signal strength.
193 Compute Internet checksum.
197 Look up the IPv4 source address best matching an IPv4 destination.
201 Functions and macros for managing memory used by networking code.
205 Packet filter interface.
209 Route callout functions.
213 TCP congestion control API.
216 .Sh LOCKING AND INTERRUPT CONTROL
221 Kernel lock functions.
229 Mutual exclusion primitives.
233 Restartable atomic sequences.
237 Reader / writer lock primitives.
241 Machine-independent software interrupt framework.
245 Functions to modify system interrupt priority level.
249 Functions ro raise the system priority level.
253 Kernel authorization framework.
257 API for cryptographic services in the kernel.
261 Security model development guidelines.
264 .Sh SYSTEM TIME CONTROL
265 Execute a function after a specified length of time.
277 System clock frequency.
281 Initialization of system time and time-of-day clock support.
286 Check that a timeval value is valid, and correct.
290 System time variables.
294 Realtime system clock.
298 Get the time elapsed since boot.
302 Convert milliseconds to system clock ticks.
306 Function to help implement rate-limited actions.
310 Function to help implement rate-limited actions.
314 Set battery-backed clock from system time.
318 System time variables.
321 .Sh KERNEL AND USER SPACE DATA COPY FUNCTIONS
322 Kernel space to/from user space copy functions.
326 Store data to user-space.
330 Fetch data from user-space.
334 Move data described by a struct uio.
337 .Sh MACHINE DEPENDENT KERNEL FUNCTIONS
338 Machine-dependent clock setup interface.
340 .Xr cpu_initclocks 9 .
342 Machine-dependent process core dump interface.
346 Machine-dependent kernel core dumps.
350 Unique CPU identification number
354 Halt or reboot the system
358 Machine-dependent root file system setup
362 Machine-dependent CPU startup
366 Disk label management routines.
369 .Sh DEVICE CONFIGURATION
370 Autoconfiguration frame-work.
374 Description of a device driver.
378 The autoconfiguration framework ``device definition'' language.
382 Machine-dependent device autoconfiguration.
384 .Xr cpu_configure 9 .
385 .Sh MI DEVICE DRIVER API
386 Bus and Machine Independent DMA Mapping Interface.
390 Bus space manipulation functions.
394 Generic disk framework.
398 Hardware-assisted data mover interface.
401 Generic event counter framework.
405 Firmware loader API for device drivers.
409 How to implement a new ioctl call to access device drivers.
413 Extensible line discipline framework.
417 Console magic key sequence management.
421 Console access interface.
425 Raster display operations.
429 Generic virtual console framework.
433 Machine-independent console support.
436 .Sh DEVICE SPECIFIC IMPLEMENTATION
437 Interface between low and high level audio drivers.
441 Bluetooth Device/Protocol API.
445 Support for CardBus PC-Card devices.
449 VESA Display Data Channel V2.
453 VESA Extended Display Identification Data.
461 Baseboard I/O control ASIC for DEC TURBOchannel systems.
465 Industry-standard Architecture.
469 Introduction to ISA Plug-and-Play support.
473 MicroChannel Architecture bus.
477 PPBUS microseqencer developer's guide.
481 Peripheral Component Interconnect.
485 Perform PCI bus configuration.
487 .Xr pci_configure_bus 9 .
489 PCI bus interrupt manipulation functions.
493 PC keyboard port interface.
497 Support for PCMCIA PC-Card devices.
501 User-space interface to ppbus parallel port.
505 Interface between low and high level radio drivers.
509 Functions to make a device available for entropy collection.
513 SCSI/ATAPI middle-layer interface.
525 USB device drivers interface.
529 Versa Module Euroboard bus.
533 Machine-independent IDE/ATAPI driver.
537 Functions to add or remove kernel event filters.
539 .Xr kfilter_register 9 .
541 Functions to raise kernel event.
545 Record and wakeup select requests.
549 Simple do-it-in-thread-context framework.
552 .Sh KERNEL HELPER FUNCTIONS
553 Kernel expression verification macros.
557 Convert a single byte between (unsigned) packed bcd and binary.
561 Bitmask output conversion.
565 General purpose extent manager.
573 Kernel formatted output conversion.
577 Data comparing, moving, copying, setting and cleaning.
588 Log a message from the kernel through the /dev/klog device.
592 Bring down system on fatal error.
600 Run all shutdown hooks.
602 .Xr doshutdownhooks 9 .
604 Kernel internal error numbers.
608 Kernel hash functions, hash table construction and destruction.
613 Format a number into a human readable form.
615 .Xr humanize_number 9 .
617 Machine-dependent interface to ipkdb.
621 Options string management.
625 Performs pattern matching on strings.
629 Hardware Performance Monitoring Interface.
633 Add or remove a power change hook.
635 .Xr powerhook_establish 9 .
637 Add or remove a shutdown hook.
639 .Xr shutdownhook_establish 9 .
645 System variable control interfaces.
651 kernel internals section first appeared in