]>
Commit | Line | Data |
---|---|---|
4f2494cf GP |
1 | /** @file\r |
2 | \r | |
3 | Copyright (c) 2017-2018, Arm Limited. All rights reserved.\r | |
4 | \r | |
4059386c | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
4f2494cf GP |
6 | \r |
7 | System Control and Management Interface V1.0\r | |
8 | http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/\r | |
9 | DEN0056A_System_Control_and_Management_Interface.pdf\r | |
10 | **/\r | |
11 | \r | |
12 | #ifndef ARM_SCMI_PERFORMANCE_PROTOCOL_PRIVATE_H_\r | |
13 | #define ARM_SCMI_PERFORMANCE_PROTOCOL_PRIVATE_H_\r | |
14 | \r | |
15 | #include <Protocol/ArmScmiPerformanceProtocol.h>\r | |
16 | \r | |
17 | // Number of performance levels returned by a call to the SCP, Lvls Bits[11:0]\r | |
18 | #define NUM_PERF_LEVELS_MASK 0x0FFF\r | |
19 | #define NUM_PERF_LEVELS(Lvls) (Lvls & NUM_PERF_LEVELS_MASK)\r | |
20 | \r | |
21 | // Number of performance levels remaining after a call to the SCP, Lvls Bits[31:16]\r | |
22 | #define NUM_REMAIN_PERF_LEVELS_SHIFT 16\r | |
23 | #define NUM_REMAIN_PERF_LEVELS(Lvls) (Lvls >> NUM_REMAIN_PERF_LEVELS_SHIFT)\r | |
24 | \r | |
25 | /** Return values for SCMI_MESSAGE_ID_PERFORMANCE_DESCRIBE_LEVELS command.\r | |
3afcba4a | 26 | SCMI Spec section 4.5.2.5\r |
4f2494cf GP |
27 | **/\r |
28 | typedef struct {\r | |
29 | UINT32 NumLevels;\r | |
30 | \r | |
31 | // NOTE: Since EDK2 does not allow flexible array member [] we declare\r | |
32 | // here array of 1 element length. However below is used as a variable\r | |
33 | // length array.\r | |
34 | SCMI_PERFORMANCE_LEVEL PerfLevel[1]; // Offset to array of performance levels\r | |
35 | } PERF_DESCRIBE_LEVELS;\r | |
36 | \r | |
37 | /** Initialize performance management protocol and install on a given Handle.\r | |
38 | \r | |
39 | @param[in] Handle Handle to install performance management\r | |
40 | protocol.\r | |
41 | \r | |
42 | @retval EFI_SUCCESS Performance protocol installed successfully.\r | |
43 | **/\r | |
44 | EFI_STATUS\r | |
45 | ScmiPerformanceProtocolInit (\r | |
46 | IN EFI_HANDLE* Handle\r | |
47 | );\r | |
48 | \r | |
49 | #endif /* ARM_SCMI_PERFORMANCE_PROTOCOL_PRIVATE_H_ */\r |