soc/intel/cannonlake: Add devicetree setting to disable turbo
Introduce a new flag to disable turbo called 'cpu_turbo_disable'. Keep the default and enable turbo on all platforms. Change-Id: Ia23ce4d589b5ecc5515474eea52a40788ae3d3b5 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50797 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
committed by
Patrick Georgi
parent
e0c2c06ba1
commit
e9b0830422
@@ -439,6 +439,9 @@ struct soc_intel_cannonlake_config {
|
|||||||
struct i915_gpu_panel_config panel_cfg;
|
struct i915_gpu_panel_config panel_cfg;
|
||||||
|
|
||||||
struct i915_gpu_controller_info gfx;
|
struct i915_gpu_controller_info gfx;
|
||||||
|
|
||||||
|
/* Disable CPU Turbo in IA32_MISC_ENABLE */
|
||||||
|
bool cpu_turbo_disable;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct soc_intel_cannonlake_config config_t;
|
typedef struct soc_intel_cannonlake_config config_t;
|
||||||
|
@@ -91,6 +91,8 @@ static void configure_c_states(void)
|
|||||||
/* All CPUs including BSP will run the following function. */
|
/* All CPUs including BSP will run the following function. */
|
||||||
void soc_core_init(struct device *cpu)
|
void soc_core_init(struct device *cpu)
|
||||||
{
|
{
|
||||||
|
config_t *cfg = config_of_soc();
|
||||||
|
|
||||||
/* Clear out pending MCEs */
|
/* Clear out pending MCEs */
|
||||||
/* TODO(adurbin): This should only be done on a cold boot. Also, some
|
/* TODO(adurbin): This should only be done on a cold boot. Also, some
|
||||||
* of these banks are core vs package scope. For now every CPU clears
|
* of these banks are core vs package scope. For now every CPU clears
|
||||||
@@ -117,7 +119,9 @@ void soc_core_init(struct device *cpu)
|
|||||||
/* Set energy policy */
|
/* Set energy policy */
|
||||||
set_energy_perf_bias(ENERGY_POLICY_NORMAL);
|
set_energy_perf_bias(ENERGY_POLICY_NORMAL);
|
||||||
|
|
||||||
/* Enable Turbo */
|
if (cfg->cpu_turbo_disable)
|
||||||
|
disable_turbo();
|
||||||
|
else
|
||||||
enable_turbo();
|
enable_turbo();
|
||||||
|
|
||||||
/* Enable Vmx */
|
/* Enable Vmx */
|
||||||
|
Reference in New Issue
Block a user