DPDK  24.07.0
rte_power_uncore.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2022 Intel Corporation
3  * Copyright(c) 2023 AMD Corporation
4  */
5 
6 #ifndef RTE_POWER_UNCORE_H
7 #define RTE_POWER_UNCORE_H
8 
14 #include <rte_compat.h>
15 #include "rte_power.h"
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 /* Uncore Power Management Environment */
22 enum rte_uncore_power_mgmt_env {
23  RTE_UNCORE_PM_ENV_NOT_SET,
24  RTE_UNCORE_PM_ENV_AUTO_DETECT,
25  RTE_UNCORE_PM_ENV_INTEL_UNCORE,
26  RTE_UNCORE_PM_ENV_AMD_HSMP
27 };
28 
42 __rte_experimental
43 int rte_power_set_uncore_env(enum rte_uncore_power_mgmt_env env);
44 
49 __rte_experimental
51 
58 __rte_experimental
59 enum rte_uncore_power_mgmt_env rte_power_get_uncore_env(void);
60 
78 int
79 rte_power_uncore_init(unsigned int pkg, unsigned int die);
80 
99 int
100 rte_power_uncore_exit(unsigned int pkg, unsigned int die);
101 
119 typedef uint32_t (*rte_power_get_uncore_freq_t)(unsigned int pkg, unsigned int die);
120 
121 extern rte_power_get_uncore_freq_t rte_power_get_uncore_freq;
122 
144 typedef int (*rte_power_set_uncore_freq_t)(unsigned int pkg, unsigned int die, uint32_t index);
145 
146 extern rte_power_set_uncore_freq_t rte_power_set_uncore_freq;
147 
163 typedef int (*rte_power_uncore_freq_change_t)(unsigned int pkg, unsigned int die);
164 
173 
182 
203 typedef int (*rte_power_uncore_freqs_t)(unsigned int pkg, unsigned int die,
204  uint32_t *freqs, uint32_t num);
205 
206 extern rte_power_uncore_freqs_t rte_power_uncore_freqs;
207 
224 typedef int (*rte_power_uncore_get_num_freqs_t)(unsigned int pkg, unsigned int die);
225 
226 extern rte_power_uncore_get_num_freqs_t rte_power_uncore_get_num_freqs;
227 
238 typedef unsigned int (*rte_power_uncore_get_num_pkgs_t)(void);
239 
240 extern rte_power_uncore_get_num_pkgs_t rte_power_uncore_get_num_pkgs;
241 
256 typedef unsigned int (*rte_power_uncore_get_num_dies_t)(unsigned int pkg);
257 
258 extern rte_power_uncore_get_num_dies_t rte_power_uncore_get_num_dies;
259 
260 #ifdef __cplusplus
261 }
262 #endif
263 
264 #endif /* RTE_POWER_UNCORE_H */
int rte_power_uncore_init(unsigned int pkg, unsigned int die)
int(* rte_power_uncore_freqs_t)(unsigned int pkg, unsigned int die, uint32_t *freqs, uint32_t num)
int rte_power_uncore_exit(unsigned int pkg, unsigned int die)
__rte_experimental enum rte_uncore_power_mgmt_env rte_power_get_uncore_env(void)
unsigned int(* rte_power_uncore_get_num_dies_t)(unsigned int pkg)
uint32_t(* rte_power_get_uncore_freq_t)(unsigned int pkg, unsigned int die)
int(* rte_power_uncore_get_num_freqs_t)(unsigned int pkg, unsigned int die)
rte_power_uncore_freq_change_t rte_power_uncore_freq_max
int(* rte_power_uncore_freq_change_t)(unsigned int pkg, unsigned int die)
int(* rte_power_set_uncore_freq_t)(unsigned int pkg, unsigned int die, uint32_t index)
rte_power_uncore_freq_change_t rte_power_uncore_freq_min
unsigned int(* rte_power_uncore_get_num_pkgs_t)(void)
__rte_experimental int rte_power_set_uncore_env(enum rte_uncore_power_mgmt_env env)
__rte_experimental void rte_power_unset_uncore_env(void)