public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chang, Abner via groups.io" <abner.chang=amd.com@groups.io>
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: [edk2-devel] [edk2-redfish-client][PATCH 1/2] RedfishClientPkg: introduce Redfish override protocol
Date: Mon, 6 Nov 2023 00:47:20 +0000	[thread overview]
Message-ID: <MN2PR12MB3966A5D53BEE9BC46D507FECEAAAA@MN2PR12MB3966.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20231102101748.13807-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: Thursday, November 2, 2023 6:18 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>; Nick Ramirez <nramirez@nvidia.com>
> Subject: [edk2-redfish-client][PATCH 1/2] RedfishClientPkg: introduce Redfish
> override protocol
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Introduce Redfish override protocol to notify platform that the Redfish
> changes system settings and about to perform system reboot.
>
> 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>
> ---
>  RedfishClientPkg/RedfishClientPkg.dec         |  2 +
>  .../Protocol/EdkIIRedfishOverrideProtocol.h   | 60 +++++++++++++++++++
>  2 files changed, 62 insertions(+)
>  create mode 100644
> RedfishClientPkg/Include/Protocol/EdkIIRedfishOverrideProtocol.h
>
> diff --git a/RedfishClientPkg/RedfishClientPkg.dec
> b/RedfishClientPkg/RedfishClientPkg.dec
> index eccbc22e..5f8a0350 100644
> --- a/RedfishClientPkg/RedfishClientPkg.dec
> +++ b/RedfishClientPkg/RedfishClientPkg.dec
> @@ -45,6 +45,8 @@
>    gEdkIIRedfishFeatureInterchangeDataProtocolGuid = { 0x4B8FF71C,
> 0x4A7B, 0x9478, { 0xB7, 0x81, 0x35, 0x9B, 0x0A, 0xF2, 0x00, 0x91 } }
>    ## Include/Protocol/EdkIIRedfishResourceAddendumProtocol.h
>    gEdkIIRedfishResourceAddendumProtocolGuid = { 0xda36b12b, 0xaad4,
> 0x4e90, { 0xba, 0xcb, 0xe3, 0xb5, 0x3b, 0x08, 0xbc, 0x54 } }
> +  ## Include/Protocol/EdkIIRedfishOverrideProtocol.h
> +  gEdkiiRedfishOverrideProtocolGuid         = { 0xb55bef20, 0xf7c8, 0x4ae9,
> { 0xa7, 0xca, 0x8b, 0xba, 0x9f, 0x7b, 0xbf, 0x9c } }
>
>  [Guids]
>    ## Include/Guid/RedfishClientPkgTokenSpace.h
> diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishOverrideProtocol.h
> b/RedfishClientPkg/Include/Protocol/EdkIIRedfishOverrideProtocol.h
> new file mode 100644
> index 00000000..3c3e8bf2
> --- /dev/null
> +++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishOverrideProtocol.h
> @@ -0,0 +1,60 @@
> +/** @file
> +  This file defines the EDKII_REDFISH_OVERRIDE_PROTOCOL interface.
> +
> +  Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights
> reserved.
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef EDKII_REDFISH_OVERRIDE_PROTOCOL_H_
> +#define EDKII_REDFISH_OVERRIDE_PROTOCOL_H_
> +
> +#include <Uefi.h>
> +
> +typedef struct _EDKII_REDFISH_OVERRIDE_PROTOCOL
> EDKII_REDFISH_OVERRIDE_PROTOCOL;
> +
> +///
> +/// Definition of EDKII_REDFISH_PHASE_TYPE.
> +///
> +typedef enum {
> +  EdkiiRedfishPhaseBeforeReboot,
> +  EdkiiRedfishPhaseMax
> +} EDKII_REDFISH_PHASE_TYPE;
> +
> +/**
> +  The callback function to notify platform and provide Redfish phase.
> +
> +  @param[in] This           Pointer to EDKII_REDFISH_OVERRIDE_PROTOCOL
> instance.
> +  @param[in] PhaseType      The type of phase in Redfish operation.
> +
> +  @retval EFI_SUCCESS       The notify function completed successfully.
> +  @retval Others            Some errors happened.
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EDKII_REDFISH_NOTIFY_PHASE)(
> +  IN EDKII_REDFISH_OVERRIDE_PROTOCOL  *This,
> +  IN EDKII_REDFISH_PHASE_TYPE         PhaseType
> +  );
> +
> +//
> +// The definition of _EDKII_REDFISH_OVERRIDE_PROTOCOL
> +//
> +struct _EDKII_REDFISH_OVERRIDE_PROTOCOL {
> +  //
> +  // Protocol version of this implementation
> +  //
> +  UINT32                        Version;
> +  //
> +  // Callback to notify Redfish phase
> +  //
> +  EDKII_REDFISH_NOTIFY_PHASE    NotifyPhase;
> +};
> +
> +#define EDKII_REDFISH_OVERRIDE_PROTOCOL_REVISION  0x00001000
> +
> +extern EFI_GUID  gEdkiiRedfishOverrideProtocolGuid;
> +
> +#endif
> --
> 2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110686): https://edk2.groups.io/g/devel/message/110686
Mute This Topic: https://groups.io/mt/102338703/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



      reply	other threads:[~2023-11-06  0:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 10:17 [edk2-devel] [edk2-redfish-client][PATCH 1/2] RedfishClientPkg: introduce Redfish override protocol Nickle Wang via groups.io
2023-11-06  0:47 ` Chang, Abner via groups.io [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=MN2PR12MB3966A5D53BEE9BC46D507FECEAAAA@MN2PR12MB3966.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