From ac47ea86752990942a5b887e503e73b35e8140d9 Mon Sep 17 00:00:00 2001 From: Johnny Lin Date: Mon, 8 May 2023 09:08:14 +0800 Subject: soc/intel/xeon_sp/gnr: Enable VMX by FSP Configure FSP UPD VMX from Kconfig ENABLE_VMX. Change-Id: I0c03f535b6f93761419657127e791c02e8ee4988 Signed-off-by: Johnny Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/84327 Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/soc/intel/xeon_sp/gnr/cpu.c | 5 +++-- src/soc/intel/xeon_sp/gnr/romstage.c | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/xeon_sp/gnr/cpu.c b/src/soc/intel/xeon_sp/gnr/cpu.c index ebccb0814d..580503537c 100644 --- a/src/soc/intel/xeon_sp/gnr/cpu.c +++ b/src/soc/intel/xeon_sp/gnr/cpu.c @@ -34,8 +34,9 @@ static void each_cpu_init(struct device *cpu) printk(BIOS_SPEW, "%s dev: %s, cpu: %lu, apic_id: 0x%x\n", __func__, dev_path(cpu), cpu_index(), cpu->path.apic.apic_id); - /* Enable VMX */ - set_vmx_and_lock(); + /* Only lock and let vmx enabled by FSP to avoid FSP always triggering power good reset + due to vmx configuration conflict */ + set_feature_ctrl_lock(); } static struct device_operations cpu_dev_ops = { diff --git a/src/soc/intel/xeon_sp/gnr/romstage.c b/src/soc/intel/xeon_sp/gnr/romstage.c index e61471ea40..48d88aaedf 100644 --- a/src/soc/intel/xeon_sp/gnr/romstage.c +++ b/src/soc/intel/xeon_sp/gnr/romstage.c @@ -66,6 +66,11 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version) "FSP_BOOT_WITH_FULL_CONFIGURATION.\n"); } + if (CONFIG(ENABLE_VMX)) + m_cfg->VmxEnable = 1; + else + m_cfg->VmxEnable = 0; + /* Board level settings */ mainboard_memory_init_params(mupd); } -- cgit v1.2.3