#include <Library/PciLib.h>\r
#include <Library/PeimEntryPoint.h>\r
#include <Library/PeiServicesLib.h>\r
+#include <Library/QemuFwCfgS3Lib.h>\r
#include <Library/ResourcePublicationLib.h>\r
#include <Guid/MemoryTypeInformation.h>\r
#include <Ppi/MasterBootMode.h>\r
IN CONST EFI_PEI_SERVICES **PeiServices\r
)\r
{\r
+ EFI_STATUS Status;\r
+\r
DEBUG ((DEBUG_INFO, "Platform PEIM Loaded\n"));\r
\r
DebugDumpCmos ();\r
CpuDeadLoop ();\r
}\r
\r
+ //\r
+ // This S3 conditional test is mainly for HVM Direct Kernel Boot since\r
+ // QEMU fwcfg isn't really supported other than that.\r
+ //\r
+ if (QemuFwCfgS3Enabled ()) {\r
+ DEBUG ((DEBUG_INFO, "S3 support was detected on QEMU\n"));\r
+ Status = PcdSetBoolS (PcdAcpiS3Enable, TRUE);\r
+ ASSERT_EFI_ERROR (Status);\r
+ }\r
+\r
XenConnect ();\r
\r
BootModeInitialization ();\r
ResourcePublicationLib\r
PeiServicesLib\r
PeimEntryPoint\r
+ QemuFwCfgS3Lib\r
MtrrLib\r
MemEncryptSevLib\r
PcdLib\r
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base\r
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size\r
gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable\r
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize\r
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved\r
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode\r