]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/PlatformPei/Platform.c
BaseTools: Clean up tools_def.template for XCODE5
[mirror_edk2.git] / OvmfPkg / PlatformPei / Platform.c
index 77a8a16c15b8b58485d9b0307732dfad26769613..3e9fda7c7ab019c11fe4b32b5ca75d7a33a88196 100644 (file)
@@ -513,9 +513,8 @@ ReserveEmuVariableNvStore (
   //\r
   VariableStore =\r
     (EFI_PHYSICAL_ADDRESS)(UINTN)\r
-      AllocateAlignedRuntimePages (\r
-        EFI_SIZE_TO_PAGES (2 * PcdGet32 (PcdFlashNvStorageFtwSpareSize)),\r
-        PcdGet32 (PcdFlashNvStorageFtwSpareSize)\r
+      AllocateRuntimePages (\r
+        EFI_SIZE_TO_PAGES (2 * PcdGet32 (PcdFlashNvStorageFtwSpareSize))\r
         );\r
   DEBUG ((EFI_D_INFO,\r
           "Reserved variable store memory: 0x%lX; size: %dkb\n",\r
@@ -661,7 +660,9 @@ InitializePlatform (
   mHostBridgeDevId = PciRead16 (OVMF_HOSTBRIDGE_DID);\r
 \r
   if (mBootMode != BOOT_ON_S3_RESUME) {\r
-    ReserveEmuVariableNvStore ();\r
+    if (!FeaturePcdGet (PcdSmmSmramRequire)) {\r
+      ReserveEmuVariableNvStore ();\r
+    }\r
     PeiFvInitialization ();\r
     MemMapInitialization ();\r
     NoexecDxeInitialization ();\r