Angel Pons | 5c59680 | 2020-04-03 01:21:01 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* This file is part of the coreboot project. */ |
zbao | 323a923 | 2012-07-19 16:39:01 +0800 | [diff] [blame] | 3 | |
Furquan Shaikh | 76cedd2 | 2020-05-02 10:24:23 -0700 | [diff] [blame^] | 4 | #include <acpi/acpi.h> |
zbao | 323a923 | 2012-07-19 16:39:01 +0800 | [diff] [blame] | 5 | #include <arch/ioapic.h> |
zbao | 323a923 | 2012-07-19 16:39:01 +0800 | [diff] [blame] | 6 | |
zbao | 323a923 | 2012-07-19 16:39:01 +0800 | [diff] [blame] | 7 | unsigned long acpi_fill_madt(unsigned long current) |
| 8 | { |
| 9 | /* create all subtables for processors */ |
| 10 | current = acpi_create_madt_lapics(current); |
| 11 | |
Martin Roth | f5726ea | 2013-01-18 12:55:40 -0700 | [diff] [blame] | 12 | /* Write Hudson IOAPIC, only one */ |
zbao | 323a923 | 2012-07-19 16:39:01 +0800 | [diff] [blame] | 13 | current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, CONFIG_MAX_CPUS, |
| 14 | IO_APIC_ADDR, 0); |
| 15 | |
| 16 | current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |
| 17 | current, 0, 0, 2, 0); |
| 18 | current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) |
| 19 | current, 0, 9, 9, 0xF); |
| 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 */ |
zbao | 323a923 | 2012-07-19 16:39:01 +0800 | [diff] [blame] | 24 | |
| 25 | /* create all subtables for processors */ |
zbao | 1594544 | 2012-08-03 11:47:53 +0800 | [diff] [blame] | 26 | current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *)current, 0xff, 5, 1); |
zbao | 323a923 | 2012-07-19 16:39:01 +0800 | [diff] [blame] | 27 | /* 1: LINT1 connect to NMI */ |
| 28 | |
| 29 | return current; |
| 30 | } |