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 <marcjones@sysproconsulting.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47579
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Marc Jones 2020-11-13 15:55:31 -07:00 committed by Marc Jones
parent d5c3d9ca82
commit b7e591e2da
1 changed files with 8 additions and 2 deletions

View File

@ -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);