Module common

Source
Expand description

Common helper routines for all loaders.

Structs§

UnsupportedMmio
Returned when the MMIO layout is not supported.

Constants§

DEFAULT_GDT_SIZE
The size of the default GDT table, in bytes.

Functions§

compute_variable_mtrrs
Computes the x86 variable MTRRs that describe the given memory layout. This is intended to be used to setup MTRRs for booting a guest with two mmio gaps, such as booting Linux, UEFI, or PCAT.
import_default_gdt
Import a default GDT at the given address, with one page imported. The GDT is used with cs as entry 1, and data segments (ds, es, fs, gs, ss) as entry 2. Registers using the GDT are imported with vtl 0 only.