Skip to main content

Crate strat9_kernel

Crate strat9_kernel 

Source
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_64 crate 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§

MAX_BOOT_MMAP_REGIONS_WORK 🔒
PAGE_SIZE 🔒

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 None if called before kernel_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.