]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/PlatformPei/MemDetect.c
OvmfPkg: introduce a common work area
[mirror_edk2.git] / OvmfPkg / PlatformPei / MemDetect.c
index 2deec128f464e127697583ca7f0ca9fc1166ba57..2c2c4641ec8aae7c26a7338b78ccc64b495e0a23 100644 (file)
@@ -939,9 +939,9 @@ InitializeRamRegions (
     }\r
 \r
 #ifdef MDE_CPU_X64\r
-    if (MemEncryptSevEsIsEnabled ()) {\r
+    if (FixedPcdGet32 (PcdOvmfWorkAreaSize) != 0) {\r
       //\r
-      // If SEV-ES is enabled, reserve the SEV-ES work area.\r
+      // Reserve the work area.\r
       //\r
       // Since this memory range will be used by the Reset Vector on S3\r
       // resume, it must be reserved as ACPI NVS.\r
@@ -951,8 +951,8 @@ InitializeRamRegions (
       // such that they would overlap the work area.\r
       //\r
       BuildMemoryAllocationHob (\r
-        (EFI_PHYSICAL_ADDRESS)(UINTN) FixedPcdGet32 (PcdSevEsWorkAreaBase),\r
-        (UINT64)(UINTN) FixedPcdGet32 (PcdSevEsWorkAreaSize),\r
+        (EFI_PHYSICAL_ADDRESS)(UINTN) FixedPcdGet32 (PcdOvmfWorkAreaBase),\r
+        (UINT64)(UINTN) FixedPcdGet32 (PcdOvmfWorkAreaSize),\r
         mS3Supported ? EfiACPIMemoryNVS : EfiBootServicesData\r
         );\r
     }\r