TianoCore EDK2 master
|
#include <Library/AcpiLib.h>
#include <Library/DynamicTablesScmiInfoLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/ArmScmi.h>
#include <Protocol/ArmScmiPerformanceProtocol.h>
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_PROTOCOL * | ScmiPerfProtocol |
Arm SCMI performance protocol. | |
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.
#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.
#define ARM_FFH_REFERENCE_PERF_COUNTER_REGISTER 0x1 |
Definition at line 26 of file DynamicTablesScmiInfoLib.c.
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.
[in] | DomainId | Identifier for the performance domain. |
[out] | LevelArray | If success, pointer to the list of list of performance state. This memory must be freed by the caller. |
[out] | LevelArrayCount | If success, contains the number of states in LevelArray. |
EFI_SUCCESS | Success. |
EFI_DEVICE_ERROR | Device error. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_TIMEOUT | Time out. |
EFI_UNSUPPORTED | Unsupported. |
Definition at line 101 of file DynamicTablesScmiInfoLib.c.
EFI_STATUS EFIAPI DynamicTablesScmiInfoGetFastChannel | ( | IN UINT32 | DomainId, |
OUT AML_CPC_INFO * | CpcInfo | ||
) |
Populate a AML_CPC_INFO object based on SCMI information.
[in] | DomainId | Identifier for the performance domain. |
[out] | CpcInfo | If success, this structure was populated from information queried to the SCP. |
EFI_SUCCESS | Success. |
EFI_DEVICE_ERROR | Device error. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_TIMEOUT | Time out. |
EFI_UNSUPPORTED | Unsupported. |
Definition at line 174 of file DynamicTablesScmiInfoLib.c.
EFI_STATUS EFIAPI DynamicTablesScmiInfoLibConstructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Arm SCMI Info Library constructor.
ImageHandle | Image of the loaded driver. |
SystemTable | Pointer to the System Table. |
EFI_SUCCESS | Success. |
EFI_DEVICE_ERROR | Device error. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_NOT_FOUND | Not Found |
EFI_TIMEOUT | Timeout. |
EFI_UNSUPPORTED | Unsupported. |
Definition at line 45 of file DynamicTablesScmiInfoLib.c.
STATIC SCMI_PERFORMANCE_PROTOCOL* ScmiPerfProtocol |
Arm SCMI performance protocol.
Definition at line 29 of file DynamicTablesScmiInfoLib.c.