From b7e591e2da340df0e922a31588e10ee0ea058c96 Mon Sep 17 00:00:00 2001 From: Marc Jones Date: Fri, 13 Nov 2020 15:55:31 -0700 Subject: [PATCH] soc/intel/xeon_sp: Fix SKX SATA drive boot issue SKX FSP doesn't support X2APIC setup, but CPX does. The CPX DMAR table needs the X2APIC opt out flag set. This fixes the hang loading a kexec'd kernel. The change is easy to see in the coreboot output: [DMA Remapping table] Flags: 0x3 or in the DMAR ACPI table. Change-Id: Iec977c893b70e30875d9a92f24af009c1e90389e Signed-off-by: Marc Jones Reviewed-on: https://review.coreboot.org/c/coreboot/+/47579 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/soc/intel/xeon_sp/nb_acpi.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/soc/intel/xeon_sp/nb_acpi.c b/src/soc/intel/xeon_sp/nb_acpi.c index 4a4498080a..6d6eb00ea4 100644 --- a/src/soc/intel/xeon_sp/nb_acpi.c +++ b/src/soc/intel/xeon_sp/nb_acpi.c @@ -434,9 +434,15 @@ unsigned long northbridge_write_acpi_tables(const struct device *device, if (config->vtd_support) { current = ALIGN(current, 8); dmar = (acpi_dmar_t *)current; + enum dmar_flags flags = DMAR_INTR_REMAP; + + /* SKX FSP doesn't support X2APIC, but CPX FSP does */ + if (CONFIG(SOC_INTEL_SKYLAKE_SP)) + flags |= DMAR_X2APIC_OPT_OUT; + printk(BIOS_DEBUG, "ACPI: * DMAR\n"); - printk(BIOS_DEBUG, "[DMA Remapping table] Flags: 0x%x\n", DMAR_INTR_REMAP); - acpi_create_dmar(dmar, DMAR_INTR_REMAP, acpi_fill_dmar); + printk(BIOS_DEBUG, "[DMA Remapping table] Flags: 0x%x\n", flags); + acpi_create_dmar(dmar, flags, acpi_fill_dmar); current += dmar->header.length; current = acpi_align_current(current); acpi_add_table(rsdp, dmar);