aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/elkhartlake/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/elkhartlake/cpu.c')
-rw-r--r--src/soc/intel/elkhartlake/cpu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/intel/elkhartlake/cpu.c b/src/soc/intel/elkhartlake/cpu.c
index f4baa65fd9..8ba28c0159 100644
--- a/src/soc/intel/elkhartlake/cpu.c
+++ b/src/soc/intel/elkhartlake/cpu.c
@@ -67,6 +67,14 @@ static void configure_misc(void)
msr.lo |= (1 << 0); /* Enable Bi-directional PROCHOT as an input */
msr.lo |= (1 << 23); /* Lock it */
wrmsr(MSR_POWER_CTL, msr);
+
+ /* In some cases it is beneficial for the performance to disable the
+ L1 prefetcher as on Elkhart Lake it is set up a bit too aggressive. */
+ if (conf->L1_prefetcher_disable) {
+ msr = rdmsr(MSR_PREFETCH_CTL);
+ msr.lo |= PREFETCH_L1_DISABLE;
+ wrmsr(MSR_PREFETCH_CTL, msr);
+ }
}
/* All CPUs including BSP will run the following function. */