From 899c713e3eb073491d8b954165919daa87609493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Wed, 16 Jun 2021 11:06:26 +0300 Subject: [PATCH] binaryPI: Use common code for LAPIC NMIs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1a39f355733d10ecd43a1da541ab2e66ba13db15 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/74310 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/acpi/acpi.c | 2 +- src/include/acpi/acpi.h | 2 +- src/northbridge/amd/pi/00730F01/acpi_tables.c | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c index 2706bf7f15..53b16077ba 100644 --- a/src/acpi/acpi.c +++ b/src/acpi/acpi.c @@ -145,7 +145,7 @@ int acpi_create_madt_lx2apic(acpi_madt_lx2apic_t *lapic, u32 cpu, u32 apic) return lapic->length; } -unsigned long acpi_create_madt_lapics(unsigned long current) +static unsigned long acpi_create_madt_lapics(unsigned long current) { struct device *cpu; int index, apic_ids[CONFIG_MAX_CPUS] = {0}, num_cpus = 0; diff --git a/src/include/acpi/acpi.h b/src/include/acpi/acpi.h index a108d6aa65..e99f5b9c72 100644 --- a/src/include/acpi/acpi.h +++ b/src/include/acpi/acpi.h @@ -1343,7 +1343,7 @@ int acpi_create_madt_irqoverride(acpi_madt_irqoverride_t *irqoverride, int acpi_create_madt_lapic_nmi(acpi_madt_lapic_nmi_t *lapic_nmi, u8 cpu, u16 flags, u8 lint); void acpi_create_madt(acpi_madt_t *madt); -unsigned long acpi_create_madt_lapics(unsigned long current); + unsigned long acpi_create_madt_lapics_with_nmis(unsigned long current); int acpi_create_madt_lx2apic(acpi_madt_lx2apic_t *lapic, u32 cpu, u32 apic); int acpi_create_madt_lx2apic_nmi(acpi_madt_lx2apic_nmi_t *lapic_nmi, u32 cpu, diff --git a/src/northbridge/amd/pi/00730F01/acpi_tables.c b/src/northbridge/amd/pi/00730F01/acpi_tables.c index d7862158e9..1cf7e74722 100644 --- a/src/northbridge/amd/pi/00730F01/acpi_tables.c +++ b/src/northbridge/amd/pi/00730F01/acpi_tables.c @@ -7,7 +7,7 @@ unsigned long acpi_fill_madt(unsigned long current) { /* create all subtables for processors */ - current = acpi_create_madt_lapics(current); + current = acpi_create_madt_lapics_with_nmis(current); /* Write SB800 IOAPIC, only one */ current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, CONFIG_MAX_CPUS, @@ -26,9 +26,5 @@ unsigned long acpi_fill_madt(unsigned long current) /* 2: APIC 2 */ /* 5 mean: 0101 --> Edge-triggered, Active high */ - /* create all subtables for processors */ - current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *)current, 0xff, 5, 1); - /* 1: LINT1 connect to NMI */ - return current; }