MdeModulePkg HobPrintLib: Also print EFI_HOB_TYPE_UNUSED type HOB

EFI_HOB_TYPE_UNUSED is not unknown HOB type, instead of printing
"Unknown Hob type, ...", this patch updates code to also print
EFI_HOB_TYPE_UNUSED type HOB.

Signed-off-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Star Zeng
2026-01-27 10:35:59 +08:00
committed by mergify[bot]
parent 41b32312c4
commit 02d5363679
@@ -395,7 +395,8 @@ HOB_PRINT_HANDLER_TABLE mHobHandles[] = {
{ EFI_HOB_TYPE_MEMORY_POOL, "EFI_HOB_TYPE_MEMORY_POOL", PrintMemoryPoolHob },
{ EFI_HOB_TYPE_FV2, "EFI_HOB_TYPE_FV2", PrintFv2Hob },
{ EFI_HOB_TYPE_UEFI_CAPSULE, "EFI_HOB_TYPE_UEFI_CAPSULE", PrintCapsuleHob },
{ EFI_HOB_TYPE_FV3, "EFI_HOB_TYPE_FV3", PrintFv3Hob }
{ EFI_HOB_TYPE_FV3, "EFI_HOB_TYPE_FV3", PrintFv3Hob },
{ EFI_HOB_TYPE_UNUSED, "EFI_HOB_TYPE_UNUSED", NULL }
};
/**
@@ -454,9 +455,11 @@ PrintHobList (
//
if ((PrintHandler == NULL) || EFI_ERROR (Status)) {
if (Index < ARRAY_SIZE (mHobHandles)) {
mHobHandles[Index].PrintHandler (Hob.Raw, Hob.Header->HobLength);
if (mHobHandles[Index].PrintHandler != NULL) {
mHobHandles[Index].PrintHandler (Hob.Raw, Hob.Header->HobLength);
}
} else {
DEBUG ((DEBUG_INFO, " Unkown Hob type, full hex dump in below:\n"));
DEBUG ((DEBUG_INFO, " Unknown Hob type, full hex dump in below:\n"));
PrintHex (DEBUG_INFO, Hob.Raw, Hob.Header->HobLength);
}
}