2 * This file is part of the coreboot project.
4 * Copyright (C) 2010 coresystems GmbH
6 * 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.
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.
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
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef __I386_ARCH_IOAPIC_H
21 #define __I386_ARCH_IOAPIC_H
23 #define IO_APIC_ADDR 0xfec00000UL
24 #define IO_APIC_INTERRUPTS 24
26 #define ALL (0xff << 24)
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)
41 void setup_ioapic(u32 ioapic_base, u8 ioapic_id);
42 void clear_ioapic(u32 ioapic_base);