{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>
This commit is contained in:
Michael Niewöhner
2020-10-11 17:34:54 +02:00
parent 2ac743330c
commit 63032439f4
9 changed files with 12 additions and 46 deletions

View File

@@ -9,6 +9,7 @@
#include <cpu/x86/mp.h>
#include <cpu/intel/microcode.h>
#include <cpu/intel/turbo.h>
#include <cpu/intel/common/common.h>
#include <cpu/x86/msr.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/smm.h>
@@ -43,12 +44,6 @@ static const struct reg_script core_msr_script[] = {
#endif
/* Disable C1E */
REG_MSR_RMW(MSR_POWER_CTL, ~POWER_CTL_C1E_MASK, 0),
/*
* Enable and Lock the Advanced Encryption Standard (AES-NI)
* feature register
*/
REG_MSR_RMW(MSR_FEATURE_CONFIG, ~FEATURE_CONFIG_RESERVED_MASK,
FEATURE_CONFIG_LOCK),
REG_SCRIPT_END
};
@@ -62,6 +57,9 @@ void soc_core_init(struct device *cpu)
/* Set core MSRs */
reg_script_run(core_msr_script);
set_aesni_lock();
/*
* Enable ACPI PM timer emulation, which also lets microcode know
* location of ACPI_BASE_ADDRESS. This also enables other features