]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiPayloadPkg: Fix debug print error level hob not save correct
authorNing Feng <ning.feng@intel.com>
Mon, 9 Jan 2023 12:28:09 +0000 (07:28 -0500)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 10 Jan 2023 03:44:38 +0000 (03:44 +0000)
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 <ray.ni@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Signed-off-by: Ning Feng <ning.feng@intel.com>
Reviewed-by: Gua Guo <gua.guo@intel.com>
UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.c

index 4f6b4ef1fb013382236c1c113e23940bf186f0fe..10bdbe2bbc1f27697451eac404c2be7f02cb4e54 100644 (file)
@@ -46,7 +46,7 @@ GetDebugPrintErrorLevel (
       {\r
         if (GenericHeader->Revision == UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL_REVISION) {\r
           DebugPrintErrorLevel =  (UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL *)GET_GUID_HOB_DATA (GuidHob);\r
-          if (DebugPrintErrorLevel->Header.Length > UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD (UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL, ErrorLevel)) {\r
+          if (DebugPrintErrorLevel->Header.Length >= UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD (UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL, ErrorLevel)) {\r
             gDebugPrintErrorLevel = DebugPrintErrorLevel->ErrorLevel;\r
           }\r
         }\r