0x40000,\r
&Granularity\r
);\r
+\r
+ if ((Private->Legacy16Table->TableLength >= OFFSET_OF (EFI_COMPATIBILITY16_TABLE, HiPermanentMemoryAddress)) &&\r
+ ((Private->Legacy16Table->UmaAddress != 0) && (Private->Legacy16Table->UmaSize != 0))) {\r
+ //\r
+ // Here we could reduce UmaAddress down as far as Private->OptionRom, taking into\r
+ // account the granularity of the access control.\r
+ //\r
+ DEBUG((EFI_D_INFO, "Unlocking UMB RAM region 0x%x-0x%x\n", Private->Legacy16Table->UmaAddress,\r
+ Private->Legacy16Table->UmaAddress + Private->Legacy16Table->UmaSize));\r
+\r
+ Private->LegacyRegion->UnLock (\r
+ Private->LegacyRegion,\r
+ Private->Legacy16Table->UmaAddress,\r
+ Private->Legacy16Table->UmaSize,\r
+ &Granularity\r
+ );\r
+ }\r
+\r
//\r
// Lock attributes of the Legacy Region if chipset supports\r
//\r
case EfiBootServicesCode:\r
case EfiBootServicesData:\r
case EfiConventionalMemory:\r
+ //\r
+ // The memory of EfiRuntimeServicesCode and EfiRuntimeServicesData are\r
+ // usable memory for legacy OS, because legacy OS is not aware of EFI runtime concept.\r
+ // In ACPI specification, EfiRuntimeServiceCode and EfiRuntimeServiceData\r
+ // should be mapped to AddressRangeReserved. This statement is for UEFI OS, not for legacy OS.\r
+ //\r
case EfiRuntimeServicesCode:\r
case EfiRuntimeServicesData:\r
return EfiAcpiAddressRangeMemory;\r
\r
+ case EfiPersistentMemory:\r
+ return EfiAddressRangePersistentMemory;\r
+\r
case EfiACPIReclaimMemory:\r
return EfiAcpiAddressRangeACPI;\r
\r