Expand description
Kernel entry point and early-boot global state.
Authors: MarioS271
Modulesยง
- arch ๐
- Architecture-specific subsystems: GDT, TSS, IDT, and interrupt controllers.
- config ๐
- Global Compile-Time Kernel Configuration
- logging ๐
- Kernel logging: serial output and the [
kprint!] macro. - mem ๐
- Memory subsystem: physical memory manager, virtual memory manager, and heap allocator.
- panic ๐
- Kernel panic paths:
kernel_panicfor explicit kernel panics and the required#[panic_handler]for language-level panics. - screen ๐
- Screen output: linear framebuffer access and PSF2 font rendering.
- state ๐
- Global kernel state: [
KState] aggregate and [KStateSubCategory] trait. - types ๐
- Shared kernel types:
IrqMutex,FmtBuffer,AlignedStack, and panic codes.
Macrosยง
- kalert
- Log a line at alert severity (action must be taken immediately).
- kcrit
- Log a line at critical severity.
- kdebug
- Log a line at debug severity; compiled out unless the
debug-loggingfeature is enabled. - kemerg
- Log a line at emergency severity (system is unusable).
- kerror
- Log a line at error severity.
- kinfo
- Log a line at info severity.
- kprint
- Print a formatted message (like
print!) to all active kernel output sinks. - kwarn
- Log a line at warning severity.
Structsยง
- Simple
Kernel ๐State - Early-boot singleton resources; written once in
kmain, then read-only.
Staticsยง
- LIMINE_
FRAMEBUFFER_ ๐REQUEST - Limine request for the linear framebuffer.
- LIMINE_
HHDM_ ๐REQUEST - Limine request for the Higher-Half Direct Map (HHDM) offset.
- LIMINE_
MEMMAP_ ๐REQUEST - Limine request for the physical memory map.
- SIMPLE_
STATE ๐ - Global early-boot state, readable from anywhere in the kernel once initialized.
Functionsยง
- kmain ๐
- Kernel entry point called by the Limine bootloader; runs boot init and never returns.