mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcAcpiLib: Unlock tables located in low memory
closes acidanthera/bugtracker#1085
This commit is contained in:
parent
e5a85b17fc
commit
7741c09d64
@ -19,6 +19,7 @@
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/OcMemoryLib.h>
|
||||
#include <Library/OcMiscLib.h>
|
||||
|
||||
#include <IndustryStandard/AcpiAml.h>
|
||||
@ -561,6 +562,19 @@ AcpiInitContext (
|
||||
Index
|
||||
));
|
||||
|
||||
//
|
||||
// Unlock table if in lower memory.
|
||||
//
|
||||
if ((UINTN)Context->Tables[DstIndex] < BASE_1MB) {
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"OCA: Unlocking table %08x at %p\n",
|
||||
Context->Tables[DstIndex]->Signature,
|
||||
Context->Tables[DstIndex]
|
||||
));
|
||||
LegacyRegionUnlock ((UINTN)Context->Tables[DstIndex], Context->Tables[DstIndex]->Length);
|
||||
}
|
||||
|
||||
if (Context->Tables[DstIndex]->Signature == EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE) {
|
||||
Context->Fadt = (EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE *) Context->Tables[DstIndex];
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
OcFileLib
|
||||
OcMemoryLib
|
||||
OcMiscLib
|
||||
PrintLib
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ LegacyRegionLock (
|
||||
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"Lock LegacyRegion %0X-%0X - %r\n",
|
||||
"OCMM: Lock LegacyRegion %0X-%0X - %r\n",
|
||||
LegacyAddress,
|
||||
(LegacyAddress + (LegacyLength - 1)),
|
||||
Status
|
||||
|
||||
@ -93,7 +93,7 @@ LegacyRegionUnlock (
|
||||
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"Unlock LegacyRegion %0X-%0X - %r\n",
|
||||
"OCMM: Unlock LegacyRegion %0X-%0X - %r\n",
|
||||
LegacyAddress,
|
||||
(LegacyAddress + (LegacyLength - 1)),
|
||||
Status
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user