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
//\r
// The Library classes this module consumes\r
//\r
//\r
// The Library classes this module consumes\r
//\r
+#include <Library/BaseLib.h>\r
#include <Library/DebugLib.h>\r
#include <Library/HobLib.h>\r
#include <Library/IoLib.h>\r
#include <Library/DebugLib.h>\r
#include <Library/HobLib.h>\r
#include <Library/IoLib.h>\r
+VOID\r
+S3Verification (\r
+ VOID\r
+ )\r
+{\r
+#if defined (MDE_CPU_X64)\r
+ if (FeaturePcdGet (PcdSmmSmramRequire) && mS3Supported) {\r
+ DEBUG ((EFI_D_ERROR,\r
+ "%a: S3Resume2Pei doesn't support X64 PEI + SMM yet.\n", __FUNCTION__));\r
+ DEBUG ((EFI_D_ERROR,\r
+ "%a: Please disable S3 on the QEMU command line (see the README),\n",\r
+ __FUNCTION__));\r
+ DEBUG ((EFI_D_ERROR,\r
+ "%a: or build OVMF with \"OvmfPkgIa32X64.dsc\".\n", __FUNCTION__));\r
+ ASSERT (FALSE);\r
+ CpuDeadLoop ();\r
+ }\r
+#endif\r
+}\r
+\r
+\r
/**\r
Perform Platform PEI initialization.\r
\r
/**\r
Perform Platform PEI initialization.\r
\r
mS3Supported = TRUE;\r
}\r
\r
mS3Supported = TRUE;\r
}\r
\r
BootModeInitialization ();\r
AddressWidthInitialization ();\r
\r
BootModeInitialization ();\r
AddressWidthInitialization ();\r
\r
gEfiXenInfoGuid\r
\r
[LibraryClasses]\r
gEfiXenInfoGuid\r
\r
[LibraryClasses]\r
DebugLib\r
HobLib\r
IoLib\r
DebugLib\r
HobLib\r
IoLib\r
\r
-global ICH9-LPC.disable_s3=1 \\r
\r
\r
-global ICH9-LPC.disable_s3=1 \\r
\r
-Dependent on the development status of the\r
-"UefiCpuPkg/Universal/Acpi/S3Resume2Pei" module, S3 resume may not work in\r
-OvmfPkg/OvmfPkgX64.dsc builds. In such cases, OvmfPkg/OvmfPkgIa32X64.dsc is\r
-recommended for running X64 guests.\r
-\r
=== Network Support ===\r
\r
OVMF provides a UEFI network stack by default. Its lowest level driver is the\r
=== Network Support ===\r
\r
OVMF provides a UEFI network stack by default. Its lowest level driver is the\r