]> xenbits.xensource.com Git - ovmf.git/commitdiff
RedfishPkg: fix config handler driver issues
authorNickle Wang <nicklew@nvidia.com>
Mon, 27 Mar 2023 14:34:43 +0000 (22:34 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 29 Mar 2023 09:22:35 +0000 (09:22 +0000)
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>
RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c
RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf

index c3a7efd796a58b7e70ae686e97acb4a07a842419..96aac125ee225b788663af0ceb815dc31031857c 100644 (file)
@@ -2,6 +2,7 @@
   The common code of EDKII Redfish Configuration Handler driver.\r
 \r
   (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>\r
+  Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
@@ -9,7 +10,7 @@
 \r
 #include "RedfishConfigHandlerCommon.h"\r
 \r
-REDFISH_CONFIG_DRIVER_DATA  gRedfishConfigData;     // Only one Redfish service supproted\r
+REDFISH_CONFIG_DRIVER_DATA  gRedfishConfigData;     // Only one Redfish service supported\r
                                                     // on platform for the BIOS\r
                                                     // Redfish configuration.\r
 EFI_EVENT                          gEndOfDxeEvent        = NULL;\r
@@ -34,7 +35,7 @@ RedfishConfigOnEndOfDxe (
 \r
   Status = gCredential->StopService (gCredential, ServiceStopTypeSecureBootDisabled);\r
   if (EFI_ERROR (Status) && (Status != EFI_UNSUPPORTED)) {\r
-    DEBUG ((DEBUG_ERROR, "Redfish credential protocol faied to stop service on EndOfDxe: %r", Status));\r
+    DEBUG ((DEBUG_ERROR, "Redfish credential protocol failed to stop service on EndOfDxe: %r", Status));\r
   }\r
 \r
   //\r
@@ -62,7 +63,7 @@ RedfishConfigOnExitBootService (
 \r
   Status = gCredential->StopService (gCredential, ServiceStopTypeExitBootService);\r
   if (EFI_ERROR (Status) && (Status != EFI_UNSUPPORTED)) {\r
-    DEBUG ((DEBUG_ERROR, "Redfish credential protocol faied to stop service on ExitBootService: %r", Status));\r
+    DEBUG ((DEBUG_ERROR, "Redfish credential protocol failed to stop service on ExitBootService: %r", Status));\r
   }\r
 }\r
 \r
@@ -225,7 +226,7 @@ RedfishConfigHandlerInitialization (
   UINTN                                  NumberOfHandles;\r
   EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL  *ConfigHandler;\r
   UINTN                                  Index;\r
-  UINT32                                 Id;\r
+  UINT32                                 *Id;\r
 \r
   Status = gBS->LocateHandleBuffer (\r
                   ByProtocol,\r
@@ -257,6 +258,7 @@ RedfishConfigHandlerInitialization (
     Status = ConfigHandler->Init (ConfigHandler, &gRedfishConfigData.RedfishServiceInfo);\r
     if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {\r
       DEBUG ((DEBUG_ERROR, "ERROR: Failed to init Redfish config handler %p.\n", ConfigHandler));\r
+      continue;\r
     }\r
 \r
     //\r
index def91c75316f870036491a396d782b057a1edadb..b167c6e1ee41338fb469c3daee455723f7343c78 100644 (file)
@@ -4,6 +4,7 @@
 #\r
 #  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
 #  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>\r
+#  Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\r
 #\r
 #  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
@@ -56,5 +57,4 @@
   gEfiEndOfDxeEventGroupGuid              ## CONSUMES ## Event\r
 \r
 [Depex]\r
-  TRUE\r
-\r
+  gEdkIIRedfishCredentialProtocolGuid\r