Angel Pons | 5c59680 | 2020-04-03 01:21:01 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 2 | |
Furquan Shaikh | 76cedd2 | 2020-05-02 10:24:23 -0700 | [diff] [blame] | 3 | #include <acpi/acpi.h> |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 4 | #include <arch/ioapic.h> |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 5 | |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 6 | unsigned long acpi_fill_madt(unsigned long current) |
| 7 | { |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 8 | /* create all subtables for processors */ |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 9 | current = acpi_create_madt_lapics(current); |
Stefan Reinauer | 5ff7c13 | 2011-10-31 12:56:45 -0700 | [diff] [blame] | 10 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 11 | /* Write SB800 IOAPIC, only one */ |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 12 | current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, |
Kerry Sheh | f03360f | 2012-01-19 13:25:55 +0800 | [diff] [blame] | 13 | CONFIG_MAX_CPUS, IO_APIC_ADDR, 0); |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 14 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 15 | current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |
| 16 | current, 0, 0, 2, 0); |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 17 | current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |
| 18 | current, 0, 9, 9, 0xF); |
Stefan Reinauer | 5ff7c13 | 2011-10-31 12:56:45 -0700 | [diff] [blame] | 19 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 20 | /* 0: mean bus 0--->ISA */ |
| 21 | /* 0: PIC 0 */ |
| 22 | /* 2: APIC 2 */ |
Kyösti Mälkki | d874757 | 2014-06-26 05:30:54 +0300 | [diff] [blame] | 23 | /* 5 mean: 0101 --> Edge-triggered, Active high */ |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 24 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 25 | /* create all subtables for processors */ |
Marc Jones | 84e0dfc | 2011-12-12 21:12:43 -0700 | [diff] [blame] | 26 | /* current = acpi_create_madt_lapic_nmis(current, 5, 1); */ |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 27 | /* 1: LINT1 connect to NMI */ |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 28 | |
Marc Jones | 522ba28 | 2012-01-03 16:02:07 -0700 | [diff] [blame] | 29 | return current; |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 30 | } |