Expand description
Strat9-OS Kernel (Bedrock)
A minimal microkernel handling:
- Scheduling
- IPC (Inter-Process Communication)
- Memory primitives
- Interrupt routing
Everything else runs as userspace component servers.
Re-exports§
pub use boot::dtb_boot::kmain;
Modules§
- acpi
- ACPI (Advanced Configuration and Power Interface) support. Inspired by Theseus OS, MaestroOS, Aero, and Redox.
- arch
- async_
io - Asynchronous I/O subsystem.
- audit
- Kernel audit log for security-sensitive operations.
- boot
- Boot subsystem
- capability
- Capability-based Security System
- components
- Kernel component declarations : Strat9-OS boot orchestration.
- crypto
- Cryptographic verification for CMOD modules.
- debug
- debug_
cfg - Centralised debug configuration.
- dma
- DMA (Direct Memory Access) safety abstractions.
- entropy
- Kernel entropy pool : a cryptographically sound random bytes from interrupt noise.
- framebuffer
- hal
- Hardware Abstraction Layer (HAL) for multi-architecture support.
- hardware
- Hardware integration layer.
- ipc
- Inter-Process Communication (IPC) subsystem.
- kaslr
- Kernel Address Space Layout Randomization (KASLR).
- memory
- namespace
- Minimal namespace binding (temporary global table).
- ostd
- OSTD-like (OS Trusted Domain) abstraction layer for Strat9-OS
- process
- Process and Task Management
- shell
- Chevron shell - Minimal interactive kernel shell
- silo
- Silo manager (kernel-side, minimal mechanisms only)
- sync
- syscall
- Strat9-OS Syscall Interface
- trace
- Lightweight kernel trace buffers for low-level debugging.
- vfs
- Virtual File System (VFS) - Plan 9-inspired namespace.
- x86_
crate_ shim - Unified access to the
x86_64crate surface used by shared code. On x86_64 this IS the real crate; on riscv64 it is the panicking stub.
Macros§
- boot_
milestone - Log a boot milestone with elapsed time since kernel entry.
- e9_mark
- Raw e9 debugcon marker: writes a single byte to port 0xe9 using inline asm. This works even when the Port type from x86_64 crate doesn’t.
- e9_
print - e9_
println - early_
print - Early print macro without newline
- early_
println - Early print macro for bootstrap debugging (before full logger is ready)
- n1_safe
- Marks a function or module as N1 (Type-Safe IPC) compliant.
- serial_
force_ println - Print to serial port with newline, bypassing the shared mutex.
- serial_
print - Print to serial port
- serial_
println - Print to serial port with newline
- shell_
print - Print to both serial and VGA.
- shell_
println - Print to both serial and VGA with newline, then flush to screen.
- trace_
mem - vga_
print - Print to framebuffer console (falls back to serial when unavailable).
- vga_
println - Print line to framebuffer console (falls back to serial when unavailable). Flushes to screen after each line.
Constants§
Statics§
- BOOT_
ARGS 🔒 - Global pointer to KernelArgs, set once during early boot. Components use this to access boot-time information (framebuffer, memory map, etc.).
- MMAP_
WORK 🔒 - Static working buffer for the boot memory map (off stack to avoid overflow).
Functions§
- align_
down 🔒 - Performs the align down operation.
- align_
up 🔒 - Performs the align up operation.
- boot_
args - Get the boot arguments. Returns
Noneif called beforekernel_main. - count_
free_ 🔒like_ regions - init_
apic_ 🔒subsystem - Initialize the APIC subsystem (Local APIC + I/O APIC + APIC Timer).
- init_
components - Initialize kernel components using the component system
- init_
logger - Initialize the logger (uses serial)
- init_
serial - Initialize serial output
- kernel_
main ⚠ - Main kernel initialization - called by bootloader entry points
- log_
boot_ 🔒module_ magics - Performs the log boot module magics operation.
- null_
region 🔒 - Performs the null region operation.
- panic_
handler 🔒 - Kernel panic handler
- register_
boot_ 🔒modules - Register modules from the validated bootloader module table.
- register_
initfs_ 🔒module - Register a validated physical module with exactly one HHDM conversion.
- reserve_
range_ 🔒in_ map - Performs the reserve range in map operation.
- virt_
or_ 🔒phys_ to_ phys - Performs the virt or phys to phys operation.