2 * coreboot IOAPIC support
4 * Copyright (C) 2010 coresystems GmbH
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
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.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
22 #ifndef __I386_ARCH_IOAPIC_H
23 #define __I386_ARCH_IOAPIC_H
25 #define IO_APIC_ADDR 0xfec00000UL
26 #define IO_APIC_INTERRUPTS 24
28 #define ALL (0xff << 24)
30 #define DISABLED (1 << 16)
31 #define ENABLED (0 << 16)
32 #define TRIGGER_EDGE (0 << 15)
33 #define TRIGGER_LEVEL (1 << 15)
34 #define POLARITY_HIGH (0 << 13)
35 #define POLARITY_LOW (1 << 13)
36 #define PHYSICAL_DEST (0 << 11)
37 #define LOGICAL_DEST (1 << 11)
38 #define ExtINT (7 << 8)
43 void setup_ioapic(u32 ioapic_base, u8 ioapic_id);
44 void clear_ioapic(u32 ioapic_base);