From bbbb761e370379aed5d548cd5c044377fee4daaa Mon Sep 17 00:00:00 2001 From: Oliver Smith-Denny Date: Thu, 1 Oct 2026 12:38:03 -0700 Subject: MdeModulePkg: Use DUMP_HEX Macro Several places in MdeModulePkg were implementing their own versions of hex dumping logic; use the DebugLib.h macro instead. Prints change slightly, they are now standardized with uppercase hex, prefixes on every row instead of in the header only, and VarCheckHiiLib no longer indents rows with *ASCII*. Signed-off-by: Oliver Smith-Denny --- .../Library/PiDxeS3BootScriptLib/BootScriptExecute.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptExecute.c') diff --git a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptExecute.c b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptExecute.c index 279daefac1..2ddb6a2d1f 100644 --- a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptExecute.c +++ b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptExecute.c @@ -1220,7 +1220,6 @@ BootScriptExecuteInformation ( ) { - UINT32 Index; EFI_BOOT_SCRIPT_INFORMATION Information; UINT8 *InformationData; @@ -1229,12 +1228,7 @@ BootScriptExecuteInformation ( InformationData = Script + sizeof (EFI_BOOT_SCRIPT_INFORMATION); DEBUG ((DEBUG_INFO, "BootScriptExecuteInformation - 0x%08x\n", (UINTN)InformationData)); - DEBUG ((DEBUG_INFO, "BootScriptInformation: ")); - for (Index = 0; Index < Information.InformationLength; Index++) { - DEBUG ((DEBUG_INFO, "%02x ", InformationData[Index])); - } - - DEBUG ((DEBUG_INFO, "\n")); + DUMP_HEX (DEBUG_INFO, 0, InformationData, Information.InformationLength, "BootScriptInformation: "); } /** @@ -1249,7 +1243,6 @@ BootScriptExecuteLabel ( ) { - UINT32 Index; EFI_BOOT_SCRIPT_INFORMATION Information; UINT8 *InformationData; @@ -1258,12 +1251,7 @@ BootScriptExecuteLabel ( InformationData = Script + sizeof (EFI_BOOT_SCRIPT_INFORMATION); DEBUG ((DEBUG_INFO, "BootScriptExecuteLabel - 0x%08x\n", (UINTN)InformationData)); - DEBUG ((DEBUG_INFO, "BootScriptLabel: ")); - for (Index = 0; Index < Information.InformationLength; Index++) { - DEBUG ((DEBUG_INFO, "%02x ", InformationData[Index])); - } - - DEBUG ((DEBUG_INFO, "\n")); + DUMP_HEX (DEBUG_INFO, 0, InformationData, Information.InformationLength, "BootScriptLabel: "); } /** -- cgit v1.2.3