aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2020-10-11 17:34:54 +0200
committerMichael Niewöhner <foss@mniewoehner.de>2020-10-21 12:34:28 +0000
commit63032439f4278125b3a01d33d056761dd1ae8cba (patch)
tree58621ab2e80ad1f0bc75fc76c4740cdf46d1804c /src/soc/intel/skylake
parent2ac743330c2668abae9eb1d5a01ad1b86ba918a9 (diff)
{cpu,soc}/intel: replace AES-NI locking by common implemenation call
Deduplicate code by using the new common cpu code implementation of AES-NI locking. Change-Id: I7ab2d3839ecb758335ef8cc6a0c0c7103db0fa50 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46278 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/soc/intel/skylake')
-rw-r--r--src/soc/intel/skylake/cpu.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c
index 5ec002322b..e716c66620 100644
--- a/src/soc/intel/skylake/cpu.c
+++ b/src/soc/intel/skylake/cpu.c
@@ -186,25 +186,6 @@ static void enable_pm_timer_emulation(void)
wrmsr(MSR_EMULATE_PM_TIMER, msr);
}
-/*
- * Lock AES-NI (MSR_FEATURE_CONFIG) to prevent unintended disabling
- * as suggested in Intel document 325384-070US.
- */
-static void cpu_lock_aesni(void)
-{
- msr_t msr;
-
- /* Only run once per core as specified in the MSR datasheet */
- if (intel_ht_sibling())
- return;
-
- msr = rdmsr(MSR_FEATURE_CONFIG);
- if ((msr.lo & 1) == 0) {
- msr.lo |= 1;
- wrmsr(MSR_FEATURE_CONFIG, msr);
- }
-}
-
/* All CPUs including BSP will run the following function. */
void soc_core_init(struct device *cpu)
{
@@ -227,8 +208,7 @@ void soc_core_init(struct device *cpu)
/* Configure Intel Speed Shift */
configure_isst();
- /* Lock AES-NI MSR */
- cpu_lock_aesni();
+ set_aesni_lock();
/* Enable ACPI Timer Emulation via MSR 0x121 */
enable_pm_timer_emulation();