public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chang, Abner" <abner.chang@amd.com>
To: Nickle Wang <nicklew@nvidia.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Igor Kulchytskyy <igork@ami.com>, Nick Ramirez <nramirez@nvidia.com>
Subject: Re: [PATCH 3/3] RedfishPkg: fix config handler driver issues
Date: Wed, 29 Mar 2023 02:21:30 +0000	[thread overview]
Message-ID: <BY5PR12MB3954B50C4A5DE88CAD13AF1FEA899@BY5PR12MB3954.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20230328055919.267-1-nicklew@nvidia.com>

[AMD Official Use Only - General]

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

> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Tuesday, March 28, 2023 1:59 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>; Nick Ramirez <nramirez@nvidia.com>
> Subject: [PATCH 3/3] RedfishPkg: fix config handler driver issues
> 
> 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()
> - 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>
> ---
>  .../RedfishConfigHandlerDriver.inf                     |  4 ++--
>  .../RedfishConfigHandler/RedfishConfigHandlerCommon.c  | 10 ++++++----
>  2 files changed, 8 insertions(+), 6 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..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;
>      }
> 
>      //
> --
> 2.40.0.windows.1

      reply	other threads:[~2023-03-29  2:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28  5:59 [PATCH 3/3] RedfishPkg: fix config handler driver issues Nickle Wang
2023-03-29  2:21 ` Chang, Abner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BY5PR12MB3954B50C4A5DE88CAD13AF1FEA899@BY5PR12MB3954.namprd12.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox