TianoCore EDK2 master
Loading...
Searching...
No Matches
ArmScmiPerformanceProtocol.h File Reference
#include <Protocol/ArmScmi.h>

Go to the source code of this file.

Data Structures

struct  SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES
 
struct  SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES
 
struct  SCMI_PERFORMANCE_LEVEL
 
struct  SCMI_PERFORMANCE_LIMITS
 
struct  SCMI_PERFORMANCE_FASTCHANNEL
 Performance protocol describe fastchannel. More...
 
struct  _SCMI_PERFORMANCE_PROTOCOL
 

Macros

#define PERFORMANCE_PROTOCOL_VERSION_V1   0x10000
 Arm Scmi performance protocol versions.
 
#define PERFORMANCE_PROTOCOL_VERSION_V2   0x20000
 
#define PERFORMANCE_PROTOCOL_VERSION_V3   0x30000
 
#define ARM_SCMI_PERFORMANCE_PROTOCOL_GUID
 
#define POWER_IN_MW_SHIFT   16
 
#define POWER_IN_MW_MASK   0x1
 
#define NUM_PERF_DOMAINS_MASK   0xFFFF
 
#define SCMI_PERF_TOTAL_DOMAINS(Attr)   (Attr & NUM_PERF_DOMAINS_MASK)
 
#define SCMI_PERF_POWER_IN_MW(Attr)
 
#define SCMI_PERF_SUPPORT_LVL_CHANGE_NOTIFY(Attr)   ((Attr >> 28) & 0x1)
 
#define SCMI_PERF_SUPPORT_LIM_CHANGE_NOTIFY(Attr)   ((Attr >> 29) & 0x1)
 
#define SCMI_PERF_SUPPORT_SET_LVL(Attr)   ((Attr >> 30) & 0x1)
 
#define SCMI_PERF_SUPPORT_SET_LIM(Attr)   ((Attr >> 31) & 0x1)
 
#define SCMI_PERF_RATE_LIMIT(RateLimit)   (RateLimit & 0xFFF)
 
#define PERF_LATENCY_MASK   0xFFFF
 
#define SCMI_PERFORMANCE_PROTOCOL_LATENCY(Latency)   (Latency & PERF_LATENCY_MASK)
 
#define SCMI_PERF_FC_ATTRIB_HAS_DOORBELL   BIT0
 Doorbell Support bit.
 

Typedefs

typedef struct _SCMI_PERFORMANCE_PROTOCOL SCMI_PERFORMANCE_PROTOCOL
 
typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_GET_VERSION) (IN SCMI_PERFORMANCE_PROTOCOL *This, OUT UINT32 *Version)
 
typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_GET_ATTRIBUTES) (IN SCMI_PERFORMANCE_PROTOCOL *This, OUT SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES *Attributes)
 
typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_GET_DOMAIN_ATTRIBUTES) (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, OUT SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES *DomainAttributes)
 
typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_DESCRIBE_LEVELS) (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, OUT UINT32 *NumLevels, IN OUT UINT32 *LevelArraySize, OUT SCMI_PERFORMANCE_LEVEL *LevelArray)
 
typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_LIMITS_SET) (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, IN SCMI_PERFORMANCE_LIMITS *Limits)
 
typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_LIMITS_GET) (SCMI_PERFORMANCE_PROTOCOL *This, UINT32 DomainId, SCMI_PERFORMANCE_LIMITS *Limits)
 
typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_LEVEL_SET) (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, IN UINT32 Level)
 
typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_LEVEL_GET) (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, OUT UINT32 *Level)
 
typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_DESCRIBE_FASTCHANNEL) (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, IN SCMI_MESSAGE_ID_PERFORMANCE MessageId, OUT SCMI_PERFORMANCE_FASTCHANNEL *FastChannel)
 

Enumerations

enum  SCMI_MESSAGE_ID_PERFORMANCE {
  ScmiMessageIdPerformanceDomainAttributes = 0x3 , ScmiMessageIdPerformanceDescribeLevels = 0x4 , ScmiMessageIdPerformanceLimitsSet = 0x5 , ScmiMessageIdPerformanceLimitsGet = 0x6 ,
  ScmiMessageIdPerformanceLevelSet = 0x7 , ScmiMessageIdPerformanceLevelGet = 0x8 , ScmiMessageIdPerformanceDescribeFastchannel = 0xB
}
 SCMI Message Ids for the Performance Protocol. More...
 

Variables

EFI_GUID gArmScmiPerformanceProtocolGuid
 

Detailed Description

Copyright (c) 2017-2023, Arm Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

System Control and Management Interface V3.2, latest version at:

Definition in file ArmScmiPerformanceProtocol.h.

Macro Definition Documentation

◆ ARM_SCMI_PERFORMANCE_PROTOCOL_GUID

#define ARM_SCMI_PERFORMANCE_PROTOCOL_GUID
Value:
{ \
0x9b8ba84, 0x3dd3, 0x49a6, {0xa0, 0x5a, 0x31, 0x34, 0xa5, 0xf0, 0x7b, 0xad} \
}

Definition at line 22 of file ArmScmiPerformanceProtocol.h.

◆ NUM_PERF_DOMAINS_MASK

#define NUM_PERF_DOMAINS_MASK   0xFFFF

Definition at line 34 of file ArmScmiPerformanceProtocol.h.

◆ PERF_LATENCY_MASK

#define PERF_LATENCY_MASK   0xFFFF

Definition at line 66 of file ArmScmiPerformanceProtocol.h.

◆ PERFORMANCE_PROTOCOL_VERSION_V1

#define PERFORMANCE_PROTOCOL_VERSION_V1   0x10000

Arm Scmi performance protocol versions.

Definition at line 18 of file ArmScmiPerformanceProtocol.h.

◆ PERFORMANCE_PROTOCOL_VERSION_V2

#define PERFORMANCE_PROTOCOL_VERSION_V2   0x20000

Definition at line 19 of file ArmScmiPerformanceProtocol.h.

◆ PERFORMANCE_PROTOCOL_VERSION_V3

#define PERFORMANCE_PROTOCOL_VERSION_V3   0x30000

Definition at line 20 of file ArmScmiPerformanceProtocol.h.

◆ POWER_IN_MW_MASK

#define POWER_IN_MW_MASK   0x1

Definition at line 33 of file ArmScmiPerformanceProtocol.h.

◆ POWER_IN_MW_SHIFT

#define POWER_IN_MW_SHIFT   16

Definition at line 32 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERF_FC_ATTRIB_HAS_DOORBELL

#define SCMI_PERF_FC_ATTRIB_HAS_DOORBELL   BIT0

Doorbell Support bit.

Definition at line 83 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERF_POWER_IN_MW

#define SCMI_PERF_POWER_IN_MW (   Attr)
Value:
((Attr >> POWER_IN_MW_SHIFT) & \
POWER_IN_MW_MASK)

Definition at line 40 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERF_RATE_LIMIT

#define SCMI_PERF_RATE_LIMIT (   RateLimit)    (RateLimit & 0xFFF)

Definition at line 54 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERF_SUPPORT_LIM_CHANGE_NOTIFY

#define SCMI_PERF_SUPPORT_LIM_CHANGE_NOTIFY (   Attr)    ((Attr >> 29) & 0x1)

Definition at line 51 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERF_SUPPORT_LVL_CHANGE_NOTIFY

#define SCMI_PERF_SUPPORT_LVL_CHANGE_NOTIFY (   Attr)    ((Attr >> 28) & 0x1)

Definition at line 50 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERF_SUPPORT_SET_LIM

#define SCMI_PERF_SUPPORT_SET_LIM (   Attr)    ((Attr >> 31) & 0x1)

Definition at line 53 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERF_SUPPORT_SET_LVL

#define SCMI_PERF_SUPPORT_SET_LVL (   Attr)    ((Attr >> 30) & 0x1)

Definition at line 52 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERF_TOTAL_DOMAINS

#define SCMI_PERF_TOTAL_DOMAINS (   Attr)    (Attr & NUM_PERF_DOMAINS_MASK)

Definition at line 37 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERFORMANCE_PROTOCOL_LATENCY

#define SCMI_PERFORMANCE_PROTOCOL_LATENCY (   Latency)    (Latency & PERF_LATENCY_MASK)

Definition at line 67 of file ArmScmiPerformanceProtocol.h.

Typedef Documentation

◆ SCMI_PERFORMANCE_DESCRIBE_FASTCHANNEL

typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_DESCRIBE_FASTCHANNEL) (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, IN SCMI_MESSAGE_ID_PERFORMANCE MessageId, OUT SCMI_PERFORMANCE_FASTCHANNEL *FastChannel)

Discover the attributes of the FastChannel for the specified performance domain and the specified message.

Parameters
[in]ThisA Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
[in]DomainIdIdentifier for the performance domain.
[in]MessageIdMessage Id of the FastChannel to discover. Must be one of:
  • PERFORMANCE_LIMITS_SET
  • PERFORMANCE_LIMITS_GET
  • PERFORMANCE_LEVEL_SET
  • PERFORMANCE_LEVEL_GET
[out]FastChannelIf success, contains the FastChannel description.
Return values
EFI_SUCCESSPerformance level got successfully.
EFI_DEVICE_ERRORSCP returns an SCMI error.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_TIMEOUTTime out.
EFI_UNSUPPORTEDUnsupported.

Definition at line 311 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERFORMANCE_DESCRIBE_LEVELS

typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_DESCRIBE_LEVELS) (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, OUT UINT32 *NumLevels, IN OUT UINT32 *LevelArraySize, OUT SCMI_PERFORMANCE_LEVEL *LevelArray)

Return list of performance domain levels of a given domain.

Parameters
[in]ThisA Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
[in]DomainIdIdentifier for the performance domain.
[out]NumLevelsTotal number of levels a domain can support.
[in,out]LevelArraySizeSize of the performance level array.
[out]LevelArrayArray of the performance levels.
Return values
EFI_SUCCESSDomain levels are returned.
EFI_DEVICE_ERRORSCP returns an SCMI error.
EFI_BUFFER_TOO_SMALLLevelArraySize is too small for the result. It has been updated to the size needed.
!(EFI_SUCCESS)Other errors.

Definition at line 208 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERFORMANCE_GET_ATTRIBUTES

typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_GET_ATTRIBUTES) (IN SCMI_PERFORMANCE_PROTOCOL *This, OUT SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES *Attributes)

Return protocol attributes of the performance management protocol.

Parameters
[in]ThisA Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
[out]AttributesProtocol attributes.
Return values
EFI_SUCCESSProtocol attributes are returned.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 164 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERFORMANCE_GET_DOMAIN_ATTRIBUTES

typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_GET_DOMAIN_ATTRIBUTES) (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, OUT SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES *DomainAttributes)

Return performance domain attributes.

Parameters
[in]ThisA Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
[in]DomainIdIdentifier for the performance domain.
[out]AttributesPerformance domain attributes.
Return values
EFI_SUCCESSDomain attributes are returned.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 183 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERFORMANCE_GET_VERSION

typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_GET_VERSION) (IN SCMI_PERFORMANCE_PROTOCOL *This, OUT UINT32 *Version)

Return version of the performance management protocol supported by SCP. firmware.

Parameters
[in]ThisA Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
[out]VersionVersion of the supported SCMI performance management protocol.
Return values
EFI_SUCCESSThe version is returned.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 147 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERFORMANCE_LEVEL_GET

typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_LEVEL_GET) (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, OUT UINT32 *Level)

Get performance level of a domain.

Parameters
[in]ThisA Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
[in]DomainIdIdentifier for the performance domain.
[out]LevelPerformance level of the domain.
Return values
EFI_SUCCESSPerformance level got successfully.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 284 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERFORMANCE_LEVEL_SET

typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_LEVEL_SET) (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, IN UINT32 Level)

Set performance level of a domain.

Parameters
[in]ThisA Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
[in]DomainIdIdentifier for the performance domain.
[in]LevelPerformance level of the domain.
Return values
EFI_SUCCESSPerformance level set successfully.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 265 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERFORMANCE_LIMITS_GET

typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_LIMITS_GET) (SCMI_PERFORMANCE_PROTOCOL *This, UINT32 DomainId, SCMI_PERFORMANCE_LIMITS *Limits)

Get performance limits of a domain.

Parameters
[in]ThisA Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
[in]DomainIdIdentifier for the performance domain.
[out]LimitPerformance Limits of the domain.
Return values
EFI_SUCCESSPerformance limits are returned.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 247 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERFORMANCE_LIMITS_SET

typedef EFI_STATUS(EFIAPI * SCMI_PERFORMANCE_LIMITS_SET) (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, IN SCMI_PERFORMANCE_LIMITS *Limits)

Set performance limits of a domain.

Parameters
[in]ThisA Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
[in]DomainIdIdentifier for the performance domain.
[in]LimitPerformance limit to set.
Return values
EFI_SUCCESSPerformance limits set successfully.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 228 of file ArmScmiPerformanceProtocol.h.

◆ SCMI_PERFORMANCE_PROTOCOL

Enumeration Type Documentation

◆ SCMI_MESSAGE_ID_PERFORMANCE

SCMI Message Ids for the Performance Protocol.

Definition at line 124 of file ArmScmiPerformanceProtocol.h.