summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/SmmControl2Dxe
diff options
context:
space:
mode:
authorLin, Gary (HPS OE-Linux) <gary.lin@hpe.com>2021-08-31 09:31:15 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-08-31 11:07:16 +0000
commit5b5f10d7465004e3e40ec1f50a3b490b4db595e7 (patch)
tree8a3b6683073d0d50a454f35d6488a6fd6de769df /OvmfPkg/SmmControl2Dxe
parent52e2dabc0f8d3af09c213072ce8ba734302f585d (diff)
downloadedk2-5b5f10d7465004e3e40ec1f50a3b490b4db595e7.tar.gz
edk2-5b5f10d7465004e3e40ec1f50a3b490b4db595e7.tar.bz2
edk2-5b5f10d7465004e3e40ec1f50a3b490b4db595e7.zip
OvmfPkg/SmmControl2Dxe: use PcdAcpiS3Enable to detect S3 support
To avoid the potential inconsistency between PcdAcpiS3Enable and QemuFwCfgS3Enabled(), this commit modifies SmmControl2Dxe 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 <gary.lin@hpe.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Tested-by: Jim Fehlig <jfehlig@suse.com>
Diffstat (limited to 'OvmfPkg/SmmControl2Dxe')
-rw-r--r--OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c4
-rw-r--r--OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf2
2 files changed, 3 insertions, 3 deletions
diff --git a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c b/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c
index 9547c20288..be04baf7b2 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;
//
diff --git a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf b/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
index b8fdea8deb..4cad56516f 100644
--- a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
+++ b/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
@@ -39,6 +39,7 @@
[Packages]
MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
OvmfPkg/OvmfPkg.dec
UefiCpuPkg/UefiCpuPkg.dec
@@ -62,6 +63,7 @@
[Pcd]
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmApSyncTimeout ## SOMETIMES_PRODUCES
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmSyncMode ## SOMETIMES_PRODUCES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable
[FeaturePcd]
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire