Skip to main content

Module bootinfo

Module bootinfo 

Source
Expand description

s9vm : guest boot information page.

A world starts with a guest that must be told what its machine looks like: which memory ranges are usable, which virtual devices exist, where their MMIO pages are and which interrupt lines they use. Firmware (ACPI) is the long-term answer for a full operating system; this page is the direct, minimal interface for s9vm’s own guests and for early bring-up.

The layout is a fixed 512-byte little-endian structure with a magic, a version, bounds-checked counts and a fixed number of slots, so it can be parsed by a guest without allocating and cannot describe itself outside the page. Encoding and decoding live here as pure code and are host-tested; the kernel only computes the contents and copies them into guest memory.

Modules§

device_kind
Kind of a device.
flags
Flags.
memory_kind
Kind of a memory range.

Structs§

BootInfo
Boot information page.
DeviceEntry
One device.
MemoryEntry
One memory range.

Enums§

BootInfoError
Decoding error.

Constants§

MAGIC
Magic value: the ASCII bytes S9VMBOOT read as a little-endian u64.
MAX_DEVICE_ENTRIES
Maximum number of devices described.
MAX_MEMORY_ENTRIES
Maximum number of memory ranges described.
SIZE
Total size of the page.
VERSION
Layout version.

Functions§

get_u32 🔒
Reads a little-endian u32 at offset.
get_u64 🔒
Reads a little-endian u64 at offset.
put_u32 🔒
Writes a little-endian u32 at offset.
put_u64 🔒
Writes a little-endian u64 at offset.