Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/75710?usp=email )
Change subject: soc/amd/acpi/ivrs: Use specific IOMMU resource index on all SOC ......................................................................
soc/amd/acpi/ivrs: Use specific IOMMU resource index on all SOC
By adding all DXIO IOAPIC with the same resource index, the IVRS code can always pick that resource which simplifies the code.
Signed-off-by: Arthur Heymans arthur@aheymans.xyz Change-Id: I10345e2337dcb709c2c1a8e57a1b7dd9c04adb9e --- M src/soc/amd/cezanne/root_complex.c M src/soc/amd/common/block/acpi/ivrs.c M src/soc/amd/glinda/root_complex.c M src/soc/amd/mendocino/root_complex.c M src/soc/amd/phoenix/root_complex.c M src/soc/amd/picasso/root_complex.c 6 files changed, 10 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/75710/1
diff --git a/src/soc/amd/cezanne/root_complex.c b/src/soc/amd/cezanne/root_complex.c index 6bef915..4922421 100644 --- a/src/soc/amd/cezanne/root_complex.c +++ b/src/soc/amd/cezanne/root_complex.c @@ -3,6 +3,7 @@ #include <acpi/acpigen.h> #include <amdblocks/acpi.h> #include <amdblocks/alib.h> +#include <amdblocks/data_fabric.h> #include <amdblocks/ioapic.h> #include <amdblocks/memmap.h> #include <arch/ioapic.h> @@ -142,7 +143,7 @@ mmconf_resource(dev, idx++);
/* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, idx++); + gnb_apic = new_resource(dev, IOMMU_IOAPIC_IDX); gnb_apic->base = GNB_IO_APIC_ADDR; gnb_apic->size = 0x00001000; gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; diff --git a/src/soc/amd/common/block/acpi/ivrs.c b/src/soc/amd/common/block/acpi/ivrs.c index 3e58a61..1629ff9 100644 --- a/src/soc/amd/common/block/acpi/ivrs.c +++ b/src/soc/amd/common/block/acpi/ivrs.c @@ -206,9 +206,6 @@ /* Describe IOAPIC associated with the IOMMU */ current = _acpi_fill_ivrs_ioapic(current, (u8 *)(uintptr_t)res->base, PCI_DEVFN(0, 1) | (dev->link_list->secondary << 8), 0); - } else if (dev->link_list->secondary == 0) { - current = _acpi_fill_ivrs_ioapic(current, (u8 *)GNB_IO_APIC_ADDR, - PCI_DEVFN(0, 1), 0); }
/* If the domain has secondary bus as zero then associate HPET & FCH IOAPIC */ diff --git a/src/soc/amd/glinda/root_complex.c b/src/soc/amd/glinda/root_complex.c index a8b54e2..4b582ae 100644 --- a/src/soc/amd/glinda/root_complex.c +++ b/src/soc/amd/glinda/root_complex.c @@ -5,6 +5,7 @@ #include <acpi/acpigen.h> #include <amdblocks/acpi.h> #include <amdblocks/alib.h> +#include <amdblocks/data_fabric.h> #include <amdblocks/ioapic.h> #include <amdblocks/memmap.h> #include <arch/ioapic.h> @@ -157,7 +158,7 @@ mmconf_resource(dev, idx++);
/* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, idx++); + gnb_apic = new_resource(dev, IOMMU_IOAPIC_IDX); gnb_apic->base = GNB_IO_APIC_ADDR; gnb_apic->size = 0x00001000; gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; diff --git a/src/soc/amd/mendocino/root_complex.c b/src/soc/amd/mendocino/root_complex.c index 53a245b..7f9220e 100644 --- a/src/soc/amd/mendocino/root_complex.c +++ b/src/soc/amd/mendocino/root_complex.c @@ -5,6 +5,7 @@ #include <acpi/acpigen.h> #include <amdblocks/acpi.h> #include <amdblocks/alib.h> +#include <amdblocks/data_fabric.h> #include <amdblocks/ioapic.h> #include <amdblocks/memmap.h> #include <arch/ioapic.h> @@ -185,7 +186,7 @@ mmconf_resource(dev, idx++);
/* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, idx++); + gnb_apic = new_resource(dev, IOMMU_IOAPIC_IDX); gnb_apic->base = GNB_IO_APIC_ADDR; gnb_apic->size = 0x00001000; gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; diff --git a/src/soc/amd/phoenix/root_complex.c b/src/soc/amd/phoenix/root_complex.c index 83fb047..185a88e 100644 --- a/src/soc/amd/phoenix/root_complex.c +++ b/src/soc/amd/phoenix/root_complex.c @@ -5,6 +5,7 @@ #include <acpi/acpigen.h> #include <amdblocks/acpi.h> #include <amdblocks/alib.h> +#include <amdblocks/data_fabric.h> #include <amdblocks/ioapic.h> #include <amdblocks/memmap.h> #include <arch/ioapic.h> @@ -157,7 +158,7 @@ mmconf_resource(dev, idx++);
/* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, idx++); + gnb_apic = new_resource(dev, IOMMU_IOAPIC_IDX); gnb_apic->base = GNB_IO_APIC_ADDR; gnb_apic->size = 0x00001000; gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; diff --git a/src/soc/amd/picasso/root_complex.c b/src/soc/amd/picasso/root_complex.c index 5ea8b79..5d4550d 100644 --- a/src/soc/amd/picasso/root_complex.c +++ b/src/soc/amd/picasso/root_complex.c @@ -3,6 +3,7 @@ #include <acpi/acpigen.h> #include <amdblocks/acpi.h> #include <amdblocks/alib.h> +#include <amdblocks/data_fabric.h> #include <amdblocks/memmap.h> #include <amdblocks/ioapic.h> #include <arch/ioapic.h> @@ -140,7 +141,7 @@ mmconf_resource(dev, idx++);
/* GNB IOAPIC resource */ - gnb_apic = new_resource(dev, idx++); + gnb_apic = new_resource(dev, IOMMU_IOAPIC_IDX); gnb_apic->base = GNB_IO_APIC_ADDR; gnb_apic->size = 0x00001000; gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;