SYSTEM_MEM_SIZE

Constant SYSTEM_MEM_SIZE 

Source
pub const SYSTEM_MEM_SIZE: u64 = _; // 263_168u64
Expand description

Size of memory region for system data.

We reserve the memory between the start of the EBDA up until the location of RSDP pointer, [0x9fc00, 0xe0000) for system data. This is 257 KiB of memory we is enough for our needs and future proof.

For ACPI we currently need:

FADT size: 276 bytes XSDT size: 52 bytes (header: 36 bytes, plus pointers of FADT and MADT) MADT size: 2104 bytes (header: 44 bytes, IO-APIC: 12 bytes, LocalAPIC: 8 * #vCPUS) DSDT size: 1907 bytes (header: 36 bytes, legacy devices: 345, GED: 161, VMGenID: 87, VirtIO devices: 71 bytes per device)

The above assumes a maximum of 256 vCPUs, because that’s what ACPI allows, but currently we have a hard limit of up to 32 vCPUs.

Moreover, for MPTable we need up to 5304 bytes (284 + 20 * #vCPUS) assuming again a maximum number of 256 vCPUs.

257KiB is more than we need, however we reserve this space for potential future use of ACPI features (new tables and/or devices).