From 9ad0dd18562293631d40e0b3d32646a8e14ad4ca Mon Sep 17 00:00:00 2001 From: Mark Harmstone Date: Wed, 2 Oct 2019 12:43:30 +0100 Subject: [PATCH] [FREELDR] Retrieve the correct ACPI RSDP table address. (#1951) Use either the RSDT (ACPI 1.0) or the XSDT (ACPI >1.0). This fixes ACPI issues with Vista on VirtualBox. --- boot/freeldr/freeldr/arch/i386/hwacpi.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/boot/freeldr/freeldr/arch/i386/hwacpi.c b/boot/freeldr/freeldr/arch/i386/hwacpi.c index dcaad2d82df..345e2c607aa 100644 --- a/boot/freeldr/freeldr/arch/i386/hwacpi.c +++ b/boot/freeldr/freeldr/arch/i386/hwacpi.c @@ -94,7 +94,18 @@ DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber) /* Fill the table */ AcpiBiosData = (PACPI_BIOS_DATA)&PartialResourceList->PartialDescriptors[1]; - AcpiBiosData->RSDTAddress.LowPart = Rsdp->rsdt_physical_address; + + if (Rsdp->revision > 0) + { + TRACE("ACPI >1.0, using XSDT address\n"); + AcpiBiosData->RSDTAddress.QuadPart = Rsdp->xsdt_physical_address; + } + else + { + TRACE("ACPI 1.0, using RSDT address\n"); + AcpiBiosData->RSDTAddress.LowPart = Rsdp->rsdt_physical_address; + } + AcpiBiosData->Count = PcBiosMapCount; memcpy(AcpiBiosData->MemoryMap, PcBiosMemoryMap, PcBiosMapCount * sizeof(BIOS_MEMORY_MAP)); -- 2.17.1