mirror of
https://github.com/reactos/reactos.git
synced 2025-01-07 14:51:00 +00:00
[HALACPI]
- Fix several bugs involving garbage data in a PHYSICAL_ADDRESS struct svn path=/trunk/; revision=53247
This commit is contained in:
parent
21406f7ff3
commit
0819e297e7
1 changed files with 5 additions and 1 deletions
|
@ -166,6 +166,7 @@ HalpAcpiGetTableFromBios(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
if (Fadt)
|
if (Fadt)
|
||||||
{
|
{
|
||||||
/* Grab the DSDT address and assume 2 pages */
|
/* Grab the DSDT address and assume 2 pages */
|
||||||
|
PhysicalAddress.HighPart = 0;
|
||||||
PhysicalAddress.LowPart = Fadt->dsdt;
|
PhysicalAddress.LowPart = Fadt->dsdt;
|
||||||
TableLength = 2 * PAGE_SIZE;
|
TableLength = 2 * PAGE_SIZE;
|
||||||
|
|
||||||
|
@ -263,6 +264,7 @@ HalpAcpiGetTableFromBios(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
{
|
{
|
||||||
/* Read the 32-bit physical address */
|
/* Read the 32-bit physical address */
|
||||||
PhysicalAddress.LowPart = Rsdt->Tables[CurrentEntry];
|
PhysicalAddress.LowPart = Rsdt->Tables[CurrentEntry];
|
||||||
|
PhysicalAddress.HighPart = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -603,6 +605,7 @@ HalpAcpiFindRsdtPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
PageCount = BYTES_TO_PAGES(NodeLength);
|
PageCount = BYTES_TO_PAGES(NodeLength);
|
||||||
|
|
||||||
/* Allocate the memory */
|
/* Allocate the memory */
|
||||||
|
PhysicalAddress.HighPart = 0;
|
||||||
PhysicalAddress.LowPart = HalpAllocPhysicalMemory(LoaderBlock,
|
PhysicalAddress.LowPart = HalpAllocPhysicalMemory(LoaderBlock,
|
||||||
0x1000000,
|
0x1000000,
|
||||||
PageCount,
|
PageCount,
|
||||||
|
@ -653,11 +656,12 @@ HalpAcpiTableCacheInit(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||||
Status = HalpAcpiFindRsdtPhase0(LoaderBlock, &AcpiMultiNode);
|
Status = HalpAcpiFindRsdtPhase0(LoaderBlock, &AcpiMultiNode);
|
||||||
if (!NT_SUCCESS(Status)) return Status;
|
if (!NT_SUCCESS(Status)) return Status;
|
||||||
|
|
||||||
|
PhysicalAddress.QuadPart = AcpiMultiNode->RsdtAddress.QuadPart;
|
||||||
|
|
||||||
/* Map the RSDT */
|
/* Map the RSDT */
|
||||||
if (LoaderBlock)
|
if (LoaderBlock)
|
||||||
{
|
{
|
||||||
/* Phase0: Use HAL Heap to map the RSDT, we assume it's about 2 pages */
|
/* Phase0: Use HAL Heap to map the RSDT, we assume it's about 2 pages */
|
||||||
PhysicalAddress.QuadPart = AcpiMultiNode->RsdtAddress.QuadPart;
|
|
||||||
MappedAddress = HalpMapPhysicalMemory64(PhysicalAddress, 2);
|
MappedAddress = HalpMapPhysicalMemory64(PhysicalAddress, 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue