summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNickle Wang <nicklew@nvidia.com>2025-01-17 08:02:10 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-01-23 02:58:21 +0300
commit54c1460dd0823e548c4bb48caafb8a896c42557b (patch)
tree4a1499fb353ca7d98d37b5de338b316f293effff
parent3ba6f7d966b42020284dc3bdee0c5a1390b034f6 (diff)
downloadedk2-54c1460dd0823e548c4bb48caafb8a896c42557b.tar.xz
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>
-rw-r--r--RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.c b/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.c
index 2de5443bcd..0a308a772b 100644
--- a/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.c
+++ b/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.c
@@ -2,7 +2,7 @@
RedfishHttpDxe produces EdkIIRedfishHttpProtocol
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
@@ -255,18 +255,16 @@ ReportHttpError (
//
AsciiSPrint (ErrorMsg, sizeof (ErrorMsg), REDFISH_HTTP_ERROR_REPORT, HttpMethodToString (Method), (HttpStatusCode == NULL ? HTTP_STATUS_UNSUPPORTED_STATUS : *HttpStatusCode), Uri);
DEBUG ((DEBUG_ERROR, "%a\n", ErrorMsg));
+
//
- // TODO:
- // 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 this failure via status code and BMC has chance to capture the error.
//
- // REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
- // EFI_ERROR_CODE | EFI_ERROR_MAJOR,
- // EFI_COMPUTING_UNIT_MANAGEABILITY | EFI_MANAGEABILITY_EC_REDFISH_COMMUNICATION_ERROR,
- // ErrorMsg,
- // AsciiStrSize (ErrorMsg)
- // );
+ REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
+ EFI_ERROR_CODE | EFI_ERROR_MAJOR,
+ EFI_COMPUTING_UNIT_MANAGEABILITY | EFI_MANAGEABILITY_EC_REDFISH_COMMUNICATION_ERROR,
+ ErrorMsg,
+ AsciiStrSize (ErrorMsg)
+ );
}
/**