]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c
SignedCapsulePkg: Replace [Ascii|Unicode]ValueToString
[mirror_edk2.git] / IntelFrameworkModulePkg / Csm / LegacyBiosDxe / LegacyBootSupport.c
index e51acd0551be21d8f09812f8325b2fb1997e1602..52bcae2d1331eeb9527707fd54c3d1eac7e7173a 100644 (file)
@@ -1238,6 +1238,24 @@ GenericLegacyBoot (
                            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
@@ -1595,10 +1613,19 @@ EfiMemoryTypeToE820Type (
   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