blob: e936f8d7ab668b62e4b1160e8b2e5c60cf3cc40d [file] [log] [blame]
Stefan Reinaueraeba92a2009-04-17 08:37:18 +00001/*
2 * This file is part of the coreboot project.
Stefan Reinauer14e22772010-04-27 06:56:47 +00003 *
Stefan Reinaueraeba92a2009-04-17 08:37:18 +00004 * Copyright (C) 2007-2009 coresystems GmbH
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
9 * the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Stefan Reinaueraeba92a2009-04-17 08:37:18 +000015 */
16
17#include <string.h>
18#include <console/console.h>
19#include <arch/acpi.h>
Uwe Hermann74d1a6e2010-10-12 17:34:08 +000020#include <arch/ioapic.h>
Stefan Reinaueraeba92a2009-04-17 08:37:18 +000021#include <device/device.h>
22#include <device/pci.h>
23#include <device/pci_ids.h>
Stefan Reinaueraeba92a2009-04-17 08:37:18 +000024
Stefan Reinaueraeba92a2009-04-17 08:37:18 +000025unsigned long acpi_fill_madt(unsigned long current)
26{
27 /* Local Apic */
28 current += acpi_create_madt_lapic((acpi_madt_lapic_t *) current, 0, 0);
29
30 /* IOAPIC */
31 current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 2, IO_APIC_ADDR, 0);
32
33 /* INT_SRC_OVR */
34 current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) current, 0, 0, 2, 0);
35 current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) current, 0, 9, 9, 0x000f); // low/level
36
37 /* LAPIC_NMI */
38 current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *) current, 0, 0x0005, 1); // high/edge
39
40 return current;
41}