From 9356af80c60cd6690dde3858d1ffb26b1c235ddb Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 30 Sep 2019 16:46:21 +0100 Subject: [PATCH] arch: Mark the PCI MMCONFIG region as reserved in the E820 tables The PCI Express Firmware specification says that the region may be included in the E820 tables (but it must always be in the ACPI tables.) Signed-off-by: Rob Bradford --- arch/src/x86_64/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/src/x86_64/mod.rs b/arch/src/x86_64/mod.rs index 0108fb6c8..28b357b17 100644 --- a/arch/src/x86_64/mod.rs +++ b/arch/src/x86_64/mod.rs @@ -22,6 +22,7 @@ use vm_memory::{ }; const E820_RAM: u32 = 1; +const E820_RESERVED: u32 = 2; // This is a workaround to the Rust enforcement specifying that any implementation of a foreign // trait (in this case `DataInit`) where: @@ -162,6 +163,13 @@ pub fn configure_system( } } + add_e820_entry( + &mut params.0, + layout::PCI_MMCONFIG_START.0, + layout::PCI_MMCONFIG_SIZE, + E820_RESERVED, + )?; + #[cfg(feature = "acpi")] { let start_of_device_area = if mem_end < layout::MEM_32BIT_RESERVED_START {