summaryrefslogtreecommitdiff
path: root/OvmfPkg/PlatformPei
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r--OvmfPkg/PlatformPei/Platform.c10
-rw-r--r--OvmfPkg/PlatformPei/Platform.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index a74d353fd3..3e69d923d4 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -59,6 +59,9 @@ EFI_PEI_PPI_DESCRIPTOR mPpiBootMode[] = {
};
+EFI_BOOT_MODE mBootMode = BOOT_WITH_FULL_CONFIGURATION;
+
+
VOID
AddIoMemoryBaseSizeHob (
EFI_PHYSICAL_ADDRESS MemoryBase,
@@ -269,16 +272,13 @@ BootModeInitialization (
VOID
)
{
- EFI_BOOT_MODE BootMode;
EFI_STATUS Status;
if (CmosRead8 (0xF) == 0xFE) {
- BootMode = BOOT_ON_S3_RESUME;
- } else {
- BootMode = BOOT_WITH_FULL_CONFIGURATION;
+ mBootMode = BOOT_ON_S3_RESUME;
}
- Status = PeiServicesSetBootMode (BootMode);
+ Status = PeiServicesSetBootMode (mBootMode);
ASSERT_EFI_ERROR (Status);
Status = PeiServicesInstallPpi (mPpiBootMode);
diff --git a/OvmfPkg/PlatformPei/Platform.h b/OvmfPkg/PlatformPei/Platform.h
index 5cce7961bc..9ed712f3cd 100644
--- a/OvmfPkg/PlatformPei/Platform.h
+++ b/OvmfPkg/PlatformPei/Platform.h
@@ -96,4 +96,6 @@ XenPublishRamRegions (
VOID
);
+extern EFI_BOOT_MODE mBootMode;
+
#endif // _PLATFORM_PEI_H_INCLUDED_