Angel Pons | 182dbde | 2020-04-02 23:49:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* This file is part of the coreboot project. */ |
Vladimir Serbinenko | 33b535f | 2014-10-19 10:13:14 +0200 | [diff] [blame] | 3 | |
Furquan Shaikh | 76cedd2 | 2020-05-02 10:24:23 -0700 | [diff] [blame^] | 4 | #include <acpi/acpi.h> |
Vladimir Serbinenko | 33b535f | 2014-10-19 10:13:14 +0200 | [diff] [blame] | 5 | #include <arch/ioapic.h> |
Vladimir Serbinenko | 33b535f | 2014-10-19 10:13:14 +0200 | [diff] [blame] | 6 | #include <arch/smp/mpspec.h> |
| 7 | |
| 8 | unsigned long acpi_fill_madt(unsigned long current) |
| 9 | { |
| 10 | /* Local APICs */ |
| 11 | current = acpi_create_madt_lapics(current); |
| 12 | |
| 13 | /* IOAPIC */ |
Elyes HAOUAS | c98f2ea | 2020-04-07 16:38:32 +0200 | [diff] [blame] | 14 | current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 2, IO_APIC_ADDR, 0); |
Vladimir Serbinenko | 33b535f | 2014-10-19 10:13:14 +0200 | [diff] [blame] | 15 | |
| 16 | /* INT_SRC_OVR */ |
| 17 | current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |
| 18 | current, 0, 0, 2, 0); |
| 19 | current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |
| 20 | current, 0, 9, 9, MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_HIGH); |
| 21 | |
| 22 | return current; |
| 23 | } |