cpu/intel/common: Add support for energy performance preference (EPP)

This provides support to update energy performance preference value.

BUG=b:219785001
BRANCH=firmware-brya-14505.B

Signed-off-by: Cliff Huang <cliff.huang@intel.corp-partner.google.com>
Change-Id: I381bca6c7746a4ae7ca32aa1b4992a6d53c8eaaa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62653
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
Cliff Huang
2022-03-07 18:39:56 -08:00
committed by Felix Held
parent 9f4010753d
commit 6277077d88
3 changed files with 66 additions and 1 deletions

View File

@@ -47,4 +47,23 @@ void configure_dca_cap(void);
*/
void set_energy_perf_bias(u8 policy);
/*
* Check energy performance preference and HWP capabilities from Thermal and
* Power Management Leaf CPUID.
*/
bool check_energy_perf_cap(void);
/*
* Set the IA32_HWP_REQUEST Energy-Performance Preference bits on the logical
* thread. 0 is a hint to the HWP to prefer performance, and 255 is a hint to
* prefer energy efficiency.
*/
void set_energy_perf_pref(u8 pref);
/*
* Instructs the CPU to use EPP hints. This means that any energy policies set
* up in `set_energy_perf_bias` will be ignored afterwards.
*/
void enable_energy_perf_pref(void);
#endif