diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2021-06-08 06:12:25 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2022-11-10 19:09:34 +0000 |
commit | c0457358f6ac47f8a771af474bb1987c74fb0cd6 (patch) | |
tree | 0ddc6dc070e0072120d86ed1502c900f6ffd699e | |
parent | 0ea8f89e4095f82de0562142968e81d9588b2b7b (diff) |
sb,soc/intel: Use acpi_create_madt_ioapic_from_hw()
Change-Id: I9fd9cf230ce21674d1c24b40f310e5558e65be25
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55311
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
-rw-r--r-- | src/mainboard/aopen/dxplplusu/acpi_tables.c | 19 | ||||
-rw-r--r-- | src/soc/intel/baytrail/acpi.c | 3 | ||||
-rw-r--r-- | src/soc/intel/braswell/acpi.c | 2 | ||||
-rw-r--r-- | src/soc/intel/common/block/acpi/acpi.c | 2 | ||||
-rw-r--r-- | src/southbridge/intel/common/madt.c | 2 | ||||
-rw-r--r-- | src/southbridge/intel/i82801gx/lpc.c | 2 | ||||
-rw-r--r-- | src/southbridge/intel/i82801ix/madt.c | 3 | ||||
-rw-r--r-- | src/southbridge/intel/i82801jx/lpc.c | 3 | ||||
-rw-r--r-- | src/southbridge/intel/ibexpeak/madt.c | 3 |
9 files changed, 11 insertions, 28 deletions
diff --git a/src/mainboard/aopen/dxplplusu/acpi_tables.c b/src/mainboard/aopen/dxplplusu/acpi_tables.c index 7faa73d82d..2a3a97e819 100644 --- a/src/mainboard/aopen/dxplplusu/acpi_tables.c +++ b/src/mainboard/aopen/dxplplusu/acpi_tables.c @@ -8,15 +8,8 @@ #include <acpi/acpi.h> #include <device/pci_def.h> -#define IOAPIC_ICH4 2 -#define IOAPIC_P64H2_BUS_B 3 /* IOAPIC 3 at 02:1c.0 */ -#define IOAPIC_P64H2_BUS_A 4 /* IOAPIC 4 at 02:1e.0 */ - -#define INTEL_IOAPIC_NUM_INTERRUPTS 24 /* Both ICH-4 and P64-H2 */ - unsigned long acpi_fill_madt(unsigned long current) { - unsigned int irq_start = 0; struct device *bdev, *dev = NULL; struct resource *res = NULL; @@ -27,9 +20,7 @@ unsigned long acpi_fill_madt(unsigned long current) current += acpi_create_madt_lapic((acpi_madt_lapic_t *)current, 3, 7); /* Southbridge IOAPIC */ - current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, IOAPIC_ICH4, - 0xfec00000, irq_start); - irq_start += INTEL_IOAPIC_NUM_INTERRUPTS; + current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, 0xfec00000); bdev = pcidev_on_root(2, 0); /* P64H2 Bus B IOAPIC */ @@ -37,9 +28,7 @@ unsigned long acpi_fill_madt(unsigned long current) dev = pcidev_path_behind(bdev->link_list, PCI_DEVFN(28, 0)); if (dev) { res = find_resource(dev, PCI_BASE_ADDRESS_0); - current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, - IOAPIC_P64H2_BUS_B, res->base, irq_start); - irq_start += INTEL_IOAPIC_NUM_INTERRUPTS; + current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, res->base); } /* P64H2 Bus A IOAPIC */ @@ -47,9 +36,7 @@ unsigned long acpi_fill_madt(unsigned long current) dev = pcidev_path_behind(bdev->link_list, PCI_DEVFN(30, 0)); if (dev) { res = find_resource(dev, PCI_BASE_ADDRESS_0); - current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, - IOAPIC_P64H2_BUS_A, res->base, irq_start); - irq_start += INTEL_IOAPIC_NUM_INTERRUPTS; + current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, res->base); } /* Map ISA IRQ 0 to IRQ 2 */ diff --git a/src/soc/intel/baytrail/acpi.c b/src/soc/intel/baytrail/acpi.c index 0f9768793e..7589464277 100644 --- a/src/soc/intel/baytrail/acpi.c +++ b/src/soc/intel/baytrail/acpi.c @@ -92,8 +92,7 @@ unsigned long acpi_fill_madt(unsigned long current) current = acpi_create_madt_lapics(current); /* IOAPIC */ - current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, - 2, IO_APIC_ADDR, 0); + current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, IO_APIC_ADDR); current = acpi_madt_irq_overrides(current); diff --git a/src/soc/intel/braswell/acpi.c b/src/soc/intel/braswell/acpi.c index cb9cb2dd56..1c9eb4e31b 100644 --- a/src/soc/intel/braswell/acpi.c +++ b/src/soc/intel/braswell/acpi.c @@ -332,7 +332,7 @@ unsigned long acpi_fill_madt(unsigned long current) current = acpi_create_madt_lapics(current); /* IOAPIC */ - current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, 2, IO_APIC_ADDR, 0); + current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, IO_APIC_ADDR); current = acpi_madt_irq_overrides(current); diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c index f0903ff80e..c355c944bf 100644 --- a/src/soc/intel/common/block/acpi/acpi.c +++ b/src/soc/intel/common/block/acpi/acpi.c @@ -105,7 +105,7 @@ unsigned long acpi_fill_madt(unsigned long current) } } else { /* Default SOC IOAPIC entry */ - current += acpi_create_madt_ioapic((void *)current, 2, IO_APIC_ADDR, 0); + current += acpi_create_madt_ioapic_from_hw((void *)current, IO_APIC_ADDR); } return acpi_madt_irq_overrides(current); diff --git a/src/southbridge/intel/common/madt.c b/src/southbridge/intel/common/madt.c index 3eebe3a42e..eb11c21770 100644 --- a/src/southbridge/intel/common/madt.c +++ b/src/southbridge/intel/common/madt.c @@ -10,7 +10,7 @@ unsigned long acpi_fill_madt(unsigned long current) current = acpi_create_madt_lapics(current); /* IOAPIC */ - current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 2, IO_APIC_ADDR, 0); + current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, IO_APIC_ADDR); /* INT_SRC_OVR */ current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) diff --git a/src/southbridge/intel/i82801gx/lpc.c b/src/southbridge/intel/i82801gx/lpc.c index 4d8270638c..90d4eabefe 100644 --- a/src/southbridge/intel/i82801gx/lpc.c +++ b/src/southbridge/intel/i82801gx/lpc.c @@ -355,7 +355,7 @@ unsigned long acpi_fill_madt(unsigned long current) current = acpi_create_madt_lapics(current); /* IOAPIC */ - current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 2, IO_APIC_ADDR, 0); + current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, IO_APIC_ADDR); /* LAPIC_NMI */ current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *) diff --git a/src/southbridge/intel/i82801ix/madt.c b/src/southbridge/intel/i82801ix/madt.c index f3a7da5d1e..19d5d8cadb 100644 --- a/src/southbridge/intel/i82801ix/madt.c +++ b/src/southbridge/intel/i82801ix/madt.c @@ -10,8 +10,7 @@ unsigned long acpi_fill_madt(unsigned long current) current = acpi_create_madt_lapics(current); /* IOAPIC */ - current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, - 2, IO_APIC_ADDR, 0); + current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, IO_APIC_ADDR); /* LAPIC_NMI */ current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *) diff --git a/src/southbridge/intel/i82801jx/lpc.c b/src/southbridge/intel/i82801jx/lpc.c index 41bcccd9e0..1297837e33 100644 --- a/src/southbridge/intel/i82801jx/lpc.c +++ b/src/southbridge/intel/i82801jx/lpc.c @@ -370,8 +370,7 @@ unsigned long acpi_fill_madt(unsigned long current) current = acpi_create_madt_lapics(current); /* IOAPIC */ - current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, - 2, IO_APIC_ADDR, 0); + current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, IO_APIC_ADDR); /* LAPIC_NMI */ current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *) diff --git a/src/southbridge/intel/ibexpeak/madt.c b/src/southbridge/intel/ibexpeak/madt.c index 0c58f7f92d..a1a28a1b5f 100644 --- a/src/southbridge/intel/ibexpeak/madt.c +++ b/src/southbridge/intel/ibexpeak/madt.c @@ -12,8 +12,7 @@ unsigned long acpi_fill_madt(unsigned long current) current = acpi_create_madt_lapics(current); /* IOAPIC */ - current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, - 1, IO_APIC_ADDR, 0); + current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, IO_APIC_ADDR); /* INT_SRC_OVR */ current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |