blob: 5d7e19649e21a40a5dbb237194b82fa96338a9d0 [file] [log] [blame]
Stefan Reinauer0401bd82010-01-16 18:31:34 +00001/*
Uwe Hermannc70e9fc2010-02-15 23:10:19 +00002 * This file is part of the coreboot project.
Stefan Reinauer0401bd82010-01-16 18:31:34 +00003 *
4 * Copyright (C) 2010 coresystems GmbH
5 *
Uwe Hermannc70e9fc2010-02-15 23:10:19 +00006 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
Stefan Reinauer0401bd82010-01-16 18:31:34 +00009 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
Uwe Hermannc70e9fc2010-02-15 23:10:19 +000017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Stefan Reinauer0401bd82010-01-16 18:31:34 +000018 */
19
20#ifndef __I386_ARCH_IOAPIC_H
21#define __I386_ARCH_IOAPIC_H
22
Patrick Georgic8feedd2012-02-16 18:43:25 +010023#define IO_APIC_ADDR 0xfec00000
Stefan Reinauer0401bd82010-01-16 18:31:34 +000024#define IO_APIC_INTERRUPTS 24
25
26#define ALL (0xff << 24)
27#define NONE (0)
28#define DISABLED (1 << 16)
29#define ENABLED (0 << 16)
30#define TRIGGER_EDGE (0 << 15)
31#define TRIGGER_LEVEL (1 << 15)
32#define POLARITY_HIGH (0 << 13)
33#define POLARITY_LOW (1 << 13)
34#define PHYSICAL_DEST (0 << 11)
35#define LOGICAL_DEST (1 << 11)
36#define ExtINT (7 << 8)
37#define NMI (4 << 8)
38#define SMI (2 << 8)
39#define INT (1 << 8)
40
Patrick Georgic8feedd2012-02-16 18:43:25 +010041#ifndef __ACPI__
Stefan Reinauer0401bd82010-01-16 18:31:34 +000042void setup_ioapic(u32 ioapic_base, u8 ioapic_id);
43void clear_ioapic(u32 ioapic_base);
Patrick Georgic8feedd2012-02-16 18:43:25 +010044#endif
Stefan Reinauer0401bd82010-01-16 18:31:34 +000045
46#endif