https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ad0dd18562293631d40e0b3d32646a8e14ad4ca

commit 9ad0dd18562293631d40e0b3d32646a8e14ad4ca
Author:     Mark Harmstone <[email protected]>
AuthorDate: Wed Oct 2 12:43:30 2019 +0100
Commit:     Hermès Bélusca-Maïto <[email protected]>
CommitDate: Sat Oct 5 23:20:53 2019 +0200

    [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));

Reply via email to