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>
This commit is contained in:
parent
502a9122a4
commit
1f22b96b11
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue