broadwell: Enable turbo ratio if available
When turning up the CPU frequency set it to turbo if that is a possibility. Also only set the frequency on the boot CPU since that is all we need it on, this will allow the 1-core turbo ratio. BUG=chrome-os-partner:28234 BRANCH=samus,auron TEST=build and boot on samus Change-Id: I573eb7a507305814ec48cc2f624b8e6ddad43f84 Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Original-Commit-Id: d408c1b462983c682d61c6c447692391c2b52183 Original-Change-Id: Ib5ad746767ee0a56bc7e59de679a9342f053c0e5 Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/234401 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9281 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
4a69c34d54
commit
7f28e4ee01
1 changed files with 7 additions and 4 deletions
|
@ -485,7 +485,10 @@ static void set_max_ratio(void)
|
||||||
perf_ctl.hi = 0;
|
perf_ctl.hi = 0;
|
||||||
|
|
||||||
/* Check for configurable TDP option */
|
/* Check for configurable TDP option */
|
||||||
if (cpu_config_tdp_levels()) {
|
if (get_turbo_state() == TURBO_ENABLED) {
|
||||||
|
msr = rdmsr(MSR_TURBO_RATIO_LIMIT);
|
||||||
|
perf_ctl.lo = (msr.lo & 0xff) << 8;
|
||||||
|
} else if (cpu_config_tdp_levels()) {
|
||||||
/* Set to nominal TDP ratio */
|
/* Set to nominal TDP ratio */
|
||||||
msr = rdmsr(MSR_CONFIG_TDP_NOMINAL);
|
msr = rdmsr(MSR_CONFIG_TDP_NOMINAL);
|
||||||
perf_ctl.lo = (msr.lo & 0xff) << 8;
|
perf_ctl.lo = (msr.lo & 0xff) << 8;
|
||||||
|
@ -587,9 +590,6 @@ static void cpu_core_init(device_t cpu)
|
||||||
/* Set energy policy */
|
/* Set energy policy */
|
||||||
set_energy_perf_bias(ENERGY_POLICY_NORMAL);
|
set_energy_perf_bias(ENERGY_POLICY_NORMAL);
|
||||||
|
|
||||||
/* Set Max Ratio */
|
|
||||||
set_max_ratio();
|
|
||||||
|
|
||||||
/* Enable Turbo */
|
/* Enable Turbo */
|
||||||
enable_turbo();
|
enable_turbo();
|
||||||
}
|
}
|
||||||
|
@ -692,6 +692,9 @@ void broadwell_init_cpus(device_t dev)
|
||||||
printk(BIOS_ERR, "MP initialization failure.\n");
|
printk(BIOS_ERR, "MP initialization failure.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set Max Ratio */
|
||||||
|
set_max_ratio();
|
||||||
|
|
||||||
/* Restore the default SMM region. */
|
/* Restore the default SMM region. */
|
||||||
restore_default_smm_area(smm_save_area);
|
restore_default_smm_area(smm_save_area);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue