Sridhar Siricilla has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59789 )
Change subject: soc/intel/common: Refactor cpu_set_p_state_to_max_non_turbo_ratio ......................................................................
soc/intel/common: Refactor cpu_set_p_state_to_max_non_turbo_ratio
The patch refectors cpu_set_p_state_to_max_non_turbo_ratio(). The fuction is updated to use cpu_get_max_non_turbo_ratio().
TEST=Build the code for Brya
Signed-off-by: Sridhar Siricilla sridhar.siricilla@intel.com Change-Id: If73df17faaf7b870ae311460a868d52352683c0c --- M src/soc/intel/common/block/cpu/cpulib.c 1 file changed, 1 insertion(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/59789/1
diff --git a/src/soc/intel/common/block/cpu/cpulib.c b/src/soc/intel/common/block/cpu/cpulib.c index 979de35..770cf5f 100644 --- a/src/soc/intel/common/block/cpu/cpulib.c +++ b/src/soc/intel/common/block/cpu/cpulib.c @@ -137,11 +137,8 @@ */ void cpu_set_p_state_to_max_non_turbo_ratio(void) { - msr_t msr, perf_ctl; - /* Platform Info bits 15:8 give max ratio */ - msr = rdmsr(MSR_PLATFORM_INFO); - perf_ctl.lo = msr.lo & 0xff00; + perf_ctl.lo = (cpu_get_max_non_turbo_ratio() << 8) & 0xff00; perf_ctl.hi = 0;
set_perf_control_msr(perf_ctl);