Expand description
Minimal VGA peripheral implementation for the Tock x86_q35 chip crate.
Supports classic 80×25 text mode out-of-the-box and exposes a stub for setting planar 16-colour graphics modes (640×480 and 800×600). These extra modes will be filled in later once the driver is integrated with a future framebuffer capsule.
NOTE!!!
This file compiles and provides working text- mode console support so the board can swap from the UART mux to a VGA console. Graphical modes are disabled at runtime until a framebuffer capsule implementation lands. The low-level register writes for 640×480 and 800×600 are nonetheless laid out so they can be enabled by flipping a constant.
VGA peripheral driver for the x86_q35 chip.
The driver currently focuses on text mode (colour attribute buffer at
0xB8000). It also defines VgaMode
and an [init
] routine that writes
the necessary CRT controller registers for text mode and two common planar
16-colour modes. Other code (e.g. the board crate) can query the selected
mode via kernel::config::CONFIG.vga_mode
and decide whether to route the
ProcessConsole
to this driver or to the legacy serial mux.
Structs§
- Color
Code - Packed VGA attribute byte for text mode: bits 0–3 = foreground color; 4–6 = background color; 7 = blink/bright (mode-dependent).
- Vga
- Simple text-mode VGA console.
- VgaDevice
- Low-level VGA controller (global mode/programming).
This configures the hardware; it is not tied to a particular
Vga
writer.