public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/2] RedfishPkg: fix config handler driver bug
@ 2023-02-01  3:05 Nickle Wang
  2023-02-04  3:51 ` Chang, Abner
  0 siblings, 1 reply; 2+ messages in thread
From: Nickle Wang @ 2023-02-01  3:05 UTC (permalink / raw)
  To: devel; +Cc: Abner Chang, Igor Kulchytskyy, Nick Ramirez

Bug fix:
- function stack fault
- config handler driver requires the dependency of Redfish Credential
  Protocol
- incorrect caller id installation when failed to perform init()

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>
---
 .../RedfishConfigHandler/RedfishConfigHandlerDriver.inf       | 4 ++--
 RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c  | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf
index def91c7531..b167c6e1ee 100644
--- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf
+++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf
@@ -4,6 +4,7 @@
 #
 #  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
 #  (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
 #
@@ -56,5 +57,4 @@
   gEfiEndOfDxeEventGroupGuid              ## CONSUMES ## Event
 
 [Depex]
-  TRUE
-
+  gEdkIIRedfishCredentialProtocolGuid
diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c
index c3a7efd796..45276793c7 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
 
@@ -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;
     }
 
     //
-- 
2.39.1.windows.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] RedfishPkg: fix config handler driver bug
  2023-02-01  3:05 [PATCH 1/2] RedfishPkg: fix config handler driver bug Nickle Wang
@ 2023-02-04  3:51 ` Chang, Abner
  0 siblings, 0 replies; 2+ messages in thread
From: Chang, Abner @ 2023-02-04  3:51 UTC (permalink / raw)
  To: Nickle Wang, devel@edk2.groups.io; +Cc: Igor Kulchytskyy, Nick Ramirez

[AMD Official Use Only - General]

Reviewed-by: Abner Chang <abner.chang@amd.com>

> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Wednesday, February 1, 2023 11:05 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>; Nick Ramirez <nramirez@nvidia.com>
> Subject: [PATCH 1/2] RedfishPkg: fix config handler driver bug
> 
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
> 
> 
> Bug fix:
> - function stack fault
> - config handler driver requires the dependency of Redfish Credential
>   Protocol
> - incorrect caller id installation when failed to perform init()
> 
> 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>
> ---
>  .../RedfishConfigHandler/RedfishConfigHandlerDriver.inf       | 4 ++--
>  RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c  | 4 +++-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf
> b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf
> index def91c7531..b167c6e1ee 100644
> --- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf
> +++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.inf
> @@ -4,6 +4,7 @@
>  #
>  #  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>  #  (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  # @@ -56,5 +57,4 @@
>    gEfiEndOfDxeEventGroupGuid              ## CONSUMES ## Event
> 
>  [Depex]
> -  TRUE
> -
> +  gEdkIIRedfishCredentialProtocolGuid
> diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c
> b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c
> index c3a7efd796..45276793c7 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
> 
> @@ -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;
>      }
> 
>      //
> --
> 2.39.1.windows.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-04  3:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-01  3:05 [PATCH 1/2] RedfishPkg: fix config handler driver bug Nickle Wang
2023-02-04  3:51 ` Chang, Abner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox