From ed6fe2f64b37d0c6161b23b20980f91e0be7a1ea Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Wed, 14 Dec 2016 16:12:43 -0600 Subject: cpu/intel/common: Add/Use common function to set virtualization Migrate duplicated enable_vmx() method from multiple CPUs to common folder. Add common virtualization option for CPUs which support it. Note that this changes the default to enable virtualization on CPUs that support it. Change-Id: Ib110bed6c9f5508e3f867dcdc6f341fc50e501d1 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/17874 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/soc/intel/broadwell/Kconfig | 2 +- src/soc/intel/broadwell/Makefile.inc | 1 + src/soc/intel/broadwell/cpu.c | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/soc') diff --git a/src/soc/intel/broadwell/Kconfig b/src/soc/intel/broadwell/Kconfig index 75cd8317ac..01bcaf1497 100644 --- a/src/soc/intel/broadwell/Kconfig +++ b/src/soc/intel/broadwell/Kconfig @@ -44,6 +44,7 @@ config CPU_SPECIFIC_OPTIONS select HAVE_INTEL_FIRMWARE select SOC_INTEL_COMMON_ACPI_WAKE_SOURCE select HAVE_SPI_CONSOLE_SUPPORT + select CPU_INTEL_COMMON config BOOTBLOCK_CPU_INIT string @@ -57,7 +58,6 @@ config BOOTBLOCK_SOUTHBRIDGE_INIT string default "soc/intel/broadwell/bootblock/pch.c" - config MMCONF_BASE_ADDRESS hex default 0xf0000000 diff --git a/src/soc/intel/broadwell/Makefile.inc b/src/soc/intel/broadwell/Makefile.inc index 4da8c204df..c4f45388f8 100644 --- a/src/soc/intel/broadwell/Makefile.inc +++ b/src/soc/intel/broadwell/Makefile.inc @@ -7,6 +7,7 @@ subdirs-y += ../../../cpu/x86/smm subdirs-y += ../../../cpu/x86/tsc subdirs-y += ../../../cpu/intel/microcode subdirs-y += ../../../cpu/intel/turbo +subdirs-y += ../../../cpu/intel/common ramstage-y += acpi.c ramstage-y += adsp.c diff --git a/src/soc/intel/broadwell/cpu.c b/src/soc/intel/broadwell/cpu.c index 16f350c993..09fe5ac99c 100644 --- a/src/soc/intel/broadwell/cpu.c +++ b/src/soc/intel/broadwell/cpu.c @@ -40,6 +40,7 @@ #include #include #include +#include /* Convert time in seconds to POWER_LIMIT_1_TIME MSR value */ static const u8 power_limit_time_sec_to_msr[] = { @@ -580,6 +581,9 @@ static void cpu_core_init(device_t cpu) enable_lapic_tpr(); setup_lapic(); + /* Set virtualization based on Kconfig option */ + set_vmx(); + /* Configure C States */ configure_c_states(); -- cgit v1.2.3