Angel Pons | 585495e | 2020-04-03 01:21:38 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | 597ff87 | 2013-01-07 13:21:22 -0800 | [diff] [blame] | 2 | |
Furquan Shaikh | 76cedd2 | 2020-05-02 10:24:23 -0700 | [diff] [blame] | 3 | #include <acpi/acpi.h> |
Stefan Reinauer | 597ff87 | 2013-01-07 13:21:22 -0800 | [diff] [blame] | 4 | #include <arch/ioapic.h> |
Stefan Reinauer | 597ff87 | 2013-01-07 13:21:22 -0800 | [diff] [blame] | 5 | #include <arch/smp/mpspec.h> |
| 6 | #include <device/device.h> |
Stefan Reinauer | 597ff87 | 2013-01-07 13:21:22 -0800 | [diff] [blame] | 7 | |
Gerd Hoffmann | d69da84 | 2013-07-25 15:59:07 +0200 | [diff] [blame] | 8 | #include "fw_cfg.h" |
Vladimir Serbinenko | 41877d8 | 2014-09-01 22:18:01 +0200 | [diff] [blame] | 9 | #include "acpi.h" |
Stefan Reinauer | 597ff87 | 2013-01-07 13:21:22 -0800 | [diff] [blame] | 10 | |
| 11 | unsigned long acpi_fill_madt(unsigned long current) |
| 12 | { |
| 13 | /* Local APICs */ |
| 14 | current = acpi_create_madt_lapics(current); |
| 15 | |
| 16 | /* IOAPIC */ |
Kyösti Mälkki | 8ea8eba | 2022-11-11 19:46:05 +0200 | [diff] [blame] | 17 | current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, IO_APIC_ADDR); |
Stefan Reinauer | 597ff87 | 2013-01-07 13:21:22 -0800 | [diff] [blame] | 18 | |
| 19 | /* INT_SRC_OVR */ |
| 20 | current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |
| 21 | current, 0, 0, 2, 0); |
| 22 | current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |
| 23 | current, 0, 9, 9, MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_HIGH); |
| 24 | |
| 25 | return current; |
| 26 | } |