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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75710 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Naresh <naresh.solanki.2011@gmail.com>
This commit is contained in:
parent
0ad766c0d5
commit
ce179729f0
|
@ -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>
|
||||
|
@ -145,7 +146,7 @@ static void read_resources(struct device *dev)
|
|||
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;
|
||||
|
|
|
@ -206,9 +206,6 @@ static unsigned long acpi_ivhd_misc(unsigned long current, struct device *dev)
|
|||
/* 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 */
|
||||
|
|
|
@ -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>
|
||||
|
@ -160,7 +161,7 @@ static void read_resources(struct device *dev)
|
|||
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;
|
||||
|
|
|
@ -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>
|
||||
|
@ -188,7 +189,7 @@ static void read_resources(struct device *dev)
|
|||
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;
|
||||
|
|
|
@ -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>
|
||||
|
@ -160,7 +161,7 @@ static void read_resources(struct device *dev)
|
|||
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;
|
||||
|
|
|
@ -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>
|
||||
|
@ -143,7 +144,7 @@ static void read_resources(struct device *dev)
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue