soc/intel/meteorlake: Disable FSP UPDs related to virtualization

This patch disables FSP UPDs (`VtdDisable` and `VmxEnable`) as kernel
cmdline still passes `intel_iommu=off` to turn off virtualization.

BUG=b:241746156
TEST=Able to boot Google/rex to ChromeOS UI.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I21e178a93e311889f2ab7d1a08230d21b051f45e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67452
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
Subrata Banik 2022-09-08 09:38:08 -07:00
parent e2542a1af1
commit a3ad319fbf
1 changed files with 10 additions and 0 deletions

View File

@ -2,6 +2,7 @@
#include <assert.h>
#include <console/console.h>
#include <cpu/intel/cpu_ids.h>
#include <cpu/x86/msr.h>
#include <device/device.h>
#include <fsp/fsp_debug_event.h>
@ -234,6 +235,15 @@ static void fill_fspm_usb4_params(FSP_M_CONFIG *m_cfg,
static void fill_fspm_vtd_params(FSP_M_CONFIG *m_cfg,
const struct soc_intel_meteorlake_config *config)
{
const uint32_t cpuid = cpu_get_cpuid();
/* FIXME: Enable Vtd back when kernel cmdline needs it. */
if (cpuid == CPUID_METEORLAKE_A0_1 || cpuid == CPUID_METEORLAKE_A0_2) {
m_cfg->VtdDisable = 1;
m_cfg->VmxEnable = 0;
return;
}
m_cfg->VtdDisable = 0;
m_cfg->VtdBaseAddress[0] = GFXVT_BASE_ADDRESS;
m_cfg->VtdBaseAddress[1] = VTVC0_BASE_ADDRESS;