mirror of https://github.com/acidanthera/audk.git
OvmfPkg/PlatformPei: Detect S3 support for QEMU / KVM
QEMU indicates whether S3 is supported or not in the fw-cfg interface. 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@15293 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
14eb7a5be2
commit
7cdba6346b
|
@ -30,6 +30,7 @@
|
|||
#include <Library/PciLib.h>
|
||||
#include <Library/PeimEntryPoint.h>
|
||||
#include <Library/PeiServicesLib.h>
|
||||
#include <Library/QemuFwCfgLib.h>
|
||||
#include <Library/ResourcePublicationLib.h>
|
||||
#include <Guid/MemoryTypeInformation.h>
|
||||
#include <Ppi/MasterBootMode.h>
|
||||
|
@ -61,6 +62,8 @@ EFI_PEI_PPI_DESCRIPTOR mPpiBootMode[] = {
|
|||
|
||||
EFI_BOOT_MODE mBootMode = BOOT_WITH_FULL_CONFIGURATION;
|
||||
|
||||
BOOLEAN mS3Supported = FALSE;
|
||||
|
||||
|
||||
VOID
|
||||
AddIoMemoryBaseSizeHob (
|
||||
|
@ -356,6 +359,11 @@ InitializePlatform (
|
|||
|
||||
XenDetect ();
|
||||
|
||||
if (QemuFwCfgS3Enabled ()) {
|
||||
DEBUG ((EFI_D_INFO, "S3 support was detected on QEMU\n"));
|
||||
mS3Supported = TRUE;
|
||||
}
|
||||
|
||||
BootModeInitialization ();
|
||||
|
||||
PublishPeiMemory ();
|
||||
|
|
|
@ -98,4 +98,6 @@ XenPublishRamRegions (
|
|||
|
||||
extern EFI_BOOT_MODE mBootMode;
|
||||
|
||||
extern BOOLEAN mS3Supported;
|
||||
|
||||
#endif // _PLATFORM_PEI_H_INCLUDED_
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
PeiServicesLib
|
||||
PeiServicesTablePointerLib
|
||||
PeimEntryPoint
|
||||
QemuFwCfgLib
|
||||
MtrrLib
|
||||
PcdLib
|
||||
|
||||
|
|
Loading…
Reference in New Issue