1 | /* $Id: DevApic.h 42526 2012-08-02 10:31:28Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * Advanced Programmable Interrupt Controller (APIC) Device Definitions.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2012 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | * --------------------------------------------------------------------
|
---|
17 | *
|
---|
18 | * This code is based on:
|
---|
19 | *
|
---|
20 | * apic.c revision 1.5 @@OSETODO
|
---|
21 | *
|
---|
22 | * APIC support
|
---|
23 | *
|
---|
24 | * Copyright (c) 2004-2005 Fabrice Bellard
|
---|
25 | *
|
---|
26 | * This library is free software; you can redistribute it and/or
|
---|
27 | * modify it under the terms of the GNU Lesser General Public
|
---|
28 | * License as published by the Free Software Foundation; either
|
---|
29 | * version 2 of the License, or (at your option) any later version.
|
---|
30 | *
|
---|
31 | * This library is distributed in the hope that it will be useful,
|
---|
32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
34 | * Lesser General Public License for more details.
|
---|
35 | *
|
---|
36 | * You should have received a copy of the GNU Lesser General Public
|
---|
37 | * License along with this library; if not, write to the Free Software
|
---|
38 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
39 | */
|
---|
40 |
|
---|
41 | #ifndef ___PC_DevApic_h
|
---|
42 | #define ___PC_DevApic_h
|
---|
43 |
|
---|
44 | /* APIC Local Vector Table */
|
---|
45 | #define APIC_LVT_TIMER 0
|
---|
46 | #define APIC_LVT_THERMAL 1
|
---|
47 | #define APIC_LVT_PERFORM 2
|
---|
48 | #define APIC_LVT_LINT0 3
|
---|
49 | #define APIC_LVT_LINT1 4
|
---|
50 | #define APIC_LVT_ERROR 5
|
---|
51 | #define APIC_LVT_NB 6
|
---|
52 |
|
---|
53 | /* APIC delivery modes */
|
---|
54 | #define APIC_DM_FIXED 0
|
---|
55 | #define APIC_DM_LOWPRI 1
|
---|
56 | #define APIC_DM_SMI 2
|
---|
57 | #define APIC_DM_NMI 4
|
---|
58 | #define APIC_DM_INIT 5
|
---|
59 | #define APIC_DM_SIPI 6
|
---|
60 | #define APIC_DM_EXTINT 7
|
---|
61 |
|
---|
62 | /* APIC destination mode */
|
---|
63 | #define APIC_DESTMODE_FLAT 0xf
|
---|
64 | #define APIC_DESTMODE_CLUSTER 0x0
|
---|
65 |
|
---|
66 | #define APIC_TRIGGER_EDGE 0
|
---|
67 | #define APIC_TRIGGER_LEVEL 1
|
---|
68 |
|
---|
69 | #define APIC_LVT_TIMER_PERIODIC (1<<17)
|
---|
70 | #define APIC_LVT_MASKED (1<<16)
|
---|
71 | #define APIC_LVT_LEVEL_TRIGGER (1<<15)
|
---|
72 | #define APIC_LVT_REMOTE_IRR (1<<14)
|
---|
73 | #define APIC_INPUT_POLARITY (1<<13)
|
---|
74 | #define APIC_SEND_PENDING (1<<12)
|
---|
75 |
|
---|
76 | #endif
|
---|
77 |
|
---|