diff --git a/Library/OcAcpiLib/OcAcpiLib.c b/Library/OcAcpiLib/OcAcpiLib.c index d8eb8cdb..fa8f392e 100755 --- a/Library/OcAcpiLib/OcAcpiLib.c +++ b/Library/OcAcpiLib/OcAcpiLib.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -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]; diff --git a/Library/OcAcpiLib/OcAcpiLib.inf b/Library/OcAcpiLib/OcAcpiLib.inf index b8d50b13..e1fa3e96 100755 --- a/Library/OcAcpiLib/OcAcpiLib.inf +++ b/Library/OcAcpiLib/OcAcpiLib.inf @@ -34,6 +34,7 @@ [LibraryClasses] BaseLib OcFileLib + OcMemoryLib OcMiscLib PrintLib diff --git a/Library/OcMemoryLib/LegacyRegionLock.c b/Library/OcMemoryLib/LegacyRegionLock.c index 306b7f57..965fdb6b 100755 --- a/Library/OcMemoryLib/LegacyRegionLock.c +++ b/Library/OcMemoryLib/LegacyRegionLock.c @@ -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 diff --git a/Library/OcMemoryLib/LegacyRegionUnLock.c b/Library/OcMemoryLib/LegacyRegionUnLock.c index 28f83da7..01be0c75 100755 --- a/Library/OcMemoryLib/LegacyRegionUnLock.c +++ b/Library/OcMemoryLib/LegacyRegionUnLock.c @@ -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