TianoCore EDK2 master
|
#include <Uefi.h>
#include <Library/DebugLib.h>
#include <RedfishServiceData.h>
#include <Library/HiiUtilityLib.h>
#include <Library/JsonLib.h>
#include <Protocol/EdkIIRedfishPlatformConfig.h>
Go to the source code of this file.
Macros | |
#define | DEBUG_REDFISH_NETWORK DEBUG_MANAGEABILITY |
Debug error level for Redfish networking function. | |
#define | DEBUG_REDFISH_HOST_INTERFACE DEBUG_MANAGEABILITY |
Debug error level for Redfish Host INterface. | |
#define | DEBUG_REDFISH_PLATFORM_CONFIG DEBUG_MANAGEABILITY |
Debug error level for Redfish Platform Configure Driver. | |
#define | DEBUG_REDFISH_COMPONENT_PLATFORM_CONFIG_DXE 0x00000001 |
#define | DEBUG_REDFISH(DebugCategory, ...) |
Functions | |
BOOLEAN | DebugRedfishComponentEnabled (IN UINT64 DebugCategory) |
EFI_STATUS | DumpRedfishValue (IN UINTN ErrorLevel, IN EDKII_REDFISH_VALUE *RedfishValue) |
EFI_STATUS | DumpJsonValue (IN UINTN ErrorLevel, IN EDKII_JSON_VALUE JsonValue) |
EFI_STATUS | DumpRedfishPayload (IN UINTN ErrorLevel, IN REDFISH_PAYLOAD Payload) |
EFI_STATUS | DumpRedfishResponse (IN CONST CHAR8 *Message, IN UINTN ErrorLevel, IN REDFISH_RESPONSE *Response) |
EFI_STATUS | DumpHttpStatusCode (IN UINTN ErrorLevel, IN EFI_HTTP_STATUS_CODE HttpStatusCode) |
EFI_STATUS | DumpIpv4Address (IN UINTN ErrorLevel, IN EFI_IPv4_ADDRESS *Ipv4Address) |
EFI_STATUS | DumpBuffer (IN UINTN ErrorLevel, IN UINT8 *Buffer, IN UINTN BufferSize) |
This file defines the Redfish debug library interface.
Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file RedfishDebugLib.h.
#define DEBUG_REDFISH | ( | DebugCategory, | |
... | |||
) |
Definition at line 34 of file RedfishDebugLib.h.
#define DEBUG_REDFISH_COMPONENT_PLATFORM_CONFIG_DXE 0x00000001 |
Definition at line 32 of file RedfishDebugLib.h.
#define DEBUG_REDFISH_HOST_INTERFACE DEBUG_MANAGEABILITY |
Debug error level for Redfish Host INterface.
Definition at line 24 of file RedfishDebugLib.h.
#define DEBUG_REDFISH_NETWORK DEBUG_MANAGEABILITY |
Debug error level for Redfish networking function.
Definition at line 23 of file RedfishDebugLib.h.
#define DEBUG_REDFISH_PLATFORM_CONFIG DEBUG_MANAGEABILITY |
Debug error level for Redfish Platform Configure Driver.
Definition at line 25 of file RedfishDebugLib.h.
BOOLEAN DebugRedfishComponentEnabled | ( | IN UINT64 | RedfishDebugCategory | ) |
Determine whether the Redfish debug category is enabled in gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDebugCategory.
[in] | DebugCategory | Redfish debug category. |
TRUE | This debug category is enabled. |
FALSE | This debug category is disabled.. |
Determine whether the Redfish debug category is enabled in gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDebugCategory.
[in] | RedfishDebugCategory | Redfish debug category. |
TRUE | This debug category is enabled. |
FALSE | This debug category is disabled.. |
Definition at line 34 of file RedfishDebugLib.c.
Debug output raw data buffer.
[in] | ErrorLevel | DEBUG macro error level |
[in] | Buffer | Debug output data buffer. |
[in] | BufferSize | The size of Buffer in byte. |
EFI_SUCCESS | Debug dump finished. |
EFI_INVALID_PARAMETER | Buffer is NULL. |
Definition at line 349 of file RedfishDebugLib.c.
EFI_STATUS DumpHttpStatusCode | ( | IN UINTN | ErrorLevel, |
IN EFI_HTTP_STATUS_CODE | HttpStatusCode | ||
) |
This function dump the HTTP status code.
[in] | ErrorLevel | DEBUG macro error level |
[in] | HttpStatusCode | HTTP status code |
EFI_SUCCESS | HTTP status code is printed |
Definition at line 207 of file RedfishDebugLib.c.
EFI_STATUS DumpIpv4Address | ( | IN UINTN | ErrorLevel, |
IN EFI_IPv4_ADDRESS * | Ipv4Address | ||
) |
This function dump the IPv4 address in given error level.
[in] | ErrorLevel | DEBUG macro error level |
[in] | Ipv4Address | IPv4 address to dump |
EFI_SUCCESS | IPv4 address string is printed. |
Others | Errors occur. |
Definition at line 323 of file RedfishDebugLib.c.
EFI_STATUS DumpJsonValue | ( | IN UINTN | ErrorLevel, |
IN EDKII_JSON_VALUE | JsonValue | ||
) |
This function dump the Json string in given error level.
[in] | ErrorLevel | DEBUG macro error level |
[in] | JsonValue | Json value to dump. |
EFI_SUCCESS | Json string is printed. |
Others | Errors occur. |
Definition at line 117 of file RedfishDebugLib.c.
EFI_STATUS DumpRedfishPayload | ( | IN UINTN | ErrorLevel, |
IN REDFISH_PAYLOAD | Payload | ||
) |
This function dump the status code, header and body in given Redfish payload.
[in] | ErrorLevel | DEBUG macro error level |
[in] | Payload | Redfish payload to dump |
EFI_SUCCESS | Redfish payload is printed. |
Others | Errors occur. |
Definition at line 176 of file RedfishDebugLib.c.
EFI_STATUS DumpRedfishResponse | ( | IN CONST CHAR8 * | Message, |
IN UINTN | ErrorLevel, | ||
IN REDFISH_RESPONSE * | Response | ||
) |
This function dump the status code, header and body in given Redfish response.
[in] | Message | Message string |
[in] | ErrorLevel | DEBUG macro error level |
[in] | Response | Redfish response to dump |
EFI_SUCCESS | Redfish response is printed. |
Others | Errors occur. |
Definition at line 268 of file RedfishDebugLib.c.
EFI_STATUS DumpRedfishValue | ( | IN UINTN | ErrorLevel, |
IN EDKII_REDFISH_VALUE * | RedfishValue | ||
) |
Debug print the value of RedfishValue.
[in] | ErrorLevel | DEBUG macro error level. |
[in] | RedfishValue | The statement value to print. |
EFI_SUCCESS | RedfishValue is printed. |
EFI_INVALID_PARAMETER | RedfishValue is NULL. |
Definition at line 54 of file RedfishDebugLib.c.