TianoCore EDK2 master
Loading...
Searching...
No Matches
ScmiPerformanceProtocol.c File Reference

Go to the source code of this file.

Functions

STATIC EFI_STATUS PerformanceGetVersion (IN SCMI_PERFORMANCE_PROTOCOL *This, OUT UINT32 *Version)
 
STATIC EFI_STATUS PerformanceGetAttributes (IN SCMI_PERFORMANCE_PROTOCOL *This, OUT SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES *Attributes)
 
STATIC EFI_STATUS PerformanceDomainAttributes (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, OUT SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES *DomainAttributes)
 
STATIC EFI_STATUS PerformanceDescribeLevels (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, OUT UINT32 *NumLevels, IN OUT UINT32 *LevelArraySize, OUT SCMI_PERFORMANCE_LEVEL *LevelArray)
 
EFI_STATUS PerformanceLimitsSet (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, IN SCMI_PERFORMANCE_LIMITS *Limits)
 
EFI_STATUS PerformanceLimitsGet (SCMI_PERFORMANCE_PROTOCOL *This, UINT32 DomainId, SCMI_PERFORMANCE_LIMITS *Limits)
 
EFI_STATUS PerformanceLevelSet (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, IN UINT32 Level)
 
EFI_STATUS PerformanceLevelGet (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, OUT UINT32 *Level)
 
EFI_STATUS DescribeFastchannel (IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, IN SCMI_MESSAGE_ID_PERFORMANCE MessageId, OUT SCMI_PERFORMANCE_FASTCHANNEL *FastChannel)
 
EFI_STATUS ScmiPerformanceProtocolInit (IN EFI_HANDLE *Handle)
 

Variables

STATIC CONST SCMI_PERFORMANCE_PROTOCOL PerformanceProtocol
 

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 ScmiPerformanceProtocol.c.

Function Documentation

◆ DescribeFastchannel()

EFI_STATUS DescribeFastchannel ( 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 439 of file ScmiPerformanceProtocol.c.

◆ PerformanceDescribeLevels()

STATIC EFI_STATUS PerformanceDescribeLevels ( 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 152 of file ScmiPerformanceProtocol.c.

◆ PerformanceDomainAttributes()

STATIC EFI_STATUS PerformanceDomainAttributes ( 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 91 of file ScmiPerformanceProtocol.c.

◆ PerformanceGetAttributes()

STATIC EFI_STATUS PerformanceGetAttributes ( 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 53 of file ScmiPerformanceProtocol.c.

◆ PerformanceGetVersion()

STATIC EFI_STATUS PerformanceGetVersion ( 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 33 of file ScmiPerformanceProtocol.c.

◆ PerformanceLevelGet()

EFI_STATUS PerformanceLevelGet ( 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 381 of file ScmiPerformanceProtocol.c.

◆ PerformanceLevelSet()

EFI_STATUS PerformanceLevelSet ( 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 336 of file ScmiPerformanceProtocol.c.

◆ PerformanceLimitsGet()

EFI_STATUS PerformanceLimitsGet ( 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 285 of file ScmiPerformanceProtocol.c.

◆ PerformanceLimitsSet()

EFI_STATUS PerformanceLimitsSet ( 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 239 of file ScmiPerformanceProtocol.c.

◆ ScmiPerformanceProtocolInit()

EFI_STATUS ScmiPerformanceProtocolInit ( IN EFI_HANDLE Handle)

Initialize performance management protocol and install on a given Handle.

Parameters
[in]HandleHandle to install performance management protocol.
Return values
EFI_SUCCESSPerformance protocol installed successfully.

Definition at line 509 of file ScmiPerformanceProtocol.c.

Variable Documentation

◆ PerformanceProtocol

STATIC CONST SCMI_PERFORMANCE_PROTOCOL PerformanceProtocol
Initial value:
= {
}
EFI_STATUS PerformanceLevelGet(IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, OUT UINT32 *Level)
EFI_STATUS DescribeFastchannel(IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, IN SCMI_MESSAGE_ID_PERFORMANCE MessageId, OUT SCMI_PERFORMANCE_FASTCHANNEL *FastChannel)
EFI_STATUS PerformanceLimitsGet(SCMI_PERFORMANCE_PROTOCOL *This, UINT32 DomainId, SCMI_PERFORMANCE_LIMITS *Limits)
STATIC EFI_STATUS PerformanceGetAttributes(IN SCMI_PERFORMANCE_PROTOCOL *This, OUT SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES *Attributes)
STATIC EFI_STATUS PerformanceDomainAttributes(IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, OUT SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES *DomainAttributes)
STATIC EFI_STATUS PerformanceDescribeLevels(IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, OUT UINT32 *NumLevels, IN OUT UINT32 *LevelArraySize, OUT SCMI_PERFORMANCE_LEVEL *LevelArray)
EFI_STATUS PerformanceLimitsSet(IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, IN SCMI_PERFORMANCE_LIMITS *Limits)
STATIC EFI_STATUS PerformanceGetVersion(IN SCMI_PERFORMANCE_PROTOCOL *This, OUT UINT32 *Version)
EFI_STATUS PerformanceLevelSet(IN SCMI_PERFORMANCE_PROTOCOL *This, IN UINT32 DomainId, IN UINT32 Level)

Definition at line 489 of file ScmiPerformanceProtocol.c.