Rizwan Qureshi has uploaded this change for review.

View Change

soc/intel/cannonlake: select VMX configurabiltity

Select VMX configuration config and implement required soc side API.
Also, run vmx_configure() on all CPUs

BUG=b:124518711

Change-Id: If9a49deb52e33c1c400a7e2cfab6337b62ecc08e
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
---
M src/soc/intel/cannonlake/Kconfig
M src/soc/intel/cannonlake/cpu.c
2 files changed, 25 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/31442/1
diff --git a/src/soc/intel/cannonlake/Kconfig b/src/soc/intel/cannonlake/Kconfig
index cd8819d..bacbe7b 100644
--- a/src/soc/intel/cannonlake/Kconfig
+++ b/src/soc/intel/cannonlake/Kconfig
@@ -85,6 +85,7 @@
select SOC_INTEL_COMMON_BLOCK_SA
select SOC_INTEL_COMMON_BLOCK_SMM
select SOC_INTEL_COMMON_BLOCK_SMM_IO_TRAP
+ select SOC_INTEL_COMMON_BLOCK_VMX
select SOC_INTEL_COMMON_PCH_BASE
select SOC_INTEL_COMMON_NHLT
select SOC_INTEL_COMMON_RESET
diff --git a/src/soc/intel/cannonlake/cpu.c b/src/soc/intel/cannonlake/cpu.c
index f987f8b..5f73681 100644
--- a/src/soc/intel/cannonlake/cpu.c
+++ b/src/soc/intel/cannonlake/cpu.c
@@ -24,6 +24,7 @@
#include <intelblocks/cpulib.h>
#include <intelblocks/mp_init.h>
#include <intelblocks/smm.h>
+#include <intelblocks/vmx.h>
#include <romstage_handoff.h>
#include <soc/cpu.h>
#include <soc/msr.h>
@@ -31,6 +32,7 @@
#include <soc/pm.h>
#include <soc/smm.h>
#include <soc/systemagent.h>
+#include <timer.h>

/* Convert time in seconds to POWER_LIMIT_1_TIME MSR value */
static const u8 power_limit_time_sec_to_msr[] = {
@@ -458,6 +460,8 @@

/* Lock down the SMRAM space. */
smm_lock();
+
+ mp_run_on_all_cpus(vmx_configure, NULL, 2 * USECS_PER_MSEC);
}

static const struct mp_ops mp_ops = {
@@ -484,3 +488,23 @@
/* Thermal throttle activation offset */
configure_thermal_target();
}
+
+int soc_fill_vmx_param(struct vmx_param *vmx_param)
+{
+ struct device *dev = SA_DEV_ROOT;
+ config_t *conf;
+
+ if (!dev) {
+ printk(BIOS_ERR, "Failed to get root dev for checking VMX param\n");
+ return -1;
+ }
+
+ 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;
+}

To view, visit change 31442. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If9a49deb52e33c1c400a7e2cfab6337b62ecc08e
Gerrit-Change-Number: 31442
Gerrit-PatchSet: 1
Gerrit-Owner: Rizwan Qureshi <rizwan.qureshi@intel.com>
Gerrit-MessageType: newchange