summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2018-12-15 15:57:33 -0600
committerPatrick Georgi <pgeorgi@google.com>2018-12-20 22:18:05 +0000
commitf9aed6578565593ff2b5d9e90f8e6e80e5d9831d (patch)
tree248a89e4ed74073abb525a543e828722f1fbdac7 /src/soc/intel
parentc5ad267a372f376cee90c1b8a0d9b8a96316ddb8 (diff)
cpu/intel/common: decouple IA32_FEATURE_CONTROL lock from set_vmx()
Newer CPUs/SoCs need to configure other features via the IA32_FEATURE_CONTROL msr, such as SGX, which cannot be done if the msr is already locked. Create separate functions for setting the vmx flag and lock bit, and rename existing function to indicate that the lock bit will be set in addition to vmx flag (per Kconfig). This will allow Skylake/Kabylake (and others?) to use the common VMX code without breaking SGX, while ensuring no change in functionality to existing platforms which current set both together. Test: build/boot each affected platform, ensure no change in functionality Change-Id: Iee772fe87306b4729ca012cef8640d3858e2cb06 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/30229 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: David Guckian Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/baytrail/cpu.c2
-rw-r--r--src/soc/intel/braswell/cpu.c2
-rw-r--r--src/soc/intel/broadwell/cpu.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/soc/intel/baytrail/cpu.c b/src/soc/intel/baytrail/cpu.c
index 6c37aa86b9..952693217c 100644
--- a/src/soc/intel/baytrail/cpu.c
+++ b/src/soc/intel/baytrail/cpu.c
@@ -57,7 +57,7 @@ static void baytrail_core_init(struct device *cpu)
enable_turbo();
/* Set virtualization based on Kconfig option */
- set_vmx();
+ set_vmx_and_lock();
/* Set core MSRs */
reg_script_run(core_msr_script);
diff --git a/src/soc/intel/braswell/cpu.c b/src/soc/intel/braswell/cpu.c
index 9063c2a6ac..12f34fb2fe 100644
--- a/src/soc/intel/braswell/cpu.c
+++ b/src/soc/intel/braswell/cpu.c
@@ -62,7 +62,7 @@ static void soc_core_init(struct device *cpu)
enable_turbo();
/* Set virtualization based on Kconfig option */
- set_vmx();
+ set_vmx_and_lock();
/* Set core MSRs */
reg_script_run(core_msr_script);
diff --git a/src/soc/intel/broadwell/cpu.c b/src/soc/intel/broadwell/cpu.c
index 66ec345615..eab6b00734 100644
--- a/src/soc/intel/broadwell/cpu.c
+++ b/src/soc/intel/broadwell/cpu.c
@@ -581,7 +581,7 @@ static void cpu_core_init(struct device *cpu)
setup_lapic();
/* Set virtualization based on Kconfig option */
- set_vmx();
+ set_vmx_and_lock();
/* Configure C States */
configure_c_states();