OvmfPkg/PlatformPei: Add mBootMode driver variable
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 4 Mar 2014 08:01:40 +0000 (08:01 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 4 Mar 2014 08:01:40 +0000 (08:01 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15291 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/PlatformPei/Platform.c
OvmfPkg/PlatformPei/Platform.h

index a74d353..3e69d92 100644 (file)
@@ -59,6 +59,9 @@ EFI_PEI_PPI_DESCRIPTOR   mPpiBootMode[] = {
 };\r
 \r
 \r
+EFI_BOOT_MODE mBootMode = BOOT_WITH_FULL_CONFIGURATION;\r
+\r
+\r
 VOID\r
 AddIoMemoryBaseSizeHob (\r
   EFI_PHYSICAL_ADDRESS        MemoryBase,\r
@@ -269,16 +272,13 @@ BootModeInitialization (
   VOID\r
   )\r
 {\r
-  EFI_BOOT_MODE BootMode;\r
   EFI_STATUS    Status;\r
 \r
   if (CmosRead8 (0xF) == 0xFE) {\r
-    BootMode = BOOT_ON_S3_RESUME;\r
-  } else {\r
-    BootMode = BOOT_WITH_FULL_CONFIGURATION;\r
+    mBootMode = BOOT_ON_S3_RESUME;\r
   }\r
 \r
-  Status = PeiServicesSetBootMode (BootMode);\r
+  Status = PeiServicesSetBootMode (mBootMode);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
   Status = PeiServicesInstallPpi (mPpiBootMode);\r
index 5cce796..9ed712f 100644 (file)
@@ -96,4 +96,6 @@ XenPublishRamRegions (
   VOID\r
   );\r
 \r
+extern EFI_BOOT_MODE mBootMode;\r
+\r
 #endif // _PLATFORM_PEI_H_INCLUDED_\r