From c0113106fabcd8714ff9e0bf8ae1ab4220cdf83f Mon Sep 17 00:00:00 2001 From: Felix Held Date: Mon, 18 Dec 2023 22:19:25 +0100 Subject: [PATCH] nb/amd/pi/00730F01/northbridge: skip IVRS when IOMMU is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't generate the IVRS ACPI table if the IOMMU PCI device isn't enabled in the devicetree. Signed-off-by: Felix Held Change-Id: I5e7f976011da92c0ca69decdca7aa77de24b6a2a Reviewed-on: https://review.coreboot.org/c/coreboot/+/79677 Tested-by: build bot (Jenkins) Reviewed-by: Michał Żygowski Reviewed-by: Paul Menzel --- src/northbridge/amd/pi/00730F01/northbridge.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c index 55074435ab..826c19e862 100644 --- a/src/northbridge/amd/pi/00730F01/northbridge.c +++ b/src/northbridge/amd/pi/00730F01/northbridge.c @@ -437,12 +437,14 @@ static unsigned long agesa_write_acpi_tables(const struct device *device, current += ((acpi_header_t *)current)->length; /* IVRS */ - current = ALIGN_UP(current, 8); - printk(BIOS_DEBUG, "ACPI: * IVRS at %lx\n", current); - ivrs = (acpi_ivrs_t *)current; - acpi_create_ivrs(ivrs, acpi_fill_ivrs); - current += ivrs->header.length; - acpi_add_table(rsdp, ivrs); + if (is_dev_enabled(DEV_PTR(iommu))) { + current = ALIGN_UP(current, 8); + printk(BIOS_DEBUG, "ACPI: * IVRS at %lx\n", current); + ivrs = (acpi_ivrs_t *)current; + acpi_create_ivrs(ivrs, acpi_fill_ivrs); + current += ivrs->header.length; + acpi_add_table(rsdp, ivrs); + } /* SRAT */ current = ALIGN_UP(current, 8);