summaryrefslogtreecommitdiff
path: root/src/soc/intel/denverton_ns
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/denverton_ns
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/denverton_ns')
-rw-r--r--src/soc/intel/denverton_ns/Kconfig1
-rw-r--r--src/soc/intel/denverton_ns/cpu.c8
2 files changed, 3 insertions, 6 deletions
diff --git a/src/soc/intel/denverton_ns/Kconfig b/src/soc/intel/denverton_ns/Kconfig
index 798d473cad..89bbbb0c45 100644
--- a/src/soc/intel/denverton_ns/Kconfig
+++ b/src/soc/intel/denverton_ns/Kconfig
@@ -34,6 +34,7 @@ config CPU_SPECIFIC_OPTIONS
select TSC_SYNC_MFENCE
select UDELAY_TSC
select UDK_2015_BINDING
+ select CPU_INTEL_COMMON
select CPU_INTEL_FIRMWARE_INTERFACE_TABLE
select SUPPORT_CPU_UCODE_IN_CBFS
diff --git a/src/soc/intel/denverton_ns/cpu.c b/src/soc/intel/denverton_ns/cpu.c
index b1eda9b54d..7cee5be39d 100644
--- a/src/soc/intel/denverton_ns/cpu.c
+++ b/src/soc/intel/denverton_ns/cpu.c
@@ -9,6 +9,7 @@
#include <cpu/intel/smm_reloc.h>
#include <cpu/intel/em64t100_save_state.h>
#include <cpu/intel/turbo.h>
+#include <cpu/intel/common/common.h>
#include <device/device.h>
#include <device/pci.h>
#include <intelblocks/cpulib.h>
@@ -59,12 +60,7 @@ static void denverton_core_init(struct device *cpu)
msr.lo |= FAST_STRINGS_ENABLE_BIT;
wrmsr(IA32_MISC_ENABLE, msr);
- /* Lock AES-NI only if supported */
- if (cpuid_ecx(1) & (1 << 25)) {
- msr = rdmsr(MSR_FEATURE_CONFIG);
- msr.lo |= FEATURE_CONFIG_LOCK; /* Lock AES-NI */
- wrmsr(MSR_FEATURE_CONFIG, msr);
- }
+ set_aesni_lock();
/* Enable Turbo */
enable_turbo();