]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/PlatformPei/Fv.c
OvmfPkg/PlatformPei: Allocate PEI FV as ACPI NVS if S3 is supported
[mirror_edk2.git] / OvmfPkg / PlatformPei / Fv.c
index 1ee417a091dbd3a9693a84df5a7999597d448ea3..3ed775c850832f472df524cf8f0522662ec5dae5 100644 (file)
@@ -13,6 +13,7 @@
 **/\r
 \r
 #include "PiPei.h"\r
+#include "Platform.h"\r
 #include <Library/DebugLib.h>\r
 #include <Library/HobLib.h>\r
 #include <Library/PeiServicesLib.h>\r
@@ -36,12 +37,12 @@ PeiFvInitialization (
   //\r
   // Create a memory allocation HOB for the PEI FV.\r
   //\r
-  // Note: This should be changed to ACPI NVS when S3 resume is enabled.\r
+  // Allocate as ACPI NVS is S3 is supported\r
   //\r
   BuildMemoryAllocationHob (\r
     PcdGet32 (PcdOvmfPeiMemFvBase),\r
     PcdGet32 (PcdOvmfPeiMemFvSize),\r
-    EfiBootServicesData\r
+    mS3Supported ? EfiACPIMemoryNVS : EfiBootServicesData\r
     );\r
 \r
   //\r