Author: cgutman
Date: Mon Aug 15 01:19:20 2011
New Revision: 53247
URL:
http://svn.reactos.org/svn/reactos?rev=53247&view=rev
Log:
[HALACPI]
- Fix several bugs involving garbage data in a PHYSICAL_ADDRESS struct
Modified:
trunk/reactos/hal/halx86/generic/acpi/halacpi.c
Modified: trunk/reactos/hal/halx86/generic/acpi/halacpi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/acpi/ha…
==============================================================================
--- trunk/reactos/hal/halx86/generic/acpi/halacpi.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/generic/acpi/halacpi.c [iso-8859-1] Mon Aug 15 01:19:20 2011
@@ -166,6 +166,7 @@
if (Fadt)
{
/* Grab the DSDT address and assume 2 pages */
+ PhysicalAddress.HighPart = 0;
PhysicalAddress.LowPart = Fadt->dsdt;
TableLength = 2 * PAGE_SIZE;
@@ -263,6 +264,7 @@
{
/* Read the 32-bit physical address */
PhysicalAddress.LowPart = Rsdt->Tables[CurrentEntry];
+ PhysicalAddress.HighPart = 0;
}
else
{
@@ -603,6 +605,7 @@
PageCount = BYTES_TO_PAGES(NodeLength);
/* Allocate the memory */
+ PhysicalAddress.HighPart = 0;
PhysicalAddress.LowPart = HalpAllocPhysicalMemory(LoaderBlock,
0x1000000,
PageCount,
@@ -652,12 +655,13 @@
/* Find the RSDT */
Status = HalpAcpiFindRsdtPhase0(LoaderBlock, &AcpiMultiNode);
if (!NT_SUCCESS(Status)) return Status;
+
+ PhysicalAddress.QuadPart = AcpiMultiNode->RsdtAddress.QuadPart;
/* Map the RSDT */
if (LoaderBlock)
{
/* Phase0: Use HAL Heap to map the RSDT, we assume it's about 2 pages */
- PhysicalAddress.QuadPart = AcpiMultiNode->RsdtAddress.QuadPart;
MappedAddress = HalpMapPhysicalMemory64(PhysicalAddress, 2);
}
else