From 2e65e9cb69de5a0e8bfae1ab79016af8c5c5316f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Wed, 16 Jun 2021 11:00:40 +0300 Subject: soc/amd: Use ioapic helper functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Calling setup_ioapic() was only correct for the IOAPIC routing GSI 0..15 that mimic legacy PIC IRQs. Change-Id: Ifdacc61b72f461ec6bea334fa06651c09a9695d6 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/55571 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Felix Held --- src/soc/amd/mendocino/acpi.c | 7 +++---- src/soc/amd/mendocino/root_complex.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/soc/amd/mendocino') diff --git a/src/soc/amd/mendocino/acpi.c b/src/soc/amd/mendocino/acpi.c index 779ea4ebb0..b867930c34 100644 --- a/src/soc/amd/mendocino/acpi.c +++ b/src/soc/amd/mendocino/acpi.c @@ -28,11 +28,10 @@ unsigned long acpi_fill_madt(unsigned long current) /* create all subtables for processors */ current = acpi_create_madt_lapics(current); - current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, - FCH_IOAPIC_ID, IO_APIC_ADDR, 0); + current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, IO_APIC_ADDR); - current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, - GNB_IOAPIC_ID, GNB_IO_APIC_ADDR, IO_APIC_INTERRUPTS); + current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, + GNB_IO_APIC_ADDR); /* PIT is connected to legacy IRQ 0, but IOAPIC GSI 2 */ current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)current, diff --git a/src/soc/amd/mendocino/root_complex.c b/src/soc/amd/mendocino/root_complex.c index abc49cfe05..0d24a25700 100644 --- a/src/soc/amd/mendocino/root_complex.c +++ b/src/soc/amd/mendocino/root_complex.c @@ -187,7 +187,7 @@ static void read_resources(struct device *dev) static void root_complex_init(struct device *dev) { - setup_ioapic((u8 *)GNB_IO_APIC_ADDR, GNB_IOAPIC_ID); + register_new_ioapic((u8 *)GNB_IO_APIC_ADDR); } static void acipgen_dptci(void) -- cgit v1.2.3