diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishOverrideProtocol.h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishOverrideProtocol.h new file mode 100644 index 000000000..3c3e8bf2a --- /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 + +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 diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/RedfishClientPkg.dec index eccbc22ef..5f8a03501 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