diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h index 7f11429e50..1769af2fa6 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.h @@ -29,6 +29,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include +#include #include #include diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c index 3471d40cb2..35657a3b57 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; + } +}