From 52e2dabc0f8d3af09c213072ce8ba734302f585d Mon Sep 17 00:00:00 2001 From: "Lin, Gary (HPS OE-Linux)" Date: Tue, 31 Aug 2021 09:31:14 +0800 Subject: OvmfPkg/PlatformBootManagerLib: use PcdAcpiS3Enable to detect S3 support To avoid the potential inconsistency between PcdAcpiS3Enable and QemuFwCfgS3Enabled(), this commit modifies PlatformBootManagerLib to detect S3 support by PcdAcpiS3Enable as modules in MdeModulePkg do. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3573 Signed-off-by: Gary Lin Reviewed-by: Gerd Hoffmann Reviewed-by: Jiewen Yao Tested-by: Jim Fehlig --- OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 2 +- OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'OvmfPkg/Library') diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c index b0e9742937..71f63b2448 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -379,7 +379,7 @@ PlatformBootManagerBeforeConsole ( // EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid); - if (QemuFwCfgS3Enabled ()) { + if (PcdGetBool (PcdAcpiS3Enable)) { // // Save the boot script too. Note that this will require us to emit the // DxeSmmReadyToLock event just below, which in turn locks down SMM. diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index e470b9a6a3..c249a3cf1e 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -61,6 +61,7 @@ gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate ## CONSUMES gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits ## CONSUMES -- cgit v1.2.3