[edk2-devel] [PATCH v2 4/5] OvmfPkg/PlatformBootManagerLib: use PcdAcpiS3Enable to detect S3 support

Lin, Gary (HPS OE-Linux) posted 5 patches 4 years, 6 months ago
[edk2-devel] [PATCH v2 4/5] OvmfPkg/PlatformBootManagerLib: use PcdAcpiS3Enable to detect S3 support
Posted by Lin, Gary (HPS OE-Linux) 4 years, 6 months ago
To avoid the potential inconsistency between PcdAcpiS3Enable and
QemuFwCfgS3Enabled(), this commit modifies PlatformBootManagerLib to
detect S3 support by PcdAcpiS3Enable as modules in MdeModulePkg do.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Jim Fehlig <jfehlig@suse.com>
Cc: Joey Li <jlee@suse.com>
Signed-off-by: Gary Lin <gary.lin@hpe.com>
---
 .../Library/PlatformBootManagerLib/PlatformBootManagerLib.inf   | 1 +
 OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c            | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index e470b9a6a3e5..c249a3cf1e35 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -61,6 +61,7 @@ [Pcd]
   gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent

   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable

   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId

+  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable

   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut

   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate         ## CONSUMES

   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits         ## CONSUMES

diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
index b0e97429372b..71f63b244828 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.

-- 
2.31.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79249): https://edk2.groups.io/g/devel/message/79249
Mute This Topic: https://groups.io/mt/84857781/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-