diff options
author | Matt DeVillier <matt.devillier@gmail.com> | 2018-03-21 20:47:52 -0500 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-03-28 06:42:34 +0000 |
commit | 969ef10f5409f70f85b76f3a7c5b5a4e4a637ee9 (patch) | |
tree | 95bbd7b67f1e61b077a07d57573a1ff0f6f2fcfb /src/soc | |
parent | 83abfdfb212e66e96bc400f7d45f25037b34e42e (diff) |
soc/intel/skylake: enable VMX support
Use soc/common VMX block to enable VMX on supported devices.
Change-Id: Iaa1a6201b431783d709c0509715fa8e8b1ce349a
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/25332
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Youness Alaoui <snifikino@gmail.com>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/skylake/Kconfig | 1 | ||||
-rw-r--r-- | src/soc/intel/skylake/cpu.c | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig index f76cf72891..832d7e242a 100644 --- a/src/soc/intel/skylake/Kconfig +++ b/src/soc/intel/skylake/Kconfig @@ -84,6 +84,7 @@ config CPU_SPECIFIC_OPTIONS select SOC_INTEL_COMMON_BLOCK_SPI select SOC_INTEL_COMMON_BLOCK_TIMER select SOC_INTEL_COMMON_BLOCK_UART + select SOC_INTEL_COMMON_BLOCK_VMX select SOC_INTEL_COMMON_BLOCK_XHCI select SOC_INTEL_COMMON_GFX_OPREGION select SOC_INTEL_COMMON_NHLT diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c index 1a2de73f8d..4a9d298f60 100644 --- a/src/soc/intel/skylake/cpu.c +++ b/src/soc/intel/skylake/cpu.c @@ -39,6 +39,7 @@ #include <intelblocks/mp_init.h> #include <intelblocks/sgx.h> #include <intelblocks/smm.h> +#include <intelblocks/vmx.h> #include <pc80/mc146818rtc.h> #include <soc/cpu.h> #include <soc/msr.h> @@ -476,6 +477,8 @@ static void post_mp_init(void) smm_lock(); #endif + mp_run_on_all_cpus(vmx_configure, 2000); + mp_run_on_all_cpus(sgx_configure, 2000); } @@ -552,3 +555,17 @@ int soc_fill_sgx_param(struct sgx_param *sgx_param) sgx_param->enable = conf->sgx_enable; return 0; } +int soc_fill_vmx_param(struct vmx_param *vmx_param) +{ + device_t dev = SA_DEV_ROOT; + assert(dev != NULL); + config_t *conf = dev->chip_info; + + if (!conf) { + printk(BIOS_ERR, "Failed to get chip_info for VMX param\n"); + return -1; + } + + vmx_param->enable = conf->VmxEnable; + return 0; +} |