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 v3 4/4] OvmfPkg/SmmControl2Dxe: use PcdAcpiS3Enable to detect S3 support
Date: Mon, 23 Aug 2021 15:09:25 +0800 [thread overview]
Message-ID: <20210823070925.10095-5-gary.lin@hpe.com> (raw)
In-Reply-To: <20210823070925.10095-1-gary.lin@hpe.com>
https://bugzilla.tianocore.org/show_bug.cgi?id=3573
To avoid the potential inconsistency between PcdAcpiS3Enable and
QemuFwCfgS3Enabled(), this commit modifies SmmControl2Dxe to detect
S3 support by PcdAcpiS3Enable as modules in MdeModulePkg do.
v3:
- Add the bugzilla link
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>
---
OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf | 2 ++
OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c | 4 +---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf b/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
index b8fdea8deb84..4cad56516f49 100644
--- a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
+++ b/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
@@ -39,6 +39,7 @@ [Sources]
[Packages]
MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
OvmfPkg/OvmfPkg.dec
UefiCpuPkg/UefiCpuPkg.dec
@@ -62,6 +63,7 @@ [Protocols]
[Pcd]
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmApSyncTimeout ## SOMETIMES_PRODUCES
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmSyncMode ## SOMETIMES_PRODUCES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable
[FeaturePcd]
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
diff --git a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c b/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c
index 9547c202880f..be04baf7b288 100644
--- a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c
+++ b/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c
@@ -25,8 +25,6 @@
#include <Library/IoLib.h>
#include <Library/PcdLib.h>
#include <Library/PciLib.h>
-#include <Library/QemuFwCfgLib.h>
-#include <Library/QemuFwCfgS3Lib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/S3SaveState.h>
#include <Protocol/SmmControl2.h>
@@ -238,7 +236,7 @@ SmmControl2DxeEntryPoint (
//
mSmiFeatureNegotiation = NegotiateSmiFeatures ();
- if (QemuFwCfgS3Enabled ()) {
+ if (PcdGetBool (PcdAcpiS3Enable)) {
VOID *Registration;
//
--
2.31.1
next prev parent reply other threads:[~2021-08-23 7:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-23 7:09 [PATCH v3 0/4] Fix OvmfXen boot failure due to s3 support state Lin, Gary (HPS OE-Linux)
2021-08-23 7:09 ` [PATCH v3 1/4] OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization Lin, Gary (HPS OE-Linux)
2021-08-23 9:35 ` Anthony PERARD
2021-08-24 6:45 ` [edk2-devel] " Gerd Hoffmann
2021-08-23 7:09 ` [PATCH v3 2/4] OvmfPkg/LockBoxLib: use PcdAcpiS3Enable to detect S3 support Lin, Gary (HPS OE-Linux)
2021-08-23 12:57 ` [edk2-devel] " Philippe Mathieu-Daudé
2021-08-24 6:46 ` Gerd Hoffmann
2021-08-23 7:09 ` [PATCH v3 3/4] OvmfPkg/PlatformBootManagerLib: " Lin, Gary (HPS OE-Linux)
2021-08-24 6:46 ` [edk2-devel] " Gerd Hoffmann
2021-08-23 7:09 ` Lin, Gary (HPS OE-Linux) [this message]
2021-08-24 6:46 ` [edk2-devel] [PATCH v3 4/4] OvmfPkg/SmmControl2Dxe: " Gerd Hoffmann
2021-08-23 13:16 ` [edk2-devel] [PATCH v3 0/4] Fix OvmfXen boot failure due to s3 support state Yao, Jiewen
2021-08-24 17:21 ` Jim Fehlig
2021-08-27 13:16 ` Ard Biesheuvel
2021-08-30 3:08 ` Lin, Gary (HPS OE-Linux)
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=20210823070925.10095-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