I  Design and Organization
1 Introduction
 1.1 Goals and Scope
 1.2 Road Map
  1.2.1 Interfaces
  1.2.2 Function Libraries
  1.2.3 Component Libraries
 1.3 Overall Design Principles
 1.4 Configuring the OSKit
 1.5 Building the OSKit
 1.6 Using the OSKit
  1.6.1 Example Kernels
  1.6.2 Booting Kernels
  1.6.3 Command line arguments
2 Execution Environments
 2.1 Introduction
 2.2 Pure Model
 2.3 Impure Model
 2.4 Blocking Model
 2.5 Interruptible Blocking Model
  2.5.1 Use in multiprocessor kernels
  2.5.2 Use in preemptive kernels
  2.5.3 Use in multiple-interrupt-level kernels
  2.5.4 Use in interrupt-model kernels
II  Interfaces
3 Introduction to OSKit Interfaces
 3.1 Header File Conventions
  3.1.1 Basic Structure
  3.1.2 Namespace Cleanliness
 3.2 Common Header Files
  3.2.1 boolean.h: boolean type definitions
  3.2.2 compiler.h: compiler-specific macro definitions
  3.2.3 config.h: OSKit configuration-specific definitions
  3.2.4 machine/types.h: basic machine-dependent types
  3.2.5 types.h: basic machine-independent types
4 The Component Object Model
 4.1 Objects and Interfaces
  4.1.1 Interface Inheritance and the IUnknown Interface
  4.1.2 Querying for Interfaces
  4.1.3 Reference Counting
 4.2 Reference and Memory Management Conventions
 4.3 Error Handling
 4.4 Binary Issues
  4.4.1 Interface Structure
  4.4.2 Calling Conventions
 4.5 Source Issues
 4.6 COM Header Files
  4.6.1 com.h: basic COM types and constants
  4.6.2 error.h: error codes used in the OSKit COM interfaces
 4.7 oskit_iunknown: base interface for all COM objects
  4.7.1 query: Query for a different interface to the same object
  4.7.2 addref: Increment an interface’s reference count
  4.7.3 release: Release a reference to an interface
 4.8 oskit_stream: standard interface for byte stream objects
  4.8.1 read: Read from this stream, starting at the seek pointer
  4.8.2 write: Write to this stream, starting at the seek pointer
  4.8.3 seek: Change the seek pointer of this stream
  4.8.4 setsize: Set the size of this object
  4.8.5 copyto: Copy data from this object to another stream object
  4.8.6 commit: Commit all changes to this object
  4.8.7 revert: Revert to last committed version of this object
  4.8.8 lockregion: Lock a region of this object
  4.8.9 unlockregion: Unlock a region of this object
  4.8.10 stat: Get attributes of this object
  4.8.11 clone: Create a new stream object for the same underlying object
 4.9 oskit_listener: callback interface for event notification
  4.9.1 create: Create a new listener object
  4.9.2 notify: Inform a listener that an event of interest has occurred
 4.10 oskit_listener_mgr: Interface for managing multiple listeners
  4.10.1 create: Create a listener manager instance
  4.10.2 destroy: Destroy a listener manager instance
  4.10.3 add: Add a listener to a manager
  4.10.4 remove: Remove a listener from a manager
  4.10.5 notify: Notify all listeners associated with a manager
  4.10.6 count: Return the number of listeners associated with a manager
5 Interface Registration
 5.1 oskit_services: registration database
  5.1.1 addservice: Register an interface in the services registry
  5.1.2 remservice: Unregister a previously registered interface
  5.1.3 lookup: Obtain a list of all COM interfaces registered for an IID
  5.1.4 lookup_first: Obtain the first COM interface registered for an IID
  5.1.5 create: Create a new services database object
 5.2 Global Registry
  5.2.1 oskit_register: Register an interface in the services registry
  5.2.2 oskit_unregister: Unregister a previously registered interface
  5.2.3 oskit_lookup: Obtain a list of all COM interfaces registered for an IID
  5.2.4 oskit_lookup_first: Obtain the first COM interface registered for an IID
6 Synchronization Interfaces
 6.1 oskit_lock: Thread-safe lock interface
  6.1.1 lock: Lock a lock
  6.1.2 lock: Unlock a lock
 6.2 oskit_condvar: Condition variable interface
  6.2.1 wait: Wait on a condition variable
  6.2.2 signal: Signal a condition variable
  6.2.3 broadcast: Broadcast a condition variable
 6.3 oskit_lock_mgr: Lock manager: Interface for creating locks and condition variables
  6.3.1 allocate_lock: Allocate a thread-safe lock
  6.3.2 allocate_critical_lock: Allocate a critical thread-safe lock
  6.3.3 allocate_condvar: Allocate a condition variable
7 Input/Output Interfaces
 7.1 oskit_absio: Absolute I/O Interface
  7.1.1 read: Read from this object, starting at specified offset
  7.1.2 write: Write to this object, starting at specified offset
  7.1.3 getsize: Get the size of this object
  7.1.4 setsize: Set the size of this object
 7.2 oskit_asyncio: Asynchronous I/O Interface
  7.2.1 poll: Poll for pending asynchronous I/O conditions on this object
  7.2.2 add_listener: Associate a callback with this object
  7.2.3 remove_listener: Disassociate a callback from this object
  7.2.4 readable: Return the number of bytes available for reading from this object
 7.3 oskit_blkio: Block I/O Interface
  7.3.1 getblocksize: Return the minimum block size of this block I/O object
  7.3.2 read: Read from this object, starting at specified offset
  7.3.3 write: Write to this object, starting at specified offset
  7.3.4 getsize: Get the size of this object
  7.3.5 setsize: Set the size of this object
 7.4 oskit_bufio: Buffer-based I/O interface
  7.4.1 map: Map some or all of this buffer into locally accessible memory
  7.4.2 unmap: Release a previously mapped region of this buffer
  7.4.3 wire: Wire a region of this buffer into contiguous physical memory
  7.4.4 unwire: Unwire a previously wired region of this buffer
  7.4.5 copy: Create a copy of the specified portion of this buffer
 7.5 oskit_netio: Network packet I/O interface
  7.5.1 push: Push a packet through to the packet consumer
 7.6 oskit_posixio: POSIX I/O interface
  7.6.1 stat: Get attributes of this object
  7.6.2 setstat: Set the attributes of this object
  7.6.3 pathconf: Get value of a configuration option variable
 7.7 oskit_ttystream: Interface to Unix TTY-like streams
  7.7.1 getattr: Get the stream’s current TTY attributes
  7.7.2 setattr: Set the stream’s TTY attributes
  7.7.3 sendbreak: Send a break signal
  7.7.4 drain: Wait until all buffered output has been transmitted
  7.7.5 flush: Discared buffered input and/or output data
  7.7.6 flow: Suspend or resume data transmission or reception
8 OSKit Device Driver (OS Environment) Framework
 8.1 Introduction
  8.1.1 Full versus partial compliance
 8.2 Organization
 8.3 Driver Sets
 8.4 Execution Model
  8.4.1 Use in out-of-kernel, user-mode device drivers
 8.5 Performance
 8.6 Device Driver Initialization
 8.7 Device Classification
 8.8 Buffer Management
 8.9 Asynchronous I/O
 8.10 Other Considerations
 8.11 Common Device Driver Interface
  8.11.1 dev.h: common device driver framework definitions
 8.12 Driver Memory Allocation
  8.12.1 osenv_memflags_t: memory allocation flags
  8.12.2 osenv_mem_alloc: allocate memory for use by device drivers
  8.12.3 osenv_mem_free: free memory allocated with osenv_mem_alloc
  8.12.4 osenv_mem_get_phys: find the physical address of an allocated block
  8.12.5 osenv_mem_get_virt: find the virtual address of an allocated block
  8.12.6 osenv_mem_phys_max: find the largest physical memory address
  8.12.7 osenv_mem_map_phys: map physical memory into kernel virtual memory
 8.13 DMA
  8.13.1 osenv_isadma_alloc: Reserve a DMA channel
  8.13.2 osenv_isadma_free: Release a DMA channel
 8.14 I/O Ports
  8.14.1 osenv_io_avail: Check availability of a range of ports
  8.14.2 osenv_io_alloc: Allocate a range of ports
  8.14.3 osenv_io_free: Release a range of ports
 8.15 Hardware Interrupts
  8.15.1 osenv_intr_disable: prevent interrupts in the driver environment
  8.15.2 osenv_intr_enable: allow interrupts in the driver environment
  8.15.3 osenv_intr_enabled: determine the current interrupt enable state
  8.15.4 osenv_intr_save_disable: disable interrupts and return the former state
  8.15.5 osenv_irq_alloc: allocate an interrupt request line
  8.15.6 osenv_irq_free: Unregister the handler for the interrupt
  8.15.7 osenv_irq_disable: Disable a single interrupt line
  8.15.8 osenv_irq_enable: Enable a single interrupt line
  8.15.9 osenv_irq_pending: Determine if an interrupt is pending for a single line
 8.16 Sleep/Wakeup
  8.16.1 osenv_sleep_init: prepare to put the current process to sleep
  8.16.2 osenv_sleep: put the current process to sleep
  8.16.3 osenv_wakeup: wake up a sleeping process
 8.17 Driver-Kernel Interface: Timing
  8.17.1 osenv_timer_init: Initialize the timer support code
  8.17.2 osenv_timer_register: Request a timer handler be called at the specified frequency
  8.17.3 osenv_timer_unregister: Request a timer handler not be called
  8.17.4 osenv_timer_spin: Wait for a specified amount of time without blocking.
 8.18 Misc
  8.18.1 osenv_vlog: OS environment’s output routine
  8.18.2 osenv_log: OS environment’s output routine
  8.18.3 osenv_vpanic: Abort driver set operation
  8.18.4 osenv_panic: Abort driver set operation
 8.19 Device Registration
 8.20 Block Storage Device Interfaces
 8.21 Serial Device Interfaces
 8.22 Driver-Kernel Interface: (X86 PC) ISA device registration
  8.22.1 osenv_isabus_addchild: add a device node to an ISA bus
  8.22.2 osenv_isabus_remchild: remove a device node from an ISA bus
9 OSKit File System Framework
 9.1 Introduction
 9.2 oskit_principal: Principal Interface
  9.2.1 getid: Get the identity attributes of this principal
 9.3 oskit_filesystem: File System Interface
  9.3.1 statfs: Get attributes of this filesystem
  9.3.2 sync: Synchronize in-core filesystem data with permanent storage
  9.3.3 getroot: Return a reference to the root directory of this filesystem
  9.3.4 remount: Update the mount flags of this filesystem
  9.3.5 unmount: Forcibly unmount this filesystem
  9.3.6 lookupi: Lookup a file by inode number
 9.4 oskit_file: File Interface
  9.4.1 sync: Write this file’s data and metadata to permanent storage
  9.4.2 datasync: Write this file’s data to permanent storage
  9.4.3 access: Check accessibility of this file
  9.4.4 readlink: Read the contents of this symbolic link
  9.4.5 open: Create an open instance of this file
  9.4.6 getfs: Get the filesystem in which this file resides
 9.5 oskit_dir: Directory Interface
  9.5.1 lookup: Look up a file in this directory
  9.5.2 create: Create a regular file in this directory
  9.5.3 link: Link a file into this directory
  9.5.4 unlink: Unlink a file from this directory
  9.5.5 rename: Rename a file from this directory
  9.5.6 mkdir: Create a subdirectory in this directory
  9.5.7 rmdir: Remove a subdirectory from this directory
  9.5.8 getdirentries: Read one or more entries from this directory
  9.5.9 mknod: Create a special file node in this directory
  9.5.10 symlink: Create a symbolic link in this directory
  9.5.11 reparent: Create a virtual directory from this directory
 9.6 oskit_openfile: Open File Interface
  9.6.1 getfile: Get the underlying file object to which this open file refers
 9.7 Dependencies on the Client Operating System
  9.7.1 oskit_get_call_context: Get the caller’s context
10 OSKit Networking Framework
 10.1 Introduction
 10.2 oskit_socket: Socket Interface
  10.2.1 oskit_socket_factory_t: socket factories
  10.2.2 accept: accept a connection on a socket
  10.2.3 bind: bind a name to a socket
  10.2.4 connect: initiate a connection on a socket
  10.2.5 shutdown: shut down part of a full-duplex connection
  10.2.6 listen: listen for connections on a socket
  10.2.7 getsockname: get socket name
  10.2.8 getpeername: get name of connected peer
  10.2.9 getsockopt: get options on sockets
  10.2.10 setsockopt: set options on sockets
  10.2.11 recvfrom, recvmsg: receive a message from a socket
  10.2.12 sendto, sendmsg: send a message from a socket
11 Flask Security Framework
 11.1 flask_types.h: basic Flask types and constants
 11.2 oskit_security: Security Server Interface
  11.2.1 compute_av: Compute access vectors
  11.2.2 notify_perm: Notify of completed operations
  11.2.3 transition_sid: Compute a SID for a new object
  11.2.4 member_sid: Compute a SID for a member object
  11.2.5 sid_to_context: Obtain the security context for a given SID
  11.2.6 context_to_sid: Obtain the SID for a given security context
  11.2.7 register_avc: Register an AVC component for policy change notifications
  11.2.8 unregister_avc: Unregister an AVC component
  11.2.9 load_policy: Load a new policy configuration
  11.2.10 fs_sid: Obtain SIDs for an unlabeled file system
  11.2.11 port_sid: Obtain the SID for a port number
  11.2.12 netif_sid: Obtains SIDs for a network interface
  11.2.13 node_sid: Obtains the SID for a network node
 11.3 oskit_avc: AVC Interface
  11.3.1 has_perm_ref: Check permissions
  11.3.2 notify_perm_ref: Notify of completed operations
  11.3.3 add_callback: Register a callback for a policy change event
  11.3.4 remove_callback: Remove a previously registered callback
  11.3.5 log_contents: Log the contents of the AVC
  11.3.6 log_stats: Log the AVC usage statistics
 11.4 oskit_avc_ss: AVC Interface for the Security Server
  11.4.1 grant: Grant previously denied permissions
  11.4.2 try_revoke: Try to revoke previously granted permissions
  11.4.3 revoke: Revoke previously granted permissions
  11.4.4 reset: Reset the cache and recheck all retained permissions
  11.4.5 set_auditallow: Enable or disable the auditing of granted permissions
  11.4.6 set_auditdeny: Enable or disable the auditing of denied permissions
  11.4.7 set_notify: Enable or disable the notification of used permissions
12 Miscellaneous OSKit Interfaces
 12.1 oskit_random: Interface for random number generators
  12.1.1 create: Create a new pseudo-random number generator
  12.1.2 random: Produce a pseudo-random number
  12.1.3 srandom: Seed a pseudo-random number generator
III  Function Libraries
13 “Client OS” Library: liboskit_clientos.a
 13.1 Introduction
 13.2 Initialization
  13.2.1 oskit_clientos_init: Initialize the client operating system library
  13.2.2 oskit_clientos_sethostname: Set the hostname
  13.2.3 oskit_clientos_setfsnamespace: Set the filesystem namespace
 13.3 C Library Environment
  13.3.1 getfsnamespace: Get the filesystem namespace
  13.3.2 setfsnamespace: Set the filesystem namespace
  13.3.3 gethostname: Get the system hostname
  13.3.4 sethostname: Set the system hostname
  13.3.5 exit: Call the exit function
  13.3.6 setexit: Set the exit function
  13.3.7 getconsole: Get and the console stream object
  13.3.8 setconsole: Set the console stream object
  13.3.9 signals_init: Call the signal initialization function
  13.3.10 setsiginit: Set the signal initialization function
  13.3.11 sleep_init: Initialize a sleep record for the sleep/wakeup interface
  13.3.12 sleep: Sleep until awakened
  13.3.13 wakeup: Wakeup a sleeping thread
  13.3.14 clone: Make a copy of an oskit_libcenv object
 13.4 Memory Interface
  13.4.1 alloc: Allocate a chunk of memory
  13.4.2 realloc: Reallocate a chunk of memory
  13.4.3 alloc_aligned: Allocate a chunk of memory subject to alignment constraints
  13.4.4 free: Free a chunk of memory
  13.4.5 getsize: Inquire about the size of a chunk of memory
  13.4.6 alloc_gen: Allocate a chunk of memory with general constraints
  13.4.7 avail: Return the amount of free memory
14 Minimal C Library: liboskit_c.a
 14.1 Introduction
 14.2 POSIX Interface
 14.3 Unsupported Features
 14.4 Header Files
  14.4.1 a.out.h: semi-standard a.out file format definitions
  14.4.2 alloca.h: explicit stack-based memory allocation
  14.4.3 assert.h: program diagnostics facility
  14.4.4 ctype.h: character handling functions
  14.4.5 errno.h: error numbers
  14.4.6 fcntl.h: POSIX low-level file control
  14.4.7 float.h: constants describing floating-point types
  14.4.8 limits.h: architecture-specific limits
  14.4.9 malloc.h: memory allocator definitions
  14.4.10 math.h: floating-point math functions and constants
  14.4.11 netdb.h: definitions for network database operations
  14.4.12 setjmp.h: nonlocal jumps
  14.4.13 signal.h: signal handling
  14.4.14 stdarg.h: variable arguments
  14.4.15 stddef.h: common definitions
  14.4.16 stdio.h: standard input/output
  14.4.17 stdlib.h: standard library functions
  14.4.18 string.h: string handling functions
  14.4.19 strings.h: string handling functions (deprecated)
  14.4.20 sys/gmon.h: GNU profiling support definitions
  14.4.21 sys/ioctl.h: I/O control definitions
  14.4.22 sys/mman.h: memory management and mapping definitions
  14.4.23 sys/param.h: system parameters
  14.4.24 sys/reboot.h: reboot definitions (deprecated)
  14.4.25 sys/signal.h: signal handling (deprecated)
  14.4.26 sys/stat.h: file operations
  14.4.27 sys/termios.h: terminal handling functions and definitions (deprecated)
  14.4.28 sys/time.h: timing functions
  14.4.29 sys/types.h: general POSIX types
  14.4.30 sys/wait.h: a POSIX wait specification
  14.4.31 termios.h: terminal handling functions and definitions
  14.4.32 unistd.h: POSIX standard symbolic constants
  14.4.33 utime.h: file times
  14.4.34 sys/utsname.h: system identification
 14.5 Memory Allocation
  14.5.1 malloc_lmm: LMM pool used by the default memory allocation functions
  14.5.2 malloc: allocate uninitialized memory
  14.5.3 mustmalloc: allocate uninitialized memory and panic on failure
  14.5.4 memalign: allocate aligned uninitialized memory
  14.5.5 calloc: allocate cleared memory
  14.5.6 mustcalloc: allocate cleared memory and panic on failure
  14.5.7 realloc: change the size of an existing memory block
  14.5.8 free: release an allocated memory block
  14.5.9 smalloc: allocated uninitialized memory with explicit size
  14.5.10 smemalign: allocate aligned memory with explicit size
  14.5.11 sfree: release a memory block with explicit size
  14.5.12 mallocf: allocate uninitialized memory with explicit LMM flags
  14.5.13 memalignf: allocate aligned uninitialized memory with explict LMM flags
  14.5.14 smallocf: allocated uninitialized memory with explicit size and LMM flags
  14.5.15 smemalignf: allocate aligned memory with explicit size and LMM flags
  14.5.16 morecore: add memory to malloc memory pool
  14.5.17 mem_lock: Lock access to malloc memory pool
  14.5.18 mem_unlock: Unlock access to malloc memory pool
 14.6 Standard I/O Functions
 14.7 Initialization
  14.7.1 oskit_init_libc: Load the OSKit C library
  14.7.2 oskit_init_libc: Initialize the OSKit C library
 14.8 Termination Functions
  14.8.1 exit: terminate normally
  14.8.2 abort: terminate abnormally
  14.8.3 panic: terminate abnormally with an error message
 14.9 Miscellaneous Functions
  14.9.1 hexdump: print a buffer as a hexdump
  14.9.2 sigcontext_dump: dump machine specific sigcontext structure
15 Kernel Support Library: liboskit_kern.a
 15.1 Introduction
  15.1.1 Machine-dependence of code and interfaces
  15.1.2 Generic versus Base Environment code
  15.1.3 Road Map
 15.2 Machine-independent Facilities
  15.2.1 page.h: Page size definitions
  15.2.2 spin_lock.h: Spin locks
  15.2.3 queue.h: Generic queues
  15.2.4 debug.h: debugging support facilities
  15.2.5 base_critical: simple critical section support
 15.3 (X86) Generic Low-level Definitions
  15.3.1 asm.h: assembly language support macros
  15.3.2 eflags.h: Processor flags register definitions
  15.3.3 proc_reg.h: Processor register definitions and accessor functions
  15.3.4 debug_reg.h: Debug register definitions and accessor functions
  15.3.5 fp_reg.h: Floating point register definitions and accessor functions
  15.3.6 far_ptr.h: Far (segment:offset) pointers
  15.3.7 pio.h: Programmed I/O functions
  15.3.8 seg.h: Segment descriptor data structure definitions and constants
  15.3.9 gate_init.h: Gate descriptor initialization support
  15.3.10 trap.h: Processor trap vectors
  15.3.11 paging.h: Page translation data structures and constants
  15.3.12 tss.h: Processor task save state structure definition
 15.4 (X86 PC) Generic Low-level Definitions
  15.4.1 irq_list.h: Standard hardware interrupt assignments
  15.4.2 pic.h: Programmable Interrupt Controller definitions
  15.4.3 keyboard.h: PC keyboard definitions
  15.4.4 rtc.h: NVRAM Register locations
 15.5 (X86) Processor Identification and Management
  15.5.1 cpu_info: CPU identification data structure
  15.5.2 cpuid: identify the current CPU
  15.5.3 cpu_info_format: output a cpu_info structure in ASCII form
  15.5.4 cpu_info_min: return the minimum feature set of two CPU information structures
  15.5.5 cpu_info_dump: pretty-print a CPU information structure to the console
  15.5.6 i16_enter_pmode: enter protected mode
  15.5.7 i16_leave_pmode: leave protected mode
  15.5.8 paging_enable: enable page translation
  15.5.9 paging_disable: disable page translation
  15.5.10 gate_init: install gate descriptors
 15.6 (X86) Base Environment
  15.6.1 Memory Model
  15.6.2 base_vm.h: definitions for the base virtual memory environment
  15.6.3 base_cpu_setup: initialize and activate the base CPU environment
  15.6.4 base_cpu_init: initialize the base environment data structures
  15.6.5 base_cpu_load: activate the base processor execution environment
  15.6.6 base_cpuid: global variable describing the processor
  15.6.7 base_stack.h: default kernel stack
 15.7 (X86) Base Environment: Segmentation Support
  15.7.1 base_gdt: default global descriptor table for the base environment
  15.7.2 base_gdt_init: initialize the base GDT to default values
  15.7.3 base_gdt_load: load the base GDT into the CPU
  15.7.4 base_idt: default interrupt descriptor table
  15.7.5 base_idt_load: load the base IDT into the current processor
  15.7.6 base_tss: default task state segment
  15.7.7 base_tss_init: initialize the base task state segment
  15.7.8 base_tss_load: load the base TSS into the current processor
 15.8 (X86) Base Environment: Trap Handling
  15.8.1 trap_state: saved state format used by the default trap handler
  15.8.2 base_trap_init: initialize the processor trap vectors in the base IDT
  15.8.3 base_trap_inittab: initialization table for the default trap entrypoints
  15.8.4 base_trap_handlers: Array of handler routines for hardware traps
  15.8.5 base_trap_default_handler: default trap handler for unexpected traps
  15.8.6 trap_dump: dump a saved trap state structure
  15.8.7 trap_dump_panic: dump a saved trap state structure
 15.9 (X86) Base Environment: Page Translation
  15.9.1 base_paging_init: create minimal kernel page tables and enable paging
  15.9.2 base_pdir_pa: initial kernel page directory
  15.9.3 pdir_find_pde: find an entry in a page directory given a linear address
  15.9.4 ptab_find_pte: find an entry in a page table given a linear address
  15.9.5 pdir_find_pte: look up a page table entry from a page directory
  15.9.6 pdir_get_pte: retrieve the contents of a page table entry
  15.9.7 ptab_alloc: allocate a page table page and clear it to zero
  15.9.8 ptab_free: free a page table allocated using ptab_alloc
  15.9.9 pdir_map_page: map a 4KB page into a linear address space
  15.9.10 pdir_unmap_page: unmap a single 4KB page mapping
  15.9.11 pdir_map_range: map a contiguous range of physical addresses
  15.9.12 pdir_prot_range: change the permissions on a mapped memory range
  15.9.13 pdir_unmap_range: remove a mapped range of linear addresses
  15.9.14 pdir_clean_range: free unused page table pages in a page directory
  15.9.15 pdir_dump: dump the contents of a page directory and all its page tables
  15.9.16 ptab_dump: dump the contents of a page table
 15.10 (X86) Base Environment: Protected-mode entry and exit
 15.11 (X86 PC) Base Environment: Physical Memory Management
  15.11.1 phys_lmm.h: Physical memory management for PCs
  15.11.2 phys_mem_max: Highest physical memory address
  15.11.3 phys_lmm_init: Initialize kernel physical memory LMM
  15.11.4 phys_lmm_add: Add memory to the kernel physical memory LMM
 15.12 (X86 PC) Base Environment: Interrupt Support
  15.12.1 base_irq.h: Hardware interrupt definitions for standard PCs
  15.12.2 base_irq_handlers: Array of handler routines for hardware interrupts
  15.12.3 base_irq_init: Initialize hardware interrupts
  15.12.4 base_irq_inittab: initialization table for default interrupt entrypoints
  15.12.5 base_irq_default_handler: default IRQ handler for unexpected interrupts
  15.12.6 base_irq_nest: interrupt nesting counter and software interrupt flag
  15.12.7 base_irq_softint_request: request a software interrupt
  15.12.8 base_irq_softint_handler: Pointer to handler for software interrupts
 15.13 (X86 PC) Base Environment: Console Support
  15.13.1 base_console.h: definitions for base console support
  15.13.2 base_console_init: Initialize the base console
  15.13.3 base_cooked_termios: Default termios setting for cooked-mode console
  15.13.4 base_raw_termios: Default termios setting for raw-mode console
  15.13.5 direct_cons_getchar: wait for and read a character from the keyboard
  15.13.6 direct_cons_putchar: write a character to the video console
  15.13.7 direct_cons_trygetchar: read an available character from the keyboard
  15.13.8 com_cons_init: initialize a serial port
  15.13.9 com_cons_getchar: wait for and read a character from a serial port
  15.13.10 com_cons_putchar: write a character to a serial port
  15.13.11 com_cons_flush: delay until all output is flushed on a serial line
  15.13.12 com_cons_enable_receive_interrupt: enable receive interrupts on a serial port
 15.14 (X86 PC) MultiBoot Startup
  15.14.1 Startup code organization
  15.14.2 Startup sequence
  15.14.3 Memory model
  15.14.4 Command-line arguments
  15.14.5 Linking MultiBoot kernels
  15.14.6 multiboot.h: Definitions of MultiBoot structures and constants
  15.14.7 boot_info: MultiBoot information structure
  15.14.8 multiboot_main: general MultiBoot initialization
  15.14.9 base_multiboot_init_mem: physical memory initialization
  15.14.10 base_multiboot_init_cmdline: command-line preprocessing
  15.14.11 base_multiboot_find: find a MultiBoot boot module by name
  15.14.12 Multiboot Specification
 15.15 (X86 PC) Raw BIOS Startup
 15.16 (X86 PC) DOS Startup
 15.17 Remote Kernel Debugging with GDB
  15.17.1 Organization of remote GDB support code
  15.17.2 Using the remote debugging code
  15.17.3 Debugging address spaces other than the kernel’s
  15.17.4 gdb_state: processor register state frame used by GDB
  15.17.5 gdb_trap: default trap handler for remote GDB debugging
  15.17.6 gdb_copyin: safely read data from the subject’s address space
  15.17.7 gdb_copyout: safely write data into the subject’s address space
  15.17.8 gdb_trap_recover: recovery pointer for safe memory transfer routines
  15.17.9 gdb_signal: vector to GDB trap/signal handler routine
  15.17.10 gdb_set_trace_flag: enable or disable single-stepping in a state frame
  15.17.11 gdb_breakpoint: macro to generate a manual instruction breakpoint
 15.18 Serial-line Remote Debugging with GDB
  15.18.1 Redirecting console output to the remote debugger
  15.18.2 gdb_serial_signal: primary event handler in the GDB stub
  15.18.3 gdb_serial_exit: notify the remote debugger that the subject is dead
  15.18.4 gdb_serial_getchar: input a character from the remote debugger’s console
  15.18.5 gdb_serial_putchar: output a character to the remote debugger’s console
  15.18.6 gdb_serial_puts: output a line to the remote debugger’s console
  15.18.7 gdb_serial_recv: vector to GDB serial line receive function
  15.18.8 gdb_serial_send: vector to GDB serial line send function
  15.18.9 gdb_pc_com_init: (X86 PC) set up serial-line debugging over a COM port
 15.19 Annotations
  15.19.1 anno.h: (X86) generic macros to place annotations in kernel code.
  15.19.2 anno_dump: dump all annotation tables
  15.19.3 anno_find_exact: find annotation table exactly entry matching a value.
  15.19.4 anno_find_lower: find greatest annotation table entry below a value.
  15.19.5 anno_init: initialize annotation tables and sort the entries.
  15.19.6 anno_intr: (X86) interrupt annotations
  15.19.7 anno_trap: (X86) trap annotations
 15.20 Boot Module Filesystem
  15.20.1 start_fs_bmod: Create the BMOD filesystem
 15.21 Signals
  15.21.1 oskit_sendsig_init: initialize kernel signal delivery
  15.21.2 oskit_sendsig: deliver a signal
  15.21.3 sendsig_trap_handler: convert trap into a signal
16 Symmetric Multiprocessing: liboskit_smp.a
 16.1 Introduction
 16.2 Supported Systems
  16.2.1 Intel x86
  16.2.2 External dependencies
 16.3 API reference
  16.3.1 smp_init: Initializes the SMP startup code
  16.3.2 smp_find_cur_cpu: Return the processor ID of the current processor.
  16.3.3 smp_find_cpu: Return the next processor ID
  16.3.4 smp_start_cpu: Starts a processor running a specified function
  16.3.5 smp_get_num_cpus: Returns the total number of processors
  16.3.6 smp_map_range: Request the OS map physical memory
  16.3.7 smp_init_paging: Tell the SMP code that paging is being enabled
  16.3.8 smp_message_pass: Send an inter-processor interrupt to another CPU
  16.3.9 smp_message_pass_enable:
  16.3.10 smp_apic_ack: (X86) acknowledge an inter-processor interrupt
17 Kernel Device Driver Support: liboskit_dev.a
 17.1 Introduction
 17.2 Device Registration
 17.3 Naming
 17.4 Memory Allocation
 17.5 Buffer Management
 17.6 Processor Bus Resource Management
18 Unix User-Mode Environment: liboskit_unix.a
 18.1 Introduction
  18.1.1 Supported Platforms
  18.1.2 Native OS library
 18.2 Converting your OSKit kernel to run on Unix
 18.3 Building for Unix user-mode
 18.4 Running OSKit kernels with Unix support
  18.4.1 Disk
  18.4.2 Networking
19 OSKit “Quick Start” Library: liboskit_startup.a
 19.1 Introduction
 19.2 General
  19.2.1 start_world: initialize everything imaginable
  19.2.2 start_clock: initialize and register a default clock object
  19.2.3 start_console: initialize a full POSIX console device
  19.2.4 start_cq_console: initialize a CQ console interface
  19.2.5 start_osenv: creates a default “OS environment” object
  19.2.6 start_pthreads: initialize the threading system
  19.2.7 start_devices: probe and initialize all device drivers
  19.2.8 start_foox: the start_foox call
 19.3 Disk and Filesystem
  19.3.1 start_fs: Initialize the root filesystem for a kernel
  19.3.2 start_fs_on_blkio: Initialize the root filesystem for a kernel from a blkio
  19.3.3 start_fs_bmod: Initialize the root filesystem for a kernel from a bmod
 19.4 Network
 19.5 Misc
  19.5.1 start_svm: Initialize the SVM subsystem
  19.5.2 start_svm_on_blkio: Initialize the SVM subsystem from blkio interface
IV  Component Libraries
20 POSIX Interface Library: liboskit_posix.a
 20.1 Introduction
 20.2 Modified Functions
  20.2.1 getdtablesize: get descriptor table size
  20.2.2 mmap, munmap, mprotect: map files into memory
  20.2.3 getpid: get process id
  20.2.4 gettimeofday: get current time
 20.3 POSIX Message Queue and Semaphore
 20.4 POSIX Signals
 20.5 Client Operating System Dependencies
  20.5.1 _exit
  20.5.2 Console Stream
  20.5.3 Filesystem Namespace
  20.5.4 System Clock
  20.5.5 Socket Factory
 20.6 Extended API functions
  20.6.1 fs_mount, fs_unmount: Compose file system name spaces
21 FreeBSD C Library: liboskit_freebsd_c.a
 21.1 Introduction
 21.2 POSIX Interface
 21.3 Malloc Support
 21.4 Signal Support
 21.5 Missing Functionality
 21.6 errno.h
 21.7 Client Operating System Dependencies
 21.8 Library Initialization
  21.8.1 oskit_init_libc: Load the FreeBSD C library
  21.8.2 oskit_init_libc: Secondary Initialization of the FreeBSD C library
22 FreeBSD Math Library: liboskit_freebsd_m.a
 22.1 Introduction
  22.1.1 Architecture Dependencies
  22.1.2 External Dependencies
  22.1.3 Caveats
 22.2 Functions
23 Filesystem Namespace: liboskit_fsnamespace.a
 23.1 Introduction
  23.1.1 oskit_create_fsnamespace: Create a filesystem namespace object
  23.1.2 chroot: Set the root directory for absolute pathname translation
  23.1.3 chcwd: Set the current directory for relative pathname translation
  23.1.4 lookup: Translate a multi component path to a directory or file object
  23.1.5 mount: Mount a filesystem at a given point in the namespace
  23.1.6 unmount: Unmount a filesystem from the filesystem namespace
  23.1.7 clone: Duplicate a filesystem namespace object
24 Runtime Linker/Loader: liboskit_rtld.a
 24.1 Introduction
  24.1.1 oskit_boot_rtld: Initialize the RTLD library
  24.1.2 dlopen: Load a shared library
  24.1.3 dlsym: Find the address binding for a symbol
  24.1.4 dlclose: Delete a reference to a shared library
  24.1.5 dlerror: Return an error message describing the last error
25 List-based Memory Manager: liboskit_lmm.a
 25.1 Introduction
 25.2 Memory regions
  25.2.1 Region flags
  25.2.2 Allocation priority
 25.3 Example use
 25.4 Restrictions and guarantees
 25.5 Sanity checking
 25.6 API reference
  25.6.1 lmm_init: initialize an LMM pool
  25.6.2 lmm_add_region: register a memory region in an LMM pool
  25.6.3 lmm_add_free: add a block of free memory to an LMM pool
  25.6.4 lmm_remove_free: remove a block of memory from an LMM pool
  25.6.5 lmm_alloc: allocate memory
  25.6.6 lmm_alloc_aligned: allocate memory with a specific alignment
  25.6.7 lmm_alloc_gen: allocate memory with general constraints
  25.6.8 lmm_alloc_page: allocate a page of memory
  25.6.9 lmm_free: free previously-allocated memory
  25.6.10 lmm_free_page: free a page allocated with lmm_alloc_page
  25.6.11 lmm_avail: find the amount of free memory in an LMM pool
  25.6.12 lmm_find_free: scan a memory pool for free blocks
  25.6.13 lmm_dump: display the free memory list in an LMM pool
  25.6.14 lmm_stats: display statistics for an LMM pool
26 Address Map Manager: liboskit_amm.a
 26.1 Introduction
 26.2 Addresses and attributes
 26.3 Address maps and entries
 26.4 Simple interface
 26.5 Generic interface
 26.6 Generic interface example
 26.7 External dependencies
 26.8 API reference
  26.8.1 amm_alloc_func: Allocate an AMM map entry (user-provided callout)
  26.8.2 amm_allocate: Allocate an address range in an AMM (simple interface)
  26.8.3 amm_deallocate: Deallocate an address range in an AMM (simple interface)
  26.8.4 amm_destroy: Destroy an AMM
  26.8.5 amm_dump: display the AMM-private data for every entry in an AMM
  26.8.6 amm_entry_field : Accessor macros for AMM-private data members
  26.8.7 amm_find_addr: Locate the map entry containing a specific address
  26.8.8 amm_find_gen: Locate a map entry matching specified criteria
  26.8.9 amm_free_func: Free an AMM map entry (user-provided callout)
  26.8.10 amm_init: initialize an address map (simple interface)
  26.8.11 amm_init_gen: initialize an address map
  26.8.12 amm_iterate: Call a user-defined function for every entry in an AMM (simple interface)
  26.8.13 amm_iterate_func: Function to call with every AMM entry (user-provided callout)
  26.8.14 amm_iterate_gen: Call a user-defined function for select entries in an AMM
  26.8.15 amm_join_func: Join two adjacent map entries (user-provided callout)
  26.8.16 amm_modify: Modify the attributes of an address range
  26.8.17 amm_protect: Modify the attribute flags of an address range in an AMM (simple interface)
  26.8.18 amm_reserve: Mark as unavailable an address range in an AMM (simple interface)
  26.8.19 amm_select: Returns an entry describing an address range exactly
  26.8.20 amm_split_func: Split a map entry into two entries (user-provided callout)
27 Simple Virtual Memory: liboskit_svm.a
 27.1 Introduction
 27.2 API reference
  27.2.1 svm_init: initialize SVM system
  27.2.2 svm_alloc: allocate a region of virtual memory
  27.2.3 svm_dealloc: deallocate a region of virtual memory
  27.2.4 svm_protect: control the protection of a region of virtual memory
28 (X86)NetBSD UVM: liboskit_netbsd_uvm.a
 28.1 Introduction
 28.2 Restrictions
 28.3 Virtual Address Space Layout
 28.4 Memory Interface
 28.5 Threads
 28.6 Page Faults
 28.7 Virtual memory system calls
 28.8 API reference
  28.8.1 oskit_uvm_init: initialize the UVM library
  28.8.2 oskit_uvm_swap_init: Initialize the swap subsystem
  28.8.3 oskit_uvm_swap_on: Add a swap area
  28.8.4 oskit_uvm_swap_off: Remove a swap area
  28.8.5 oskit_uvm_start_pagedaemon: start the pagedaemon
  28.8.6 oskit_uvm_create: Create a virtual address space
  28.8.7 oskit_uvm_destroy: Destroy a virtual address space
  28.8.8 oskit_uvm_mmap: Map an object into memory
  28.8.9 oskit_uvm_unmap: Remove a mapping
  28.8.10 oskit_uvm_mprotect: Control the protection of pages
  28.8.11 oskit_uvm_madvise: Give advise about use of memory
  28.8.12 oskit_uvm_vmspace_set: Associate a thread with a virtual address space
  28.8.13 oskit_uvm_vmspace_get: Get the virtual address space associated with a thread
  28.8.14 copyin: Copy a range of data from user to kernel
  28.8.15 copyinstr: Copy a string from user to kernel
  28.8.16 copyout: Copy a range of data from kernel to user
  28.8.17 copyinstr: Copy a string from kernel to user
  28.8.18 oskit_uvm_mem_map_phys: Map a physical memory range into a virtual address space
  28.8.19 oskit_handler_set: Install a fault handler
  28.8.20 oskit_uvm_handler_get: Get the fault handler for an address space
  28.8.21 oskit_uvm_csw_hook_set: Install a context switch hook
29 POSIX Threads: liboskit_threads.a
 29.1 Introduction
 29.2 Examples and Caveats
 29.3 POSIX Threads Reference
  29.3.1 pthread.h: Thread constants and data structures
  29.3.2 pthread_init: Initialize the threads system
  29.3.3 pthread_attr_init: Initialize a thread attributes object
  29.3.4 pthread_attr_setdetachstate: Set the detach state in a thread attributes object
  29.3.5 pthread_attr_setprio: Set the priority in a thread attributes object
  29.3.6 pthread_attr_setstackaddr: Set the stack address in a thread attributes object
  29.3.7 pthread_attr_setguardsize: Set the stack guard size in a thread attributes object
  29.3.8 pthread_attr_setstacksize: Set the stack size in a thread attributes object
  29.3.9 pthread_attr_setschedpolicy: Set the scheduling policy in a thread attributes object
  29.3.10 pthread_mutexattr_init: Initialize a mutex attributes object
  29.3.11 pthread_mutexattr_setprotocol: Set the protocol attribute of a mutex attributes object
  29.3.12 pthread_mutexattr_settype: Set the type attribute of a mutex attributes object
  29.3.13 pthread_condattr_init: Initialize a condition attributes object
  29.3.14 pthread_cancel: Cancel a running thread
  29.3.15 pthread_cleanup_push: Push a cancellation cleanup handler routine onto the calling thread’s cancellation cleanup stack
  29.3.16 pthread_setcancelstate: Set the cancelation state
  29.3.17 pthread_setcanceltype: Set the cancelation type
  29.3.18 pthread_testcancel: Check for a cancelation point
  29.3.19 pthread_cond_broadcast: Wakeup all threads waiting on a condition variable
  29.3.20 pthread_cond_destroy: Destroy a condition variable
  29.3.21 pthread_cond_init: Initialize a condition variable
  29.3.22 pthread_cond_signal: Wakeup one thread waiting on a condition variable
  29.3.23 pthread_cond_wait: Wait on a condition variable
  29.3.24 pthread_cond_timedwait: Wait on a condition variable with timeout
  29.3.25 pthread_create: Create a new thread and start it running
  29.3.26 pthread_detach: Detach a thread from its parent
  29.3.27 pthread_exit: Terminate a thread with status
  29.3.28 pthread_join: Join with a target thread
  29.3.29 pthread_key_create: Create a thread-specific data key
  29.3.30 pthread_key_delete: Delete a thread-specific data key
  29.3.31 pthread_setspecific: Set a thread-specific data value
  29.3.32 pthread_getspecific: Set a thread-specific data value
  29.3.33 pthread_mutex_init: Initialize a mutex object
  29.3.34 pthread_mutex_destroy: Destroy a mutex object
  29.3.35 pthread_mutex_lock: Lock a unlocked mutex object
  29.3.36 pthread_mutex_trylock: Attempt to lock a unlocked mutex object
  29.3.37 pthread_mutex_unlock: Unlock a mutex object
  29.3.38 pthread_self: Return the thread identifier of the current thread
  29.3.39 pthread_setschedparam: Set the scheduling parameters for a thread
  29.3.40 pthread_sigmask: examine and change blocked signals
  29.3.41 pthread_kill: send a signal to a thread
  29.3.42 sched_yield: Yield the processor
 29.4 Oskit API Extensions
  29.4.1 oskit_pthread_sleep: Sleep for an interval of time
  29.4.2 oskit_pthread_wakeup: Wakeup a thread in oskit_pthread_sleep
  29.4.3 oskit_pthread_setprio: Change the priority of a thread
  29.4.4 osenv_process_lock: Lock the process lock
  29.4.5 osenv_process_unlock: Unlock the process lock
 29.5 Thread-safe Adaptors
  29.5.1 oskit_wrap_socket: Wrap an oskit_socket in a thread-safe adaptor
  29.5.2 oskit_wrap_stream: Wrap an oskit_stream in a thread-safe adaptor
  29.5.3 oskit_wrap_asyncio: Wrap an oskit_asyncio in a thread-safe adaptor
  29.5.4 oskit_wrap_sockio: Wrap an oskit_sockio in a thread-safe adaptor
  29.5.5 oskit_wrap_posixio: Wrap an oskit_posixio in a thread-safe adaptor
  29.5.6 oskit_wrap_file: Wrap an oskit_file in a thread-safe adaptor
  29.5.7 oskit_wrap_dir: Wrap an oskit_dir in a thread-safe adaptor
  29.5.8 oskit_wrap_filesystem: Wrap an oskit_filesystem in a thread-safe adaptor
  29.5.9 oskit_wrap_openfile: Wrap an oskit_openfile in a thread-safe adaptor
  29.5.10 oskit_wrap_blkio: Wrap an oskit_blkio in a thread-safe adaptor
  29.5.11 oskit_wrap_absio: Wrap an oskit_absio in a thread-safe adaptor
 29.6 InterThread Communication
  29.6.1 oskit_ipc_send: Send a message to another thread
  29.6.2 oskit_ipc_recv: Receive a message from a specific thread
  29.6.3 oskit_ipc_wait: Receive a message from any thread
  29.6.4 oskit_ipc_call: make a synchronous IPC call to another thread
  29.6.5 oskit_ipc_reply: reply to a synchronous IPC invocation
 29.7 CPU Inheritance Framework
  29.7.1 pthread_sched_become_scheduler: Become an application level scheduler
  29.7.2 pthread_sched_donate_wait_recv: Donate CPU time to a thread
  29.7.3 pthread_sched_message_recv: Scheduling message receive
  29.7.4 pthread_sched_setstate: Set the scheduling parameters for a thread
  29.7.5 pthread_cond_donate_wait: Timed condition wait with CPU donation
  29.7.6 pthread_attr_setscheduler: Set the scheduler in a thread attributes object
  29.7.7 pthread_attr_setopaque: Set the scheduling parameter in a thread attributes object
  29.7.8 Example Schedulers
  29.7.9 create_fixedpri_scheduler: Create a fixed priority scheduler
  29.7.10 create_lotto_scheduler: Create a lottery scheduler
  29.7.11 create_stride_scheduler: Create a Stride scheduler
  29.7.12 create_ratemono_scheduler: Create a Rate Monotonic scheduler
30 (X86)Simple Process: liboskit_sproc.a
 30.1 Introduction
 30.2 Example
 30.3 Requirements
 30.4 System Calls
  30.4.1 System call implementation
  30.4.2 System call stub
 30.5 API reference
  30.5.1 oskit_sproc_init: Initialize the Simple Process Library
  30.5.2 oskit_sproc_create: Create a process
  30.5.3 oskit_sproc_destroy: Destroy a process
  30.5.4 oskit_sproc_stack_alloc: Allocate a redzone protected stack
  30.5.5 oskit_sproc_stack_push: push arguments onto a stack
  30.5.6 oskit_sproc_switch: Switch to user mode
  30.5.7 OSKIT_SPROC_RETURN: Return to the kernel mode
  30.5.8 oskit_sproc_load_elf: Map an ELF executable file
31 Memory Debugging Utilities: liboskit_memdebug.a
 31.1 Introduction
  31.1.1 Memdebug Library Configuration
  31.1.2 Memdebug Library Internals
  31.1.3 External Dependencies
 31.2 Debugging versions of standard routines
 31.3 Additional Debugging Utilities
  31.3.1 memdebug_mark: Mark all currently allocated blocks.
  31.3.2 memdebug_check: Look for blocks allocated since mark that haven’t been freed.
  31.3.3 memdebug_ptrchk: Check validity of a pointer’s fence-posts
  31.3.4 memdebug_sweep: Check validity of all allocated block’s fence-posts
  31.3.5 memdebug_printf: A printf-style routine guaranteed not to allocate memory
  31.3.6 memdebug_bogosity: Prints a memdebug bogosity message
  31.3.7 memdebug_store_backtrace: Stores call-stack trace in provided buffer
  31.3.8 memdebug_untraced_alloc: Obtain memory from the client OS
  31.3.9 memdebug_untraced_free: Return memory from the client OS
32 Profiling Support: liboskit_gprof.a
 32.1 Introduction
 32.2 Caveats
 32.3 API reference
  32.3.1 profil: Enable, disable, or change statistical sampling
  32.3.2 moncontrol: enable or disable profiling
  32.3.3 monstartup: Start profiling for the first time
 32.4 Using gprof
 32.5 Files
 32.6 Changing parameters and other FAQs
  32.6.1 The sampling rate
  32.6.2 How can I temporarily disable gprof’s output while still linking it in?
  32.6.3 Why isn’t there a command line option for it?
  32.6.4 Why don’t my assembly routines register properly with mcount?
  32.6.5 Why is the call graph wrong when a routine was called from an assembly function?
  32.6.6 What will gprof break?
33 Disk Partition Interpreter: liboskit_diskpart.a
 33.1 Introduction
 33.2 Supported Partitioning Schemes
 33.3 Example Use
  33.3.1 Reading the partition table
  33.3.2 Using Partition Information
 33.4 Restrictions
  33.4.1 Endian
  33.4.2 Nesting
  33.4.3 Lookup
 33.5 API reference
  33.5.1 diskpart_get_partition: initialize an array of partition entries
  33.5.2 diskpart_read_func: read a disk sector (user-provided callout)
  33.5.3 diskpart_blkio_get_partition: initialize an array of partition entries
  33.5.4 diskpart_fill_entry: initialize a single partition entry
  33.5.5 diskpart_dump: print a partition entry to stdout
  33.5.6 diskpart_lookup_bsd_compat: search for a partition entry
  33.5.7 diskpart_lookup_bsd_string: search for a partition entry
  33.5.8 diskpart_blkio_lookup_bsd_string: search for a partition entry
  33.5.9 diskpart_get_type : Search for type type partitions
34 File System Reader: liboskit_fsread.a
 34.1 Introduction
 34.2 External dependencies
 34.3 Limitations
 34.4 API reference
  34.4.1 fsread_open: Open a file on various filesystems
  34.4.2 fsread_FSTYPE _open: Open a file on the FSTYPE filesystem
35 Executable Program Interpreter: liboskit_exec.a
 35.1 Header Files
  35.1.1 exec.h: definitions for executable interpreter functions
  35.1.2 a.out.h: semi-standard a.out file format definitions
  35.1.3 elf.h: standard 32-bit ELF file format definitions
 35.2 Types
  35.2.1 exec_read_func_t: executable file reader callback
  35.2.2 exec_read_exec_func_t: executable file reader callback
  35.2.3 exec_sectype_t: section type flags word
  35.2.4 exec_info_t: executable information structure
 35.3 Function Reference
  35.3.1 exec_load: detect the type of an executable file and load it
  35.3.2 exec_load_elf: load a 32-bit ELF executable file
  35.3.3 exec_load_aout: load an a.out-format executable file
36 Linux File Systems: liboskit_linux_fs.a
  36.0.4 fs_linux_init: Initialize the Linux fs library
  36.0.5 fs_linux_mount: Mount a filesystem via the Linux fs library
37 NetBSD File Systems: liboskit_netbsd_fs.a
  37.0.6 fs_netbsd_init: Initialize the NetBSD fs library
  37.0.7 fs_netbsd_mount: Mount a filesystem via the Netbsd fs library
38 Memory File System: liboskit_memfs.a
  38.0.8 oskit_memfs_init: initialize MEMFS filesystem
  38.0.9 oskit_memfs_file_set_contents: replace contents of a MEMFS file
39 FreeBSD Networking: liboskit_freebsd_net.a
 39.1 Introduction
 39.2 Header Files
  39.2.1 freebsd.h: definitions for the FreeBSD-derived networking code
 39.3 Interfaces
  39.3.1 oskit_freebsd_net_init: initialize the networking code
  39.3.2 oskit_freebsd_net_open_ether_if: find and open an ethernet interface
  39.3.3 oskit_freebsd_net_open_first_ether_if: find and open first ethernet interface
  39.3.4 oskit_freebsd_net_close_ether_if: close an ethernet interface
  39.3.5 oskit_freebsd_net_ifconfig: configure an interface
  39.3.6 oskit_freebsd_net_add_default_route: set a default route
40 BOOTP Support: liboskit_bootp.a
 40.1 Introduction
 40.2 External Dependencies
 40.3 API reference
  40.3.1 bootp_net_info: BOOTP protocol information structures
  40.3.2 bootp_gen: Generate a BOOTP protocol request
  40.3.3 bootp: Generate a BOOTP protocol request (simple interface)
  40.3.4 bootp_free: Free the result of a BOOTP request
  40.3.5 bootp_dump: Dump the result of a BOOTP via printf
41 HPFQ: Hierarchical Network Link Sharing: liboskit_hpfq.a
 41.1 Introduction
 41.2 Configuration
 41.3 Usage
 41.4 API reference
 41.5 External Requirements and Constructors
  41.5.1 oskit_pfq_root: the root node scheduler
  41.5.2 oskit_pfq_reset_path: pointer to the reset_path function
  41.5.3 pfq_sff_create_root: create a root node implementing SFF
  41.5.4 pfq_ssf_create_root: create a root node implementing SSF
  41.5.5 pfq_sff_create: create an intermediate node implementing SFF
  41.5.6 pfq_ssf_create: create an intermediate node implementing SSF
  41.5.7 pfq_leaf_create: create a leaf node
 41.6 pfq_sched: Interface to PFQ Schedulers
  41.6.1 pfq_sched_add_child: add a child to a root or intermediate node
  41.6.2 pfq_sched_remove_child: remove a child from a root or intermediate node
  41.6.3 pfq_sched_set_share: allocate a percentage of the parent’s bandwidth
 41.7 pfq_leaf: Interface to PFQ Leaf Nodes
  41.7.1 pfq_leaf_add_child: add a child to a root or intermediate node
  41.7.2 pfq_leaf_remove_child: remove a child from a root or intermediate node
  41.7.3 pfq_leaf_set_share: allocate a percentage of the parent’s bandwidth
  41.7.4 pfq_leaf_get_netio: get the oskit_netio corresonding to this leaf
42 Packet Dispatcher: liboskit_pd.a
 42.1 Introduction
 42.2 Example Use
 42.3 Restrictions
 42.4 Sanity checking
 42.5 API reference
  42.5.1 oskit_packet_dispatcher_create: Create a packet dispatcher object
  42.5.2 oskit_packet_dispatcher_register: Register an packet owner
  42.5.3 oskit_packet_dispatcher_delete: Disassociate a packet owner / packet pair
43 Linux Driver Set: liboskit_linux_dev.a
 43.1 Initialization and Registration
  43.1.1 oskit_linux_init_devs: Initialize and register all known drivers
  43.1.2 oskit_linux_init_net: Initialize and register known network drivers
  43.1.3 oskit_linux_init_ethernet: Initialize and register known Ethernet network drivers
  43.1.4 oskit_linux_init_scsi: Initialize and register known SCSI disk drivers
  43.1.5 oskit_linux_init_ide: Initialize and register known IDE disk drivers
  43.1.6 oskit_linux_init_scsi_name : Initialize and register a specific SCSI disk driver
  43.1.7 oskit_linux_init_ethernet_name : Initialize and register a specific Ethernet network driver
 43.2 Obtaining object references
  43.2.1 oskit_linux_block_open: Open a disk given its Linux name
  43.2.2 oskit_linux_block_open_kdev: Open a disk given its Linux kdev
  43.2.3 oskit_linux_netdev_find: Open a netcard given its Linux name
  43.2.4 oskit_linux_net_open: Open a netcard given its Linux name
 43.3 Introduction
 43.4 Partially-compliant Drivers
 43.5 Internals
  43.5.1 Namespace Management Rules
  43.5.2 Variables
  43.5.3 Functions
  43.5.4 Directory Structure
 43.6 Block device drivers
 43.7 Network drivers
 43.8 SCSI drivers
44 FreeBSD Driver Set: liboskit_freebsd_dev.a
 44.1 Introduction
 44.2 Supported Devices
 44.3 Header Files
  44.3.1 freebsd.h: common device driver framework definitions
 44.4 Interfaces
  44.4.1 oskit_freebsd_init: Initialize and FreeBSD device driver support package
  44.4.2 oskit_freebsd_init_devs: Initialize and register all FreeBSD device drivers
  44.4.3 oskit_freebsd_init_isa: Initialize and register all FreeBSD ISA bus device drivers
  44.4.4 oskit_freebsd_init_driver : Initialize and register a single FreeBSD device driver
 44.5 “Back door” Interfaces
  44.5.1 oskit_freebsd_chardev_open: Open a character device using a FreeBSD major/minor device value
  44.5.2 oskit_freebsd_xlate_errno: Translate a FreeBSD error number
45 Video Support: liboskit_video.a
 45.1 Introduction
 45.2 X11 S3 Video Library
  45.2.1 So how do I use this?
  45.2.2 Dependencies
  45.2.3 API reference
  45.2.4 s3_init_framebuffer: Initializes the s3 video code
  45.2.5 s3_cmap_write: Write a colormap entry
  45.2.6 s3_cmap_read: Read a colormap entry
  45.2.7 s3_cmap_fg_index: Return the colormap index for the foreground color
 45.3 Svgalib Video Library
  45.3.1 So how do I use this?
  45.3.2 Dependencies
V  Utilities
46 Network Booting
 46.1 Introduction
 46.2 Implementation Issues and Requirements
 46.3 Using NetBoot
  46.3.1 Booting Another OS
  46.3.2 Getting Help
  46.3.3 Quitting
VI  The Legal Stuff
47 Copyrights and Licenses
 47.1 Copyrights & Licenses
 47.2 Contributors
 47.3 Acknowledgements
  47.3.1 liboskit_diskpart.a
  47.3.2 liboskit_exec.a
  47.3.3 liboskit_freebsd_{dev,net,m}.a
  47.3.4 liboskit_kern.a
  47.3.5 liboskit_libc.a
  47.3.6 Various OSKit header files
  47.3.7 liboskit_netbsd_fs.a
  47.3.8 liboskit_netbsd_uvm.a