Next: 10.2 Machine-independent Facilities
Up: 10.1 Introduction
Previous: 10.1.2 Generic versus Base
Following is a brief summary of the main facilities provided by the library,
indexed by the section numbers of the sections describing each facility:
- 10.2
-
Machine-independent Facilities:
Types and constants describing machine-dependent information
such as word size and page size.
For example, types are provided which, if used properly,
allow machine-independent code
to compile easily on both 32-bit and 64-bit architectures.
Also, functions are provided for various generic operations
such as primitive multiprocessor synchronization
and efficient bit field manipulation.
- 10.3
-
(X86) Generic Low-level Definitions:
Header files describing x86 processor data structures and registers,
as well as functions to access and manipulate them.
Includes:
- Bit definitions of the contents of the flags,
control, debug, and floating point registers.
- Inline functions and macros to read and write
the flags, control, debug, segment registers,
and descriptor registers (IDTR, GDTR, LDTR, TR).
- Macros to read the Pentium timestamp counter
(useful for fine-grained timing and benchmarking)
and the stack pointer.
- Structure definitions for architectural data structures
such as far pointers, segment and gate descriptors,
task state structures, floating point save areas,
and page tables,
as well as generic functions to set up these structures.
- Symbolic definitions of the processor trap vectors.
- Macros to access I/O ports
using the x86's in and out instructions.
- Assembly language support macros
to smooth over the differences in target object formats,
such as ELF versus a.out.
- 10.4
-
(X86 PC) Generic Low-level Definitions:
Generic definitions for standard parts of the PC architecture,
such as IRQ assignments, the programmable interrupt controller (PIC),
and the keyboard controller.
- 10.5
-
(X86) Processor Identification and Management:
Functions to identify the CPU and available features,
to enter and leave protected mode,
and to enable and disable paging.
- 10.6-10.10
-
(X86) Base Environment Setup:
Functions that can be used individually or as a unit
to set up a basic, minimal kernel execution environment
on x86 processors:
e.g., a minimal GDT, IDT, TSS, and kernel page tables.
- 10.11-10.13
-
(X86 PC) Base Environment Setup:
Functions to set up a PC's programmable interrupt controller (PIC)
and standard IRQ vectors,
to manage a PC's low (1MB), middle (16MB) and upper memory,
and to provide simple non-interrupt-driven console support.
- 10.14
-
(X86 PC) MultiBoot Startup:
Complete startup code to allow the kernel to be booted
from any MultiBoot-compliant boot loader easily.
Includes code to parse options and environment variables
passed to the kernel by the boot loader,
and to find and use boot modules loaded with the kernel.
- 10.15
-
(X86 PC) Raw BIOS Startup:
Complete startup code for boot loaders and other programs
that need to be loaded directly by the BIOS at boot time.
This startup code takes care of all aspects
of switching from real to protected mode
and setting up a 32-bit environment,
and provides mechanisms to call back to 16-bit BIOS code
by running the BIOS in either real mode or v86 mode (your choice).
- 10.16
-
(X86 PC) DOS Startup:
This startup code is similar to the BIOS startup code,
but it expects to be loaded in a 16-bit DOS environment:
useful for DOS-based boot loaders, DOS extenders,
or prototype kernels that run under DOS.
Again, this code fully handles mode switching
and provides DOS/BIOS callback mechanisms.
- 10.17
-
Kernel Debugging Facilities:
A generic, machine-independent remote GDB stub is provided
which supports the standard serial-line GDB protocol.
In addition, machine-dependent default trap handling
and fault-safe memory access code is provided
to allow the debugging stub to be used ``out of the box'' on x86 PCs.
- 10.19
-
Kernel Annotation Facility:
Macros and functions to associate additional information with ranges
of kernel text or data.
Annotations allow, for example, a kernel to mark a range of kernel
text so that a special function is invoked whenever an exception
or interrupt occurs within that range.
This facility is useful for implementing rollback routines.
Next: 10.2 Machine-independent Facilities
Up: 10.1 Introduction
Previous: 10.1.2 Generic versus Base
University of Utah Flux Research Group