Next:
13.1 Introduction
Up:
Part III: Function Libraries
Previous:
12.9.3 hexdump: print a
13 Kernel Support Library:
liboskit_kern.a
13.1 Introduction
13.1.1 Machine-dependence of code and interfaces
13.1.2 Generic versus Base Environment code
13.1.3 Road Map
13.2 Machine-independent Facilities
13.2.1
page.h
: Page size definitions
13.2.2
spin_lock.h
: Spin locks
13.2.3
queue.h
: Generic queues
13.2.4
debug.h
: debugging support facilities
13.2.5
base_critical
: simple critical section support
(X86) Generic Low-level Definitions
13.3.1
asm.h
: assembly language support macros
13.3.2
eflags.h
: Processor flags register definitions
13.3.3
proc_reg.h
: Processor register definitions and accessor functions
13.3.4
debug_reg.h
: Debug register definitions and accessor functions
13.3.5
fp_reg.h
: Floating point register definitions and accessor functions
13.3.6
far_ptr.h
: Far (segment:offset) pointers
13.3.7
pio.h
: Programmed I/O functions
13.3.8
seg.h
: Segment descriptor data structure definitions and constants
13.3.9
gate_init.h
: Gate descriptor initialization support
13.3.10
trap.h
: Processor trap vectors
13.3.11
paging.h
: Page translation data structures and constants
13.3.12
tss.h
: Processor task save state structure definition
(X86 PC) Generic Low-level Definitions
13.4.1
irq_list.h
: Standard hardware interrupt assignments
13.4.2
pic.h
: Programmable Interrupt Controller definitions
13.4.3
keyboard.h
: PC keyboard definitions
13.4.4
rtc.h
: NVRAM Register locations
(X86) Processor Identification and Management
13.5.1
cpu_info
: CPU identification data structure
13.5.2
cpuid
: identify the current CPU
13.5.3
cpu_info_format
: output a cpu_info structure in ASCII form
13.5.4
cpu_info_min
: return the minimum feature set of two CPU information structures
13.5.5
cpu_info_dump
: pretty-print a CPU information structure to the console
13.5.6
i16_enter_pmode
: enter protected mode
13.5.7
i16_leave_pmode
: leave protected mode
13.5.8
paging_enable
: enable page translation
13.5.9
paging_disable
: disable page translation
13.5.10
gate_init
: install gate descriptors
(X86) Base Environment
13.6.1 Memory Model
13.6.2
base_vm.h
: definitions for the base virtual memory environment
13.6.3
base_cpu_setup
: initialize and activate the base CPU environment
13.6.4
base_cpu_init
: initialize the base environment data structures
13.6.5
base_cpu_load
: activate the base processor execution environment
13.6.6
base_cpuid
: global variable describing the processor
13.6.7
base_stack.h
: default kernel stack
(X86) Base Environment: Segmentation Support
13.7.1
base_gdt
: default global descriptor table for the base environment
13.7.2
base_gdt_init
: initialize the base GDT to default values
13.7.3
base_gdt_load
: load the base GDT into the CPU
13.7.4
base_idt
: default interrupt descriptor table
13.7.5
base_idt_load
: load the base IDT into the current processor
13.7.6
base_tss
: default task state segment
13.7.7
base_tss_init
: initialize the base task state segment
13.7.8
base_tss_load
: load the base TSS into the current processor
(X86) Base Environment: Trap Handling
13.8.1
trap_state
: saved state format used by the default trap handler
13.8.2
base_trap_init
: initialize the processor trap vectors in the base IDT
13.8.3
base_trap_inittab
: initialization table for the default trap entrypoints
13.8.4
base_trap_handlers
: Array of handler routines for hardware traps
13.8.5
base_trap_default_handler
: default trap handler for unexpected traps
13.8.6
trap_dump
: dump a saved trap state structure
13.8.7
trap_dump_panic
: dump a saved trap state structure
(X86) Base Environment: Page Translation
13.9.1
base_paging_init
: create minimal kernel page tables and enable paging
13.9.2
base_pdir_pa
: initial kernel page directory
13.9.3
pdir_find_pde
: find an entry in a page directory given a linear address
13.9.4
ptab_find_pte
: find an entry in a page table given a linear address
13.9.5
pdir_find_pte
: look up a page table entry from a page directory
13.9.6
pdir_get_pte
: retrieve the contents of a page table entry
13.9.7
ptab_alloc
: allocate a page table page and clear it to zero
13.9.8
ptab_free
: free a page table allocated using ptab_alloc
13.9.9
pdir_map_page
: map a 4KB page into a linear address space
13.9.10
pdir_unmap_page
: unmap a single 4KB page mapping
13.9.11
pdir_map_range
: map a contiguous range of physical addresses
13.9.12
pdir_prot_range
: change the permissions on a mapped memory range
13.9.13
pdir_unmap_range
: remove a mapped range of linear addresses
13.9.14
pdir_clean_range
: free unused page table pages in a page directory
13.9.15
pdir_dump
: dump the contents of a page directory and all its page tables
13.9.16
ptab_dump
: dump the contents of a page table
(X86) Base Environment: Protected-mode entry and exit
(X86 PC) Base Environment: Physical Memory Management
13.11.1
phys_lmm.h
: Physical memory management for PCs
13.11.2
phys_mem_max
: Highest physical memory address
13.11.3
phys_lmm_init
: Initialize kernel physical memory LMM
13.11.4
phys_lmm_add
: Add memory to the kernel physical memory LMM
(X86 PC) Base Environment: Interrupt Support
13.12.1
base_irq.h
: Hardware interrupt definitions for standard PCs
13.12.2
base_irq_handlers
: Array of handler routines for hardware interrupts
13.12.3
base_irq_init
: Initialize hardware interrupts
13.12.4
base_irq_inittab
: initialization table for default interrupt entrypoints
13.12.5
base_irq_default_handler
: default IRQ handler for unexpected interrupts
13.12.6
base_irq_nest
: interrupt nesting counter and software interrupt flag
13.12.7
base_irq_softint_request
: request a software interrupt
13.12.8
base_irq_softint_handler
: handler for software interrupts
(X86 PC) Base Environment: Console Support
13.13.1
base_console.h
: definitions for base console support
13.13.2
base_console_init
: Initialize the base console
13.13.3
base_cooked_termios
: Default
termios
setting for cooked-mode console
13.13.4
base_raw_termios
: Default
termios
setting for raw-mode console
13.13.5
direct_cons_getchar
: wait for and read a character from the keyboard
13.13.6
direct_cons_putchar
: write a character to the video console
13.13.7
direct_cons_trygetchar
: read an available character from the keyboard
13.13.8
com_cons_init
: initialize a serial port
13.13.9
com_cons_getchar
: wait for and read a character from a serial port
13.13.10
com_cons_putchar
: write a character to a serial port
13.13.11
com_cons_flush
: delay until all output is flushed on a serial line
13.13.12
com_cons_enable_receive_interrupt
: enable receive interrupts on a serial port
(X86 PC) MultiBoot Startup
13.14.1 Startup code organization
13.14.2 Startup sequence
13.14.3 Memory model
13.14.4 Command-line arguments
13.14.5 Linking MultiBoot kernels
13.14.6
multiboot.h
: Definitions of MultiBoot structures and constants
13.14.7
boot_info
: MultiBoot information structure
13.14.8
multiboot_main
: general MultiBoot initialization
13.14.9
base_multiboot_init_mem
: physical memory initialization
13.14.10
base_multiboot_init_cmdline
: command-line preprocessing
13.14.11
base_multiboot_find
: find a MultiBoot boot module by name
13.14.12 Multiboot Specification
(X86 PC) Raw BIOS Startup
(X86 PC) DOS Startup
13.17 Remote Kernel Debugging with GDB
13.17.1 Organization of remote GDB support code
13.17.2 Using the remote debugging code
13.17.3 Debugging address spaces other than the kernel's
13.17.4
gdb_state
: processor register state frame used by GDB
13.17.5
gdb_trap
: default trap handler for remote GDB debugging
13.17.6
gdb_copyin
: safely read data from the subject's address space
13.17.7
gdb_copyout
: safely write data into the subject's address space
13.17.8
gdb_trap_recover
: recovery pointer for safe memory transfer routines
13.17.9
gdb_signal
: vector to GDB trap/signal handler routine
13.17.10
gdb_set_trace_flag
: enable or disable single-stepping in a state frame
13.17.11
gdb_breakpoint
: macro to generate a manual instruction breakpoint
13.18 Serial-line Remote Debugging with GDB
13.18.1 Redirecting console output to the remote debugger
13.18.2
gdb_serial_signal
: primary event handler in the GDB stub
13.18.3
gdb_serial_exit
: notify the remote debugger that the subject is dead
13.18.4
gdb_serial_getchar
: input a character from the remote debugger's console
13.18.5
gdb_serial_putchar
: output a character to the remote debugger's console
13.18.6
gdb_serial_puts
: output a line to the remote debugger's console
13.18.7
gdb_serial_recv
: vector to GDB serial line receive function
13.18.8
gdb_serial_send
: vector to GDB serial line send function
gdb_pc_com_init
: (X86 PC) set up serial-line debugging over a COM port
13.19 Annotations
anno.h
: (X86) generic macros to place annotations in kernel code.
13.19.2
anno_dump
: dump all annotation tables
13.19.3
anno_find_exact
: find annotation table exactly entry matching a value.
13.19.4
anno_find_lower
: find greatest annotation table entry below a value.
13.19.5
anno_init
: initialize annotation tables and sort the entries.
anno_intr
: (X86) interrupt annotations
anno_trap
: (X86) trap annotations
13.20 Boot Module Filesystem
13.20.1
start_fs_bmod
: Create the BMOD filesystem
13.21 Signals
13.21.1
oskit_sendsig_init
: initialize kernel signal delivery
13.21.2
oskit_sendsig
: deliver a signal
13.21.3
sendsig_trap_handler
: convert trap into a signal
Utah Flux Research Group