diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2024-06-26 12:43:51 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-08-28 15:25:27 +0000 |
commit | 1f22b96b11cec64c11ef2681566c7fd50ee9c0cf (patch) | |
tree | 1d8f3bfc335b65e8523cb3fe8d37e31ea8767464 /UefiCpuPkg | |
parent | 502a9122a427f3f54def77c046c23214ba3c34b6 (diff) | |
download | edk2-1f22b96b11cec64c11ef2681566c7fd50ee9c0cf.zip edk2-1f22b96b11cec64c11ef2681566c7fd50ee9c0cf.tar.gz edk2-1f22b96b11cec64c11ef2681566c7fd50ee9c0cf.tar.bz2 |
UefiCpuPkg/PiSmmCpuDxeSmm: Impl GetAcpiS3EnableFlag for MM
MM CPU can not use the dynamic PCD (PcdAcpiS3Enable), so, it
consumes the gMmAcpiS3EnableHobGuid to get ACPI S3 enable flag.
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Yuanhao Xie <yuanhao.xie@intel.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h | 1 | ||||
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h index 7f11429..1769af2 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h @@ -29,6 +29,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include <Guid/SmmBaseHob.h>
#include <Guid/MpInformation2.h>
#include <Guid/MmProfileData.h>
+#include <Guid/MmAcpiS3Enable.h>
#include <Library/BaseLib.h>
#include <Library/IoLib.h>
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c index 3471d40..35657a3 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c @@ -8,3 +8,31 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/
#include "PiSmmCpuCommon.h"
+
+/**
+ Get ACPI S3 enable flag.
+
+**/
+VOID
+GetAcpiS3EnableFlag (
+ VOID
+ )
+{
+ EFI_HOB_GUID_TYPE *GuidHob;
+ MM_ACPI_S3_ENABLE *MmAcpiS3EnableHob;
+
+ MmAcpiS3EnableHob = NULL;
+
+ //
+ // Get MM_ACPI_S3_ENABLE for Standalone MM init.
+ //
+ GuidHob = GetFirstGuidHob (&gMmAcpiS3EnableHobGuid);
+ ASSERT (GuidHob != NULL);
+ if (GuidHob != NULL) {
+ MmAcpiS3EnableHob = GET_GUID_HOB_DATA (GuidHob);
+ }
+
+ if (MmAcpiS3EnableHob != NULL) {
+ mAcpiS3Enable = MmAcpiS3EnableHob->AcpiS3Enable;
+ }
+}
|