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

Lin, Gary (HPS OE-Linux) gary.lin at hpe.com
Fri Aug 13 06:13:04 UTC 2021


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 at kernel.org>
Cc: Jiewen Yao <jiewen.yao at intel.com>
cc: Jordan Justen <jordan.l.justen at intel.com>
Cc: Jim Fehlig <jfehlig at suse.com>
Cc: Joey Li <jlee at suse.com>
Signed-off-by: Gary Lin <gary.lin at 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/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list