ArmPkg[all]  0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ArmScmiPerformanceProtocol.h File Reference

Data Structures

struct  SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES
 
struct  SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES
 
struct  SCMI_PERFORMANCE_LEVEL
 
struct  SCMI_PERFORMANCE_LIMITS
 
struct  _SCMI_PERFORMANCE_PROTOCOL
 

Macros

#define PERFORMANCE_PROTOCOL_VERSION   0x10000
 
#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)
 

Typedefs

typedef struct
_SCMI_PERFORMANCE_PROTOCOL 
SCMI_PERFORMANCE_PROTOCOL
 
typedef OUT UINT32 * Version
 
typedef OUT
SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES
Attributes
 
typedef IN UINT32 DomainId
 
typedef IN UINT32 OUT
SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES
DomainAttributes
 
typedef IN UINT32 OUT UINT32 * NumLevels
 
typedef IN UINT32 OUT UINT32
IN OUT UINT32 * 
LevelArraySize
 
typedef IN UINT32 OUT UINT32
IN OUT UINT32 OUT
SCMI_PERFORMANCE_LEVEL
LevelArray
 
typedef IN UINT32 IN
SCMI_PERFORMANCE_LIMITS
Limits
 
typedef IN UINT32 IN UINT32 Level
 

Enumerations

enum  SCMI_MESSAGE_ID_PERFORMANCE {
  ScmiMessageIdPerformanceDomainAttributes = 0x3, ScmiMessageIdPerformanceDescribeLevels = 0x4, ScmiMessageIdPerformanceLimitsSet = 0x5, ScmiMessageIdPerformanceLimitsGet = 0x6,
  ScmiMessageIdPerformanceLevelSet = 0x7, ScmiMessageIdPerformanceLevelGet = 0x8
}
 

Functions

typedef EFI_STATUS (EFIAPI *SCMI_PERFORMANCE_GET_VERSION)(IN SCMI_PERFORMANCE_PROTOCOL *This
 

Variables

EFI_GUID gArmScmiPerformanceProtocolGuid
 

Detailed Description

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

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

System Control and Management Interface V1.0 http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/ DEN0056A_System_Control_and_Management_Interface.pdf

Macro Definition Documentation

#define ARM_SCMI_PERFORMANCE_PROTOCOL_GUID
Value:
{ \
0x9b8ba84, 0x3dd3, 0x49a6, {0xa0, 0x5a, 0x31, 0x34, 0xa5, 0xf0, 0x7b, 0xad} \
}
#define NUM_PERF_DOMAINS_MASK   0xFFFF
#define PERF_LATENCY_MASK   0xFFFF
#define PERFORMANCE_PROTOCOL_VERSION   0x10000
#define POWER_IN_MW_MASK   0x1
#define POWER_IN_MW_SHIFT   16
#define SCMI_PERF_POWER_IN_MW (   Attr)
Value:
((Attr >> POWER_IN_MW_SHIFT) & \
#define POWER_IN_MW_SHIFT
Definition: ArmScmiPerformanceProtocol.h:29
#define POWER_IN_MW_MASK
Definition: ArmScmiPerformanceProtocol.h:30
#define SCMI_PERF_RATE_LIMIT (   RateLimit)    (RateLimit & 0xFFF)
#define SCMI_PERF_SUPPORT_LIM_CHANGE_NOTIFY (   Attr)    ((Attr >> 29) & 0x1)
#define SCMI_PERF_SUPPORT_LVL_CHANGE_NOTIFY (   Attr)    ((Attr >> 28) & 0x1)
#define SCMI_PERF_SUPPORT_SET_LIM (   Attr)    ((Attr >> 31) & 0x1)
#define SCMI_PERF_SUPPORT_SET_LVL (   Attr)    ((Attr >> 30) & 0x1)
#define SCMI_PERF_TOTAL_DOMAINS (   Attr)    (Attr & NUM_PERF_DOMAINS_MASK)
#define SCMI_PERFORMANCE_PROTOCOL_LATENCY (   Latency)    (Latency & PERF_LATENCY_MASK)

Typedef Documentation

typedef IN UINT32 DomainId
typedef IN UINT32 OUT UINT32 * Level
typedef IN UINT32 OUT UINT32 IN OUT UINT32 OUT SCMI_PERFORMANCE_LEVEL* LevelArray
typedef IN UINT32 OUT UINT32 IN OUT UINT32* LevelArraySize
typedef UINT32 SCMI_PERFORMANCE_LIMITS * Limits
typedef IN UINT32 OUT UINT32* NumLevels
typedef OUT UINT32* Version

Enumeration Type Documentation

Enumerator
ScmiMessageIdPerformanceDomainAttributes 
ScmiMessageIdPerformanceDescribeLevels 
ScmiMessageIdPerformanceLimitsSet 
ScmiMessageIdPerformanceLimitsGet 
ScmiMessageIdPerformanceLevelSet 
ScmiMessageIdPerformanceLevelGet 

Function Documentation

typedef EFI_STATUS ( EFIAPI *  SCMI_PERFORMANCE_LEVEL_GET)

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.

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.

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.

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.

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.

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.

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.

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.

Variable Documentation

EFI_GUID gArmScmiPerformanceProtocolGuid