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
This commit is contained in:
@@ -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 ();
|
||||
|
||||
|
Reference in New Issue
Block a user