diff options
author | Nickle Wang <nicklew@nvidia.com> | 2023-03-27 22:34:43 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-03-29 09:22:35 +0000 |
commit | e3aba976f6d588abd88027fef46999a1d3724576 (patch) | |
tree | 99c881ef913d4089897659126f93678b9c2ce4a2 /RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c | |
parent | 0cd7542a69943c8c006316b4aa1cc74cc1748155 (diff) | |
download | edk2-e3aba976f6d588abd88027fef46999a1d3724576.tar.gz edk2-e3aba976f6d588abd88027fef46999a1d3724576.tar.bz2 edk2-e3aba976f6d588abd88027fef46999a1d3724576.zip |
RedfishPkg: fix config handler driver issues
Bug fix:
- function stack fault
- config handler driver requires the dependency of Redfish Credential
Protocol
- incorrect caller id installation when failed to perform init()
- fix typo
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
Diffstat (limited to 'RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c')
-rw-r--r-- | RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c index c3a7efd796..96aac125ee 100644 --- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c +++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c @@ -2,6 +2,7 @@ The common code of EDKII Redfish Configuration Handler driver.
(C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+ Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -9,7 +10,7 @@ #include "RedfishConfigHandlerCommon.h"
-REDFISH_CONFIG_DRIVER_DATA gRedfishConfigData; // Only one Redfish service supproted
+REDFISH_CONFIG_DRIVER_DATA gRedfishConfigData; // Only one Redfish service supported
// on platform for the BIOS
// Redfish configuration.
EFI_EVENT gEndOfDxeEvent = NULL;
@@ -34,7 +35,7 @@ RedfishConfigOnEndOfDxe ( Status = gCredential->StopService (gCredential, ServiceStopTypeSecureBootDisabled);
if (EFI_ERROR (Status) && (Status != EFI_UNSUPPORTED)) {
- DEBUG ((DEBUG_ERROR, "Redfish credential protocol faied to stop service on EndOfDxe: %r", Status));
+ DEBUG ((DEBUG_ERROR, "Redfish credential protocol failed to stop service on EndOfDxe: %r", Status));
}
//
@@ -62,7 +63,7 @@ RedfishConfigOnExitBootService ( Status = gCredential->StopService (gCredential, ServiceStopTypeExitBootService);
if (EFI_ERROR (Status) && (Status != EFI_UNSUPPORTED)) {
- DEBUG ((DEBUG_ERROR, "Redfish credential protocol faied to stop service on ExitBootService: %r", Status));
+ DEBUG ((DEBUG_ERROR, "Redfish credential protocol failed to stop service on ExitBootService: %r", Status));
}
}
@@ -225,7 +226,7 @@ RedfishConfigHandlerInitialization ( UINTN NumberOfHandles;
EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL *ConfigHandler;
UINTN Index;
- UINT32 Id;
+ UINT32 *Id;
Status = gBS->LocateHandleBuffer (
ByProtocol,
@@ -257,6 +258,7 @@ RedfishConfigHandlerInitialization ( Status = ConfigHandler->Init (ConfigHandler, &gRedfishConfigData.RedfishServiceInfo);
if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {
DEBUG ((DEBUG_ERROR, "ERROR: Failed to init Redfish config handler %p.\n", ConfigHandler));
+ continue;
}
//
|