summaryrefslogtreecommitdiff
path: root/src/soc/intel/alderlake/cpu.c
diff options
context:
space:
mode:
authorJeremy Compostella <jeremy.compostella@intel.com>2022-07-21 15:40:03 -0700
committerPaul Fagerburg <pfagerburg@chromium.org>2022-07-28 14:57:54 +0000
commit117770d32468e63df37aee1c041b5dc7cc1d56d2 (patch)
tree020f66d01ab7c7f6dc28f55c49439bf80c0f59ce /src/soc/intel/alderlake/cpu.c
parentccbf27cbe7f9cd78461a946cf92cc97d652d19dd (diff)
soc/intel/alderlake: Enable Energy/Performance Bias control
According to document 619503 ADL EDS Vol2, bit 18 of MSR_POWER_CTL must be set to be able to set the Energy/Performance Bias using MSR IA32_ENERGY_PERF_BIAS. Note that since this bit was not set until this patch, the `set_energy_perf_bias(ENERGY_POLICY_NORMAL);' call in `soc_core_init()` was systematically failing. BRANCH=firmware-brya-14505.B BUG=b:239853069 TEST=verify that EPB is set by coreboot Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Change-Id: Ic24abdd7f63f4707b8996da4755a26be148efe4a Reviewed-on: https://review.coreboot.org/c/coreboot/+/66058 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/soc/intel/alderlake/cpu.c')
-rw-r--r--src/soc/intel/alderlake/cpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/intel/alderlake/cpu.c b/src/soc/intel/alderlake/cpu.c
index c2564ac4fa..7308185be7 100644
--- a/src/soc/intel/alderlake/cpu.c
+++ b/src/soc/intel/alderlake/cpu.c
@@ -76,10 +76,11 @@ static void configure_misc(void)
msr.hi = 0;
wrmsr(IA32_PACKAGE_THERM_INTERRUPT, msr);
- /* Enable PROCHOT */
+ /* Enable PROCHOT and Energy/Performance Bias control */
msr = rdmsr(MSR_POWER_CTL);
msr.lo |= (1 << 0); /* Enable Bi-directional PROCHOT as an input */
msr.lo |= (1 << 23); /* Lock it */
+ msr.lo |= (1 << 18); /* Energy/Performance Bias control */
wrmsr(MSR_POWER_CTL, msr);
}