Stefan Reinauer | 0401bd8 | 2010-01-16 18:31:34 +0000 | [diff] [blame] | 1 | /* |
Uwe Hermann | c70e9fc | 2010-02-15 23:10:19 +0000 | [diff] [blame] | 2 | * This file is part of the coreboot project. |
Stefan Reinauer | 0401bd8 | 2010-01-16 18:31:34 +0000 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2010 coresystems GmbH |
| 5 | * |
Uwe Hermann | c70e9fc | 2010-02-15 23:10:19 +0000 | [diff] [blame] | 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. |
Stefan Reinauer | 0401bd8 | 2010-01-16 18:31:34 +0000 | [diff] [blame] | 9 | * |
| 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 Hermann | c70e9fc | 2010-02-15 23:10:19 +0000 | [diff] [blame] | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
Stefan Reinauer | 0401bd8 | 2010-01-16 18:31:34 +0000 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | #ifndef __I386_ARCH_IOAPIC_H |
| 21 | #define __I386_ARCH_IOAPIC_H |
| 22 | |
Patrick Georgi | c8feedd | 2012-02-16 18:43:25 +0100 | [diff] [blame] | 23 | #define IO_APIC_ADDR 0xfec00000 |
Stefan Reinauer | 0401bd8 | 2010-01-16 18:31:34 +0000 | [diff] [blame] | 24 | #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 Georgi | c8feedd | 2012-02-16 18:43:25 +0100 | [diff] [blame] | 41 | #ifndef __ACPI__ |
Stefan Reinauer | 0401bd8 | 2010-01-16 18:31:34 +0000 | [diff] [blame] | 42 | void setup_ioapic(u32 ioapic_base, u8 ioapic_id); |
| 43 | void clear_ioapic(u32 ioapic_base); |
Patrick Georgi | c8feedd | 2012-02-16 18:43:25 +0100 | [diff] [blame] | 44 | #endif |
Stefan Reinauer | 0401bd8 | 2010-01-16 18:31:34 +0000 | [diff] [blame] | 45 | |
| 46 | #endif |