TianoCore EDK2 master
Loading...
Searching...
No Matches
ArmScmiBaseProtocol.h
Go to the documentation of this file.
1
12#ifndef ARM_SCMI_BASE_PROTOCOL_H_
13#define ARM_SCMI_BASE_PROTOCOL_H_
14
15#include <Protocol/ArmScmi.h>
16
17#define BASE_PROTOCOL_VERSION_V1 0x10000
18#define BASE_PROTOCOL_VERSION_V2 0x20000
19
20#define NUM_PROTOCOL_MASK 0xFFU
21#define NUM_AGENT_MASK 0xFFU
22
23#define NUM_AGENT_SHIFT 0x8
24
28#define SCMI_TOTAL_PROTOCOLS(Attr) (Attr & NUM_PROTOCOL_MASK)
29
30// Returns total number of agents in the system.
31#define SCMI_TOTAL_AGENTS(Attr) ((Attr >> NUM_AGENT_SHIFT) & NUM_AGENT_MASK)
32
33#define ARM_SCMI_BASE_PROTOCOL_GUID { \
34 0xd7e5abe9, 0x33ab, 0x418e, {0x9f, 0x91, 0x72, 0xda, 0xe2, 0xba, 0x8e, 0x2f} \
35 }
36
37extern EFI_GUID gArmScmiBaseProtocolGuid;
38
40
51typedef
53(EFIAPI *SCMI_BASE_GET_VERSION)(
55 OUT UINT32 *Version
56 );
57
68typedef
72 OUT UINT32 *TotalProtocols
73 );
74
86typedef
90 OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN]
91 );
92
104typedef
108 OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN]
109 );
110
121typedef
125 OUT UINT32 *ImplementationVersion
126 );
127
142typedef
146 IN OUT UINT32 *ProtocolListSize,
147 OUT UINT8 *ProtocolList
148 );
149
150// Base protocol.
151typedef struct _SCMI_BASE_PROTOCOL {
152 SCMI_BASE_GET_VERSION GetVersion;
153 SCMI_BASE_GET_TOTAL_PROTOCOLS GetTotalProtocols;
154 SCMI_BASE_DISCOVER_VENDOR DiscoverVendor;
155 SCMI_BASE_DISCOVER_SUB_VENDOR DiscoverSubVendor;
156 SCMI_BASE_DISCOVER_IMPLEMENTATION_VERSION DiscoverImplementationVersion;
157 SCMI_BASE_DISCOVER_LIST_PROTOCOLS DiscoverListProtocols;
159
160// SCMI Message IDs for Base protocol.
161typedef enum {
162 ScmiMessageIdBaseDiscoverVendor = 0x3,
163 ScmiMessageIdBaseDiscoverSubVendor = 0x4,
164 ScmiMessageIdBaseDiscoverImplementationVersion = 0x5,
165 ScmiMessageIdBaseDiscoverListProtocols = 0x6
166} SCMI_MESSAGE_ID_BASE;
167
168#endif /* ARM_SCMI_BASE_PROTOCOL_H_ */
EFI_STATUS(EFIAPI * SCMI_BASE_GET_VERSION)(IN SCMI_BASE_PROTOCOL *This, OUT UINT32 *Version)
EFI_STATUS(EFIAPI * SCMI_BASE_DISCOVER_VENDOR)(IN SCMI_BASE_PROTOCOL *This, OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN])
EFI_STATUS(EFIAPI * SCMI_BASE_GET_TOTAL_PROTOCOLS)(IN SCMI_BASE_PROTOCOL *This, OUT UINT32 *TotalProtocols)
EFI_STATUS(EFIAPI * SCMI_BASE_DISCOVER_IMPLEMENTATION_VERSION)(IN SCMI_BASE_PROTOCOL *This, OUT UINT32 *ImplementationVersion)
EFI_STATUS(EFIAPI * SCMI_BASE_DISCOVER_LIST_PROTOCOLS)(IN SCMI_BASE_PROTOCOL *This, IN OUT UINT32 *ProtocolListSize, OUT UINT8 *ProtocolList)
EFI_STATUS(EFIAPI * SCMI_BASE_DISCOVER_SUB_VENDOR)(IN SCMI_BASE_PROTOCOL *This, OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN])
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
Definition: Base.h:213