12#ifndef ARM_SCMI_PERFORMANCE_PROTOCOL_H_
13#define ARM_SCMI_PERFORMANCE_PROTOCOL_H_
18#define PERFORMANCE_PROTOCOL_VERSION_V1 0x10000
19#define PERFORMANCE_PROTOCOL_VERSION_V2 0x20000
20#define PERFORMANCE_PROTOCOL_VERSION_V3 0x30000
22#define ARM_SCMI_PERFORMANCE_PROTOCOL_GUID { \
23 0x9b8ba84, 0x3dd3, 0x49a6, {0xa0, 0x5a, 0x31, 0x34, 0xa5, 0xf0, 0x7b, 0xad} \
26extern EFI_GUID gArmScmiPerformanceProtocolGuid;
32#define POWER_IN_MW_SHIFT 16
33#define POWER_IN_MW_MASK 0x1
34#define NUM_PERF_DOMAINS_MASK 0xFFFF
37#define SCMI_PERF_TOTAL_DOMAINS(Attr) (Attr & NUM_PERF_DOMAINS_MASK)
40#define SCMI_PERF_POWER_IN_MW(Attr) ((Attr >> POWER_IN_MW_SHIFT) & \
46 UINT64 StatisticsAddress;
50#define SCMI_PERF_SUPPORT_LVL_CHANGE_NOTIFY(Attr) ((Attr >> 28) & 0x1)
51#define SCMI_PERF_SUPPORT_LIM_CHANGE_NOTIFY(Attr) ((Attr >> 29) & 0x1)
52#define SCMI_PERF_SUPPORT_SET_LVL(Attr) ((Attr >> 30) & 0x1)
53#define SCMI_PERF_SUPPORT_SET_LIM(Attr) ((Attr >> 31) & 0x1)
54#define SCMI_PERF_RATE_LIMIT(RateLimit) (RateLimit & 0xFFF)
61 UINT32 SustainedPerfLevel;
62 UINT8 Name[SCMI_MAX_STR_LEN];
66#define PERF_LATENCY_MASK 0xFFFF
67#define SCMI_PERFORMANCE_PROTOCOL_LATENCY(Latency) (Latency & PERF_LATENCY_MASK)
83#define SCMI_PERF_FC_ATTRIB_HAS_DOORBELL BIT0
125 ScmiMessageIdPerformanceDomainAttributes = 0x3,
126 ScmiMessageIdPerformanceDescribeLevels = 0x4,
127 ScmiMessageIdPerformanceLimitsSet = 0x5,
128 ScmiMessageIdPerformanceLimitsGet = 0x6,
129 ScmiMessageIdPerformanceLevelSet = 0x7,
130 ScmiMessageIdPerformanceLevelGet = 0x8,
131 ScmiMessageIdPerformanceDescribeFastchannel = 0xB,
212 OUT UINT32 *NumLevels,
213 IN OUT UINT32 *LevelArraySize,
Performance protocol describe fastchannel.
UINT32 DoorbellAddrHigh
Higher 32 bits of the doorbell address.
UINT32 DoorbellSetMaskHigh
Mask of higher 32 bits to set when writing to the doorbell register.
UINT32 Attributes
Attributes.
UINT32 DoorbellAddrLow
Lower 32 bits of the doorbell address.
UINT32 ChanAddrHigh
Higher 32 bits of the FastChannel address.
UINT32 DoorbellSetMaskLow
Mask of lower 32 bits to set when writing to the doorbell register.
UINT32 ChanAddrLow
Lower 32 bits of the FastChannel address.
UINT32 DoorbellPreserveMaskHigh
Mask of higher 32 bits to preserve when writing to the doorbell register.
UINT32 ChanSize
Size of the FastChannel in bytes.
UINT32 RateLimit
Rate limit.
UINT32 DoorbellPreserveMaskLow
Mask of lower 32 bits to preserve when writing to the doorbell register.