summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2015-11-30 23:36:31 +0000
committerlersek <lersek@Edk2>2015-11-30 23:36:31 +0000
commit5133d1f1d297db5b5d04641da98489aba118c93b (patch)
treed9af8e45e5850c7bc85c2b2d388c44a8790cbe06 /OvmfPkg
parent53f97bdc4433532ba824b1db98228c7037fd978a (diff)
downloadedk2-5133d1f1d297db5b5d04641da98489aba118c93b.tar.gz
edk2-5133d1f1d297db5b5d04641da98489aba118c93b.tar.bz2
edk2-5133d1f1d297db5b5d04641da98489aba118c93b.zip
OvmfPkg: replace README fine print about X64 SMM S3 with PlatformPei check
At the moment, the "UefiCpuPkg/Universal/Acpi/S3Resume2Pei" module doesn't support S3 resume if the platform has SMM enabled and the PEI phase is built for X64. We document this in the README, but it is not conspicuous enough. Replace the "fine print" in the README with a runtime check in PlatformPei. Cc: Jordan Justen <jordan.l.justen@intel.com> Suggested-by: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19070 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/PlatformPei/Platform.c23
-rw-r--r--OvmfPkg/PlatformPei/PlatformPei.inf1
-rw-r--r--OvmfPkg/README5
3 files changed, 24 insertions, 5 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index 0b11275157..6735b50d70 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -22,6 +22,7 @@
//
// The Library classes this module consumes
//
+#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
#include <Library/IoLib.h>
@@ -461,6 +462,27 @@ DebugDumpCmos (
}
+VOID
+S3Verification (
+ VOID
+ )
+{
+#if defined (MDE_CPU_X64)
+ if (FeaturePcdGet (PcdSmmSmramRequire) && mS3Supported) {
+ DEBUG ((EFI_D_ERROR,
+ "%a: S3Resume2Pei doesn't support X64 PEI + SMM yet.\n", __FUNCTION__));
+ DEBUG ((EFI_D_ERROR,
+ "%a: Please disable S3 on the QEMU command line (see the README),\n",
+ __FUNCTION__));
+ DEBUG ((EFI_D_ERROR,
+ "%a: or build OVMF with \"OvmfPkgIa32X64.dsc\".\n", __FUNCTION__));
+ ASSERT (FALSE);
+ CpuDeadLoop ();
+ }
+#endif
+}
+
+
/**
Perform Platform PEI initialization.
@@ -488,6 +510,7 @@ InitializePlatform (
mS3Supported = TRUE;
}
+ S3Verification ();
BootModeInitialization ();
AddressWidthInitialization ();
diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf
index dc7729309b..11b3865292 100644
--- a/OvmfPkg/PlatformPei/PlatformPei.inf
+++ b/OvmfPkg/PlatformPei/PlatformPei.inf
@@ -47,6 +47,7 @@
gEfiXenInfoGuid
[LibraryClasses]
+ BaseLib
DebugLib
HobLib
IoLib
diff --git a/OvmfPkg/README b/OvmfPkg/README
index 0f70fa7359..e6137ddc1f 100644
--- a/OvmfPkg/README
+++ b/OvmfPkg/README
@@ -170,11 +170,6 @@ can be used on Windows.
-global ICH9-LPC.disable_s3=1 \
-Dependent on the development status of the
-"UefiCpuPkg/Universal/Acpi/S3Resume2Pei" module, S3 resume may not work in
-OvmfPkg/OvmfPkgX64.dsc builds. In such cases, OvmfPkg/OvmfPkgIa32X64.dsc is
-recommended for running X64 guests.
-
=== Network Support ===
OVMF provides a UEFI network stack by default. Its lowest level driver is the