• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   I/O APIC Register Definitions from 82093AA I/O Advanced Programmable Interrupt
3   Controller (IOAPIC), 1996.
4 
5   Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
6   This program and the accompanying materials
7   are licensed and made available under the terms and conditions of the BSD License
8   which accompanies this distribution.  The full text of the license may be found at
9   http://opensource.org/licenses/bsd-license.php
10 
11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 
14 **/
15 
16 #ifndef __IO_APIC_H__
17 #define __IO_APIC_H__
18 
19 ///
20 /// I/O APIC Register Offsets
21 ///
22 #define IOAPIC_INDEX_OFFSET  0x00
23 #define IOAPIC_DATA_OFFSET   0x10
24 
25 ///
26 /// I/O APIC Indirect Register Indexes
27 ///
28 #define IO_APIC_IDENTIFICATION_REGISTER_INDEX  0x00
29 #define IO_APIC_VERSION_REGISTER_INDEX         0x01
30 #define IO_APIC_REDIRECTION_TABLE_ENTRY_INDEX  0x10
31 
32 ///
33 /// I/O APIC Interrupt Deliver Modes
34 ///
35 #define IO_APIC_DELIVERY_MODE_FIXED            0
36 #define IO_APIC_DELIVERY_MODE_LOWEST_PRIORITY  1
37 #define IO_APIC_DELIVERY_MODE_SMI              2
38 #define IO_APIC_DELIVERY_MODE_NMI              4
39 #define IO_APIC_DELIVERY_MODE_INIT             5
40 #define IO_APIC_DELIVERY_MODE_EXTINT           7
41 
42 #pragma pack(1)
43 
44 typedef union {
45   struct {
46     UINT32  Reserved0:24;
47     UINT32  Identification:4;
48     UINT32  Reserved1:4;
49   } Bits;
50   UINT32  Uint32;
51 } IO_APIC_IDENTIFICATION_REGISTER;
52 
53 typedef union {
54   struct {
55     UINT32  Version:8;
56     UINT32  Reserved0:8;
57     UINT32  MaximumRedirectionEntry:8;
58     UINT32  Reserved1:8;
59   } Bits;
60   UINT32  Uint32;
61 } IO_APIC_VERSION_REGISTER;
62 
63 typedef union {
64   struct {
65     UINT32  Vector:          8;
66     UINT32  DeliveryMode:    3;
67     UINT32  DestinationMode: 1;
68     UINT32  DeliveryStatus:  1;
69     UINT32  Polarity:        1;
70     UINT32  RemoteIRR:       1;
71     UINT32  TriggerMode:     1;
72     UINT32  Mask:            1;
73     UINT32  Reserved0:       15;
74     UINT32  Reserved1:       24;
75     UINT32  DestinationID:   8;
76   } Bits;
77   struct {
78     UINT32  Low;
79     UINT32  High;
80   } Uint32;
81   UINT64  Uint64;
82 } IO_APIC_REDIRECTION_TABLE_ENTRY;
83 
84 #pragma pack()
85 
86 #endif
87