Expand description
Wide-store helpers for the linear framebuffer.
The early boot console (live debug overlay) and the panic screen draw
without the VgaWriter, so they cannot use its SIMD blit path. They used
to write one pixel at a time with write_volatile, and to scroll with
core::ptr::copy (which lowers to rep movsb).
On real hardware the framebuffer is MMIO behind PCIe: a byte/word store is
one bus transaction, so rep movsb to uncached memory runs at a few MB/s
and the panel visibly repaints from top to bottom. These helpers emit
8-byte stores, which is the widest portable width without target features
(the pinned nightly miscompiles movntdq on x86_64-unknown-none), and
keeps the write-combining buffers fed.
Functions§
- bytes_
per_ pixel - Bytes per pixel for a supported GOP format (24 or 32).
- copy_
backward ⚠ - Backward copy of
bytesbytes with 8-byte granularity. - copy_
forward ⚠ - Forward copy of
bytesbytes with 8-byte granularity. - fence
- Fence write-combining stores so they become visible on the panel.
- fill_
pixels ⚠ - Fill
pixelsconsecutive pixels withcolor. - store_
row ⚠ - Store a row of
colors(one u32 per pixel) into the framebuffer.