From bc34a79cd2a005e1d12d4b05bec6efc3b102cad6 Mon Sep 17 00:00:00 2001 From: Nickle Wang Date: Tue, 9 Jan 2024 13:53:15 +0800 Subject: RedfishPkg/RedfishDebugLib: add function to print buffer. Introduce DumpBuffer function to print the buffer content. This helps developer to debug Redfish issue. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nick Ramirez Reviewed-by: Igor Kulchytskyy Reviewed-by: Abner Chang --- RedfishPkg/Include/Library/RedfishDebugLib.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'RedfishPkg/Include') diff --git a/RedfishPkg/Include/Library/RedfishDebugLib.h b/RedfishPkg/Include/Library/RedfishDebugLib.h index 5f75bad..3430cf1 100644 --- a/RedfishPkg/Include/Library/RedfishDebugLib.h +++ b/RedfishPkg/Include/Library/RedfishDebugLib.h @@ -1,7 +1,7 @@ /** @file This file defines the Redfish debug library interface. - Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -138,4 +138,22 @@ DumpIpv4Address ( IN EFI_IPv4_ADDRESS *Ipv4Address ); +/** + Debug output raw data buffer. + + @param[in] ErrorLevel DEBUG macro error level + @param[in] Buffer Debug output data buffer. + @param[in] BufferSize The size of Buffer in byte. + + @retval EFI_SUCCESS Debug dump finished. + @retval EFI_INVALID_PARAMETER Buffer is NULL. + +**/ +EFI_STATUS +DumpBuffer ( + IN UINTN ErrorLevel, + IN UINT8 *Buffer, + IN UINTN BufferSize + ); + #endif -- cgit v1.1