pub struct AcpiTablesBuilder<'a, T: AcpiTopology> {
pub processor_topology: &'a ProcessorTopology<T>,
pub mem_layout: &'a MemoryLayout,
pub cache_topology: Option<&'a CacheTopology>,
pub with_ioapic: bool,
pub with_pic: bool,
pub with_pit: bool,
pub with_psp: bool,
pub pm_base: u16,
pub acpi_irq: u32,
}
Expand description
Builder to construct a set of BuiltAcpiTables
Fields§
§processor_topology: &'a ProcessorTopology<T>
The processor topology.
It is assumed that the MADT processor UID should start at 1 and enumerate each of these APIC IDs in turn.
mem_layout: &'a MemoryLayout
The memory layout of the VM.
cache_topology: Option<&'a CacheTopology>
The cache topology of the VM.
If and only if this is set, then the PPTT table will be generated.
with_ioapic: bool
If an ioapic is present.
with_pic: bool
If a PIC is present.
with_pit: bool
If a PIT is present.
with_psp: bool
If a psp is present.
pm_base: u16
base address of dynamic power management device registers
acpi_irq: u32
ACPI IRQ number
Implementations§
Source§impl<T: AcpiTopology> AcpiTablesBuilder<'_, T>
impl<T: AcpiTopology> AcpiTablesBuilder<'_, T>
Sourcepub fn build_acpi_tables<F>(
&self,
gpa: u64,
add_devices_to_dsdt: F,
) -> BuiltAcpiTables
pub fn build_acpi_tables<F>( &self, gpa: u64, add_devices_to_dsdt: F, ) -> BuiltAcpiTables
Build ACPI tables based on the supplied closure that adds devices to the DSDT.
The RDSP is assumed to take one whole page.
Returns tables that should be loaded at the supplied gpa.
Sourcepub fn build_acpi_tables_custom_dsdt(
&self,
gpa: u64,
dsdt: &[u8],
) -> BuiltAcpiTables
pub fn build_acpi_tables_custom_dsdt( &self, gpa: u64, dsdt: &[u8], ) -> BuiltAcpiTables
Build ACPI tables based on the supplied custom DSDT.
The RDSP is assumed to take one whole page.
Returns tables that should be loaded at the supplied gpa.
Sourcepub fn build_madt(&self) -> Vec<u8> ⓘ
pub fn build_madt(&self) -> Vec<u8> ⓘ
Helper method to construct an MADT without constructing the rest of the ACPI tables.
Sourcepub fn build_srat(&self) -> Vec<u8> ⓘ
pub fn build_srat(&self) -> Vec<u8> ⓘ
Helper method to construct an SRAT without constructing the rest of the ACPI tables.