From: "Lin, Gary (HPS OE-Linux)" <gary.lin@hpe.com>
To: <devel@edk2.groups.io>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
Jiewen Yao <jiewen.yao@intel.com>,
Jordan Justen <jordan.l.justen@intel.com>,
Jim Fehlig <jfehlig@suse.com>, Joey Li <jlee@suse.com>
Subject: [PATCH v2 4/5] OvmfPkg/PlatformBootManagerLib: use PcdAcpiS3Enable to detect S3 support
Date: Fri, 13 Aug 2021 14:13:04 +0800 [thread overview]
Message-ID: <20210813061305.17519-5-gary.lin@hpe.com> (raw)
In-Reply-To: <20210813061305.17519-1-gary.lin@hpe.com>
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
next prev parent reply other threads:[~2021-08-13 6:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 6:13 [PATCH v2 0/5] Fix OvmfXen HVM Direct kernel boot failure Lin, Gary (HPS OE-Linux)
2021-08-13 6:13 ` [PATCH v2 1/5] OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization Lin, Gary (HPS OE-Linux)
2021-08-16 7:07 ` [edk2-devel] " Ard Biesheuvel
2021-08-16 7:11 ` Lin, Gary (HPS OE-Linux)
2021-08-19 14:33 ` Anthony PERARD
2021-08-13 6:13 ` [PATCH v2 2/5] OvmfPkg/OvmfXen: add QemuKernelLoaderFsDxe Lin, Gary (HPS OE-Linux)
2021-08-19 14:34 ` Anthony PERARD
2021-08-13 6:13 ` [PATCH v2 3/5] OvmfPkg/LockBoxLib: use PcdAcpiS3Enable to detect S3 support Lin, Gary (HPS OE-Linux)
2021-08-13 6:13 ` Lin, Gary (HPS OE-Linux) [this message]
2021-08-13 6:13 ` [PATCH v2 5/5] OvmfPkg/SmmControl2Dxe: " Lin, Gary (HPS OE-Linux)
2021-08-13 9:55 ` [edk2-devel] [PATCH v2 0/5] Fix OvmfXen HVM Direct kernel boot failure Yao, Jiewen
2021-08-16 1:34 ` Lin, Gary (HPS OE-Linux)
2021-08-16 17:14 ` Jim Fehlig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210813061305.17519-5-gary.lin@hpe.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox