DPDK  24.11.0-rc3
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) 2024 Advanced Micro Devices, Inc.
4  */
5 
6 #ifndef RTE_POWER_UNCORE_H
7 #define RTE_POWER_UNCORE_H
8 
14 #include "power_uncore_ops.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 /* Uncore Power Management Environment */
21 enum rte_uncore_power_mgmt_env {
22  RTE_UNCORE_PM_ENV_NOT_SET,
23  RTE_UNCORE_PM_ENV_AUTO_DETECT,
24  RTE_UNCORE_PM_ENV_INTEL_UNCORE,
25  RTE_UNCORE_PM_ENV_AMD_HSMP
26 };
27 
41 __rte_experimental
42 int rte_power_set_uncore_env(enum rte_uncore_power_mgmt_env env);
43 
48 __rte_experimental
50 
57 __rte_experimental
58 enum rte_uncore_power_mgmt_env rte_power_get_uncore_env(void);
59 
77 int
78 rte_power_uncore_init(unsigned int pkg, unsigned int die);
79 
98 int
99 rte_power_uncore_exit(unsigned int pkg, unsigned int die);
100 
118 uint32_t rte_power_get_uncore_freq(unsigned int pkg, unsigned int die);
119 
141 int rte_power_set_uncore_freq(unsigned int pkg, unsigned int die, uint32_t index);
142 
162 int rte_power_uncore_freq_max(unsigned int pkg, unsigned int die);
163 
183 int rte_power_uncore_freq_min(unsigned int pkg, unsigned int die);
184 
205 __rte_experimental
206 int rte_power_uncore_freqs(unsigned int pkg, unsigned int die,
207  uint32_t *freqs, uint32_t num);
208 
225 int rte_power_uncore_get_num_freqs(unsigned int pkg, unsigned int die);
226 
237 unsigned int rte_power_uncore_get_num_pkgs(void);
238 
253 unsigned int rte_power_uncore_get_num_dies(unsigned int pkg);
254 
255 #ifdef __cplusplus
256 }
257 #endif
258 
259 #endif /* RTE_POWER_UNCORE_H */
unsigned int rte_power_uncore_get_num_dies(unsigned int pkg)
uint32_t rte_power_get_uncore_freq(unsigned int pkg, unsigned int die)
int rte_power_uncore_init(unsigned int pkg, unsigned int die)
int rte_power_uncore_exit(unsigned int pkg, unsigned int die)
unsigned int rte_power_uncore_get_num_pkgs(void)
__rte_experimental enum rte_uncore_power_mgmt_env rte_power_get_uncore_env(void)
int rte_power_set_uncore_freq(unsigned int pkg, unsigned int die, uint32_t index)
__rte_experimental int rte_power_uncore_freqs(unsigned int pkg, unsigned int die, uint32_t *freqs, uint32_t num)
int rte_power_uncore_freq_max(unsigned int pkg, unsigned int die)
int rte_power_uncore_get_num_freqs(unsigned int pkg, unsigned int die)
int rte_power_uncore_freq_min(unsigned int pkg, unsigned int die)
__rte_experimental int rte_power_set_uncore_env(enum rte_uncore_power_mgmt_env env)
__rte_experimental void rte_power_unset_uncore_env(void)