OvmfPkg/PlatformPei: Skip various items for S3 resume
[mirror_edk2.git] / OvmfPkg / PlatformPei / Platform.c
index 00c688d68a9142284b422b80d062f7c7abc0e657..11b4cb7a14800aa75e3f69ba6977092546dfb331 100644 (file)
@@ -375,11 +375,13 @@ InitializePlatform (
     InitializeXen ();\r
   }\r
 \r
-  ReserveEmuVariableNvStore ();\r
+  if (mBootMode != BOOT_ON_S3_RESUME) {\r
+    ReserveEmuVariableNvStore ();\r
 \r
-  PeiFvInitialization ();\r
+    PeiFvInitialization ();\r
 \r
-  MemMapInitialization ();\r
+    MemMapInitialization ();\r
+  }\r
 \r
   MiscInitialization ();\r
 \r