[AMD Official Use Only - General] Reviewed-by: Abner Chang <abner.ch...@amd.com>
> -----Original Message----- > From: Nickle Wang <nick...@nvidia.com> > Sent: Thursday, November 2, 2023 6:18 PM > To: devel@edk2.groups.io > Cc: Chang, Abner <abner.ch...@amd.com>; Igor Kulchytskyy > <ig...@ami.com>; Nick Ramirez <nrami...@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 <nick...@nvidia.com> > Cc: Abner Chang <abner.ch...@amd.com> > Cc: Igor Kulchytskyy <ig...@ami.com> > Cc: Nick Ramirez <nrami...@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/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-