UPSTREAM: cpu/intel/turbo: Add option to disable turbo
disable_turbo function can be used to disable turbo mode
on each processor by settings MSR 0x1A0 bit 38.
This option will help to perform some quick test
without enabling turbo mode.
BUG=none
BRANCH=none
TEST=none
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 7bde848d62
Original-Change-Id: If3e387e16e9fa6f63cb0ffff6ab2759b447e7c5c
Original-Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Original-Reviewed-on: https://review.coreboot.org/19674
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: Id35173ff75e9ae098ace61dd2c6cea38026213e1
Reviewed-on: https://chromium-review.googlesource.com/506902
This commit is contained in:
parent
a4611931c5
commit
591d6ebbdd
2 changed files with 20 additions and 0 deletions
|
|
@ -106,3 +106,20 @@ void enable_turbo(void)
|
|||
printk(BIOS_INFO, "Turbo has been enabled\n");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Try to disable Turbo mode.
|
||||
*/
|
||||
void disable_turbo(void)
|
||||
{
|
||||
msr_t msr;
|
||||
|
||||
/* Set Turbo Disable bit in Misc Enables */
|
||||
msr = rdmsr(MSR_IA32_MISC_ENABLES);
|
||||
msr.hi |= H_MISC_DISABLE_TURBO;
|
||||
wrmsr(MSR_IA32_MISC_ENABLES, msr);
|
||||
|
||||
/* Update cached turbo state */
|
||||
set_global_turbo_state(TURBO_UNAVAILABLE);
|
||||
printk(BIOS_INFO, "Turbo has been disabled\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,4 +39,7 @@ int get_turbo_state(void);
|
|||
/* Enable turbo */
|
||||
void enable_turbo(void);
|
||||
|
||||
/* Disable turbo */
|
||||
void disable_turbo(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue