binaryPI: Use common code for LAPIC NMIs

Change-Id: I1a39f355733d10ecd43a1da541ab2e66ba13db15
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74310
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
This commit is contained in:
Kyösti Mälkki 2021-06-16 11:06:26 +03:00
parent 56621e1e57
commit 899c713e3e
3 changed files with 3 additions and 7 deletions

View File

@ -145,7 +145,7 @@ int acpi_create_madt_lx2apic(acpi_madt_lx2apic_t *lapic, u32 cpu, u32 apic)
return lapic->length; 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; struct device *cpu;
int index, apic_ids[CONFIG_MAX_CPUS] = {0}, num_cpus = 0; int index, apic_ids[CONFIG_MAX_CPUS] = {0}, num_cpus = 0;

View File

@ -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, int acpi_create_madt_lapic_nmi(acpi_madt_lapic_nmi_t *lapic_nmi, u8 cpu,
u16 flags, u8 lint); u16 flags, u8 lint);
void acpi_create_madt(acpi_madt_t *madt); 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); 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(acpi_madt_lx2apic_t *lapic, u32 cpu, u32 apic);
int acpi_create_madt_lx2apic_nmi(acpi_madt_lx2apic_nmi_t *lapic_nmi, u32 cpu, int acpi_create_madt_lx2apic_nmi(acpi_madt_lx2apic_nmi_t *lapic_nmi, u32 cpu,

View File

@ -7,7 +7,7 @@
unsigned long acpi_fill_madt(unsigned long current) unsigned long acpi_fill_madt(unsigned long current)
{ {
/* create all subtables for processors */ /* create all subtables for processors */
current = acpi_create_madt_lapics(current); current = acpi_create_madt_lapics_with_nmis(current);
/* Write SB800 IOAPIC, only one */ /* Write SB800 IOAPIC, only one */
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, CONFIG_MAX_CPUS, 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 */ /* 2: APIC 2 */
/* 5 mean: 0101 --> Edge-triggered, Active high */ /* 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; return current;
} }