From 2cc6d4c8ed54e36fd9638dafdb293dd9a4c54cf9 Mon Sep 17 00:00:00 2001 From: Ning Feng Date: Mon, 9 Jan 2023 07:28:09 -0500 Subject: UefiPayloadPkg: Fix debug print error level hob not save correct REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4264 Fix debug print error level hob not save correct DebugPrintErrorlevel Should cover the case: Header.Length == UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD () Cc: Ray Ni Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: Ning Feng Reviewed-by: Gua Guo --- .../Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'UefiPayloadPkg/Library') diff --git a/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.c b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.c index 4f6b4ef1fb..10bdbe2bbc 100644 --- a/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.c +++ b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.c @@ -46,7 +46,7 @@ GetDebugPrintErrorLevel ( { if (GenericHeader->Revision == UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL_REVISION) { DebugPrintErrorLevel = (UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL *)GET_GUID_HOB_DATA (GuidHob); - if (DebugPrintErrorLevel->Header.Length > UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD (UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL, ErrorLevel)) { + if (DebugPrintErrorLevel->Header.Length >= UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD (UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL, ErrorLevel)) { gDebugPrintErrorLevel = DebugPrintErrorLevel->ErrorLevel; } } -- cgit v1.2.3