Angel Pons | 3b7983a | 2021-01-28 12:14:12 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <acpi/acpi.h> |
| 4 | #include <arch/ioapic.h> |
| 5 | #include <arch/smp/mpspec.h> |
| 6 | |
| 7 | unsigned long acpi_fill_madt(unsigned long current) |
| 8 | { |
| 9 | /* Local APICs */ |
| 10 | current = acpi_create_madt_lapics(current); |
| 11 | |
| 12 | /* IOAPIC */ |
Kyösti Mälkki | c045735 | 2021-06-08 06:12:25 +0300 | [diff] [blame^] | 13 | current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, IO_APIC_ADDR); |
Angel Pons | 3b7983a | 2021-01-28 12:14:12 +0100 | [diff] [blame] | 14 | |
| 15 | /* LAPIC_NMI */ |
| 16 | current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *) |
| 17 | current, 0, |
| 18 | MP_IRQ_POLARITY_HIGH | |
| 19 | MP_IRQ_TRIGGER_EDGE, 0x01); |
| 20 | current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *) |
| 21 | current, 1, MP_IRQ_POLARITY_HIGH | |
| 22 | MP_IRQ_TRIGGER_EDGE, 0x01); |
| 23 | |
| 24 | /* INT_SRC_OVR */ |
| 25 | current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |
| 26 | current, 0, 0, 2, MP_IRQ_POLARITY_HIGH | MP_IRQ_TRIGGER_EDGE); |
| 27 | current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |
| 28 | current, 0, 9, 9, MP_IRQ_POLARITY_HIGH | MP_IRQ_TRIGGER_LEVEL); |
| 29 | |
| 30 | return current; |
| 31 | } |