Skip to content

Commit 6f3ab75

Browse files
committed
[Cherry-Pick] MdeModulePkg: StatusCodeHandler Stmm remove assert
In StandaloneMM mode, IsStatusCodeUsingSerialPort is expecting to find gMmStatusCodeUseSerialHobGuid, and will assert if it is not found. Change the logic so that if the Guided Hob is not found, to let the function return FALSE and progress to proceed. Signed-off-by: Aaron Pop <aaronpop@microsoft.com> (cherry picked from commit 4743d8d)
1 parent 614b366 commit 6f3ab75

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerStandalone.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ IsStatusCodeUsingSerialPort (
2929
MM_STATUS_CODE_USE_SERIAL *StatusCodeUseSerialHob;
3030

3131
Hob = GetFirstGuidHob (&gMmStatusCodeUseSerialHobGuid);
32-
ASSERT (Hob != NULL);
32+
if (Hob != NULL) {
33+
StatusCodeUseSerialHob = (MM_STATUS_CODE_USE_SERIAL *)GET_GUID_HOB_DATA (Hob);
34+
return StatusCodeUseSerialHob->StatusCodeUseSerial;
35+
}
3336

34-
StatusCodeUseSerialHob = (MM_STATUS_CODE_USE_SERIAL *)GET_GUID_HOB_DATA (Hob);
35-
36-
return StatusCodeUseSerialHob->StatusCodeUseSerial;
37+
return FALSE;
3738
}
3839

3940
/**

0 commit comments

Comments
 (0)