Skip to content

Commit 1fe2504

Browse files
kuqin12mergify[bot]
authored andcommitted
StandaloneMmPkg: StandaloneMmIplPei: Guard S3 hob with PcdAcpiS3Enable
The current module checks the value of gEfiAcpiVariableGuid hobs and could assert if there is no such hob available. However, these hobs are only available if a platform elects to support S3. Thus this change moves the hob copy logic behind a PCD check to prevent unnecessary asserts. Signed-off-by: Kun Qin <[email protected]>
1 parent 90cb166 commit 1fe2504

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

StandaloneMmPkg/Drivers/StandaloneMmIplPei/MmFoundationHob.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,9 +1026,12 @@ CreateMmFoundationHobList (
10261026
//
10271027
// Build ACPI variable HOB
10281028
//
1029-
HobLength = GetRemainingHobSize (*FoundationHobSize, UsedSize);
1030-
MmIplCopyGuidHob (FoundationHobList + UsedSize, &HobLength, &gEfiAcpiVariableGuid, FALSE);
1031-
UsedSize += HobLength;
1029+
if (PcdGetBool (PcdAcpiS3Enable)) {
1030+
// Only check on this variable when S3 needs it.
1031+
HobLength = GetRemainingHobSize (*FoundationHobSize, UsedSize);
1032+
MmIplCopyGuidHob (FoundationHobList + UsedSize, &HobLength, &gEfiAcpiVariableGuid, FALSE);
1033+
UsedSize += HobLength;
1034+
}
10321035

10331036
if (FeaturePcdGet (PcdCpuSmmProfileEnable)) {
10341037
//

0 commit comments

Comments
 (0)