Structsยง
- Ansi
Styling ๐Writer - Boot
Prefix ๐Writer
Constantsยง
- ANSI_
GREEN ๐ - ANSI_
RED ๐ - ANSI_
RESET ๐ - ANSI_
VIOLET ๐ - TOKEN_
BUF_ ๐CAP
Staticsยง
- BOOT_
LOG_ ๐PREFIX_ ENABLED - CMDLINE_
BUF ๐ - Fixed-size buffer for kernel cmdline (up to 2KB). SAFETY: Written once during early boot (single-threaded, IRQs disabled), then read-only. Safe for concurrent reads after initialization.
- CMDLINE_
LEN ๐ - CMDLINE_
READY ๐ - FORCE_
LOCK ๐ - Raw spinlock for
_print_forceto prevent multi-core character interleaving. Uses a ticket-style test-and-set: 0 = free, 1 = locked. - PANIC_
IN_ ๐PROGRESS - Flag indicating if the kernel is in a panic state. When true, serial output bypasses all locks to ensure messages are displayed.
- SERIAL1 ๐
- Global serial port instance
- SERIAL_
AT_ ๐LINE_ START
Functionsยง
- enter_
emergency_ mode - Signal that the kernel has entered an emergency panic state.
- force_
lock_ ๐acquire - force_
lock_ ๐release - get_
cmdline - Returns the stored kernel cmdline for
/proc/cmdline. - init
- Initialize the serial port
- is_
hex_ ๐word - Returns whether hex word.
- is_
token_ ๐char - Returns whether token char.
- parse_
cmdline โ - Parse kernel cmdline from Limine boot arguments.
- set_
boot_ log_ prefix_ enabled - Enable or disable Linux-style boot timestamps at the beginning of each line.