diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2014-03-04 08:01:40 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-03-04 08:01:40 +0000 |
commit | 979420df986e0b9ec3fe5cb2a1f72332a42c61c1 (patch) | |
tree | ad6995f9501f642aa4b25e3fb8567c773df2914b | |
parent | 8f5ca05b0d423de6da0208979aa82ccacfa9ce01 (diff) | |
download | edk2-platforms-979420df986e0b9ec3fe5cb2a1f72332a42c61c1.tar.xz |
OvmfPkg/PlatformPei: Add mBootMode driver variable
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
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 10 | ||||
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.h | 2 |
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_
|