RedfishPkg/RedfishHttpDxe: report failure via status code

Manageability status code is introduced to edk2. Enable the ability
to report Redfish communication failure via status code. This
gives the chance for BMC to capture Redfish error.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
This commit is contained in:
Nickle Wang 2025-01-17 13:02:10 +08:00 committed by mergify[bot]
parent 3ba6f7d966
commit 54c1460dd0
1 changed files with 9 additions and 11 deletions

View File

@ -2,7 +2,7 @@
RedfishHttpDxe produces EdkIIRedfishHttpProtocol RedfishHttpDxe produces EdkIIRedfishHttpProtocol
for EDK2 Redfish Feature driver to do HTTP operations. for EDK2 Redfish Feature driver to do HTTP operations.
Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. Copyright (c) 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@ -255,18 +255,16 @@ ReportHttpError (
// //
AsciiSPrint (ErrorMsg, sizeof (ErrorMsg), REDFISH_HTTP_ERROR_REPORT, HttpMethodToString (Method), (HttpStatusCode == NULL ? HTTP_STATUS_UNSUPPORTED_STATUS : *HttpStatusCode), Uri); AsciiSPrint (ErrorMsg, sizeof (ErrorMsg), REDFISH_HTTP_ERROR_REPORT, HttpMethodToString (Method), (HttpStatusCode == NULL ? HTTP_STATUS_UNSUPPORTED_STATUS : *HttpStatusCode), Uri);
DEBUG ((DEBUG_ERROR, "%a\n", ErrorMsg)); DEBUG ((DEBUG_ERROR, "%a\n", ErrorMsg));
// //
// TODO: // Report this failure via status code and BMC has chance to capture the error.
// Below PI status code is approved by PIWG and wait for specification published.
// We will uncomment below report status code after PI status code get published.
// REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4483
// //
// REPORT_STATUS_CODE_WITH_EXTENDED_DATA ( REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
// EFI_ERROR_CODE | EFI_ERROR_MAJOR, EFI_ERROR_CODE | EFI_ERROR_MAJOR,
// EFI_COMPUTING_UNIT_MANAGEABILITY | EFI_MANAGEABILITY_EC_REDFISH_COMMUNICATION_ERROR, EFI_COMPUTING_UNIT_MANAGEABILITY | EFI_MANAGEABILITY_EC_REDFISH_COMMUNICATION_ERROR,
// ErrorMsg, ErrorMsg,
// AsciiStrSize (ErrorMsg) AsciiStrSize (ErrorMsg)
// ); );
} }
/** /**