diff options
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index a7221b317b..a74d353fd3 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -266,11 +266,19 @@ MiscInitialization ( VOID
BootModeInitialization (
+ VOID
)
{
- EFI_STATUS Status;
+ EFI_BOOT_MODE BootMode;
+ EFI_STATUS Status;
+
+ if (CmosRead8 (0xF) == 0xFE) {
+ BootMode = BOOT_ON_S3_RESUME;
+ } else {
+ BootMode = BOOT_WITH_FULL_CONFIGURATION;
+ }
- Status = PeiServicesSetBootMode (BOOT_WITH_FULL_CONFIGURATION);
+ Status = PeiServicesSetBootMode (BootMode);
ASSERT_EFI_ERROR (Status);
Status = PeiServicesInstallPpi (mPpiBootMode);
|