summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/intel/common/block/cpu/cpulib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/soc/intel/common/block/cpu/cpulib.c b/src/soc/intel/common/block/cpu/cpulib.c
index 617968a1bc..27ff8cd151 100644
--- a/src/soc/intel/common/block/cpu/cpulib.c
+++ b/src/soc/intel/common/block/cpu/cpulib.c
@@ -137,11 +137,10 @@ void cpu_set_p_state_to_nominal_tdp_ratio(void)
*/
void cpu_set_p_state_to_max_non_turbo_ratio(void)
{
- msr_t msr, perf_ctl;
+ msr_t 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);