diff options
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 23 | ||||
-rw-r--r-- | OvmfPkg/PlatformPei/PlatformPei.inf | 1 |
2 files changed, 24 insertions, 0 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
|