-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RedfishClientPkg: introduce Redfish override protocol
Introduce Redfish override protocol to notify platform that the Redfish changes system settings and about to perform system reboot. Signed-off-by: Nickle Wang <[email protected]> Cc: Abner Chang <[email protected]> Cc: Igor Kulchytskyy <[email protected]> Cc: Nick Ramirez <[email protected]>
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
RedfishClientPkg/Include/Protocol/EdkIIRedfishOverrideProtocol.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters