Skip to content

Commit be1567b

Browse files
committed
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 <[email protected]>
1 parent 6c6d4d2 commit be1567b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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)