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

Go to the source code of this file.

Macros

#define ARM_FFH_DELIVERED_PERF_COUNTER_REGISTER   0x0
 
#define ARM_FFH_REFERENCE_PERF_COUNTER_REGISTER   0x1
 

Functions

EFI_STATUS EFIAPI DynamicTablesScmiInfoLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
STATIC EFI_STATUS EFIAPI DynamicTablesScmiInfoDescribeLevels (IN UINT32 DomainId, OUT SCMI_PERFORMANCE_LEVEL **LevelArray, OUT UINT32 *LevelArrayCount)
 
EFI_STATUS EFIAPI DynamicTablesScmiInfoGetFastChannel (IN UINT32 DomainId, OUT AML_CPC_INFO *CpcInfo)
 

Variables

STATIC SCMI_PERFORMANCE_PROTOCOLScmiPerfProtocol
 Arm SCMI performance protocol.
 

Detailed Description

Arm SCMI Info Library.

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

Arm Functional Fixed Hardware Specification:

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

Definition in file DynamicTablesScmiInfoLib.c.

Macro Definition Documentation

◆ ARM_FFH_DELIVERED_PERF_COUNTER_REGISTER

#define ARM_FFH_DELIVERED_PERF_COUNTER_REGISTER   0x0

Arm FFH registers

Cf. Arm Functional Fixed Hardware Specification s3.2 Performance management and Collaborative Processor Performance Control

Definition at line 25 of file DynamicTablesScmiInfoLib.c.

◆ ARM_FFH_REFERENCE_PERF_COUNTER_REGISTER

#define ARM_FFH_REFERENCE_PERF_COUNTER_REGISTER   0x1

Definition at line 26 of file DynamicTablesScmiInfoLib.c.

Function Documentation

◆ DynamicTablesScmiInfoDescribeLevels()

STATIC EFI_STATUS EFIAPI DynamicTablesScmiInfoDescribeLevels ( IN UINT32  DomainId,
OUT SCMI_PERFORMANCE_LEVEL **  LevelArray,
OUT UINT32 *  LevelArrayCount 
)

Get the OPPs/performance states of a power domain.

This function is a wrapper around the SCMI PERFORMANCE_DESCRIBE_LEVELS command. The list of discrete performance states is returned in a buffer that must be freed by the caller.

Parameters
[in]DomainIdIdentifier for the performance domain.
[out]LevelArrayIf success, pointer to the list of list of performance state. This memory must be freed by the caller.
[out]LevelArrayCountIf success, contains the number of states in LevelArray.
Return values
EFI_SUCCESSSuccess.
EFI_DEVICE_ERRORDevice error.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_TIMEOUTTime out.
EFI_UNSUPPORTEDUnsupported.

Definition at line 101 of file DynamicTablesScmiInfoLib.c.

◆ DynamicTablesScmiInfoGetFastChannel()

EFI_STATUS EFIAPI DynamicTablesScmiInfoGetFastChannel ( IN UINT32  DomainId,
OUT AML_CPC_INFO CpcInfo 
)

Populate a AML_CPC_INFO object based on SCMI information.

Parameters
[in]DomainIdIdentifier for the performance domain.
[out]CpcInfoIf success, this structure was populated from information queried to the SCP.
Return values
EFI_SUCCESSSuccess.
EFI_DEVICE_ERRORDevice error.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_TIMEOUTTime out.
EFI_UNSUPPORTEDUnsupported.

Definition at line 174 of file DynamicTablesScmiInfoLib.c.

◆ DynamicTablesScmiInfoLibConstructor()

EFI_STATUS EFIAPI DynamicTablesScmiInfoLibConstructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Arm SCMI Info Library constructor.

Parameters
ImageHandleImage of the loaded driver.
SystemTablePointer to the System Table.
Return values
EFI_SUCCESSSuccess.
EFI_DEVICE_ERRORDevice error.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_NOT_FOUNDNot Found
EFI_TIMEOUTTimeout.
EFI_UNSUPPORTEDUnsupported.

Definition at line 45 of file DynamicTablesScmiInfoLib.c.

Variable Documentation

◆ ScmiPerfProtocol

STATIC SCMI_PERFORMANCE_PROTOCOL* ScmiPerfProtocol

Arm SCMI performance protocol.

Definition at line 29 of file DynamicTablesScmiInfoLib.c.