[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.
This commit is contained in:
Mark Harmstone 2019-10-02 12:43:30 +01:00 committed by Hermès Bélusca-Maïto
parent f551caa840
commit 9ad0dd1856
No known key found for this signature in database
GPG Key ID: 3B2539C65E7B93D0

View File

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