Expand description
Console rendering mode selection.
The framebuffer console has two very different cost profiles:
Full: the complete graphical console: decorative boot art, status bar, scrollback scrollbar, mouse/text cursors, dirty-rect double buffering. This is what interactive use (top, panels, TUI) expects.Lite: a deliberately boring, DOS-like text console: no decoration, no status bar, no cursor sprites, no scrollbar, no graphical UI. Every line of text still reaches the screen, but the only pixels written are glyph cells, and scrolling is a single bulk row move.Serial: no framebuffer touches at all:/dev/vasistasstays absent and everything is logged to COM1. On a laptop this makes boot as fast as the hardware allows, and debugging happens over a USB-serial adapter (or QEMU-serial file:).
Selection is a boot parameter so a machine can be switched without
recompiling: console.mode=lite (see /boot/strat9.cfg on the ESP).
Without an explicit value we pick Lite on bare metal and Full under a
hypervisor, where the graphical console is known to be cheap and is also
what the test suite screenshots.
Re-exportsยง
use core::sync::atomic::AtomicU32;๐use core::sync::atomic::AtomicU8;๐use core::sync::atomic::Ordering;๐use strat9_abi::boot::KernelArgs;๐
Enumsยง
- Console
Mode - Framebuffer console rendering mode.
Constantsยง
- DEFAULT_
FPS ๐ - Default console refresh rate.
- TIMER_
HZ ๐ - Timer tick rate, matching
PRESENT_MIN_TICKSin the framebuffer layer.
Staticsยง
- CONSOLE_
MODE ๐ - 0 means โnot selected yetโ.
- PRESENT_
INTERVAL_ ๐TICKS - Frame budget in scheduler ticks (0 = not configured).
Functionsยง
- current
- Currently selected console mode.
- decode ๐
- hypervisor_
present ๐ CPUID.01H:ECX[31]: a hypervisor is present.- is_lite
- True when the lightweight text console is active.
- is_
serial - True when the framebuffer must not be touched at all.
- present_
min_ ticks - Minimum number of scheduler ticks between two console presents.
- select
- Pick and publish the console mode from the boot environment.