FreeBSD/Linux Kernel Cross Reference
sys/dev/acpica/madt.h
1 /*-
2 * Copyright (c) 2001 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: releng/5.2/sys/dev/acpica/madt.h 119946 2003-09-10 06:32:27Z jhb $
27 */
28
29 #ifndef _MADT_H_
30 #define _MADT_H_
31
32 #pragma pack(1)
33
34 #define APIC_INTERRUPT_SOURCE_OVERRIDE 2
35 #define APIC_NMI 3
36 #define APIC_LOCAL_APIC_NMI 4
37 #define APIC_LOCAL_APIC_OVERRIDE 5
38 #define APIC_IO_SAPIC 6
39 #define APIC_LOCAL_SAPIC 7
40 #define APIC_PLATFORM_INTERRUPT 8
41
42 #define APIC_POLARITY_CONFORM 0
43 #define APIC_POLARITY_ACTIVEHI 1
44 #define APIC_POLARITY_ACTIVELO 3
45 #define APIC_TRIGGER_CONFORM 0
46 #define APIC_TRIGGER_EDGE 1
47 #define APIC_TRIGGER_LEVEL 3
48
49 typedef struct /* Interrupt Source Override */
50 {
51 APIC_HEADER Header;
52 UINT8 Bus;
53 UINT8 Source;
54 UINT32 GlobalSystemInterrupt;
55 UINT16 Polarity : 2; /* Polarity of input signal */
56 UINT16 TriggerMode: 2; /* Trigger mode of input signal */
57 UINT16 Reserved1 : 12;
58 } INTERRUPT_SOURCE_OVERRIDE;
59
60 typedef struct /* NMI */
61 {
62 APIC_HEADER Header;
63 UINT16 Polarity : 2; /* Polarity of input signal */
64 UINT16 TriggerMode: 2; /* Trigger mode of input signal */
65 UINT16 Reserved1 : 12;
66 UINT32 GlobalSystemInterrupt;
67 } NMI;
68
69 typedef struct /* LOCAL APIC NMI */
70 {
71 APIC_HEADER Header;
72 UINT8 ProcessorApicId; /* ACPI processor id */
73 UINT16 Polarity : 2; /* Polarity of input signal */
74 UINT16 TriggerMode: 2; /* Trigger mode of input signal */
75 UINT16 Reserved1 : 12;
76 UINT8 LINTPin;
77 } LAPIC_NMI;
78
79 typedef struct /* LOCAL APIC OVERRIDE */
80 {
81 APIC_HEADER Header;
82 UINT16 Reserved;
83 UINT64 LocalApicAddress;
84 } LAPIC_OVERRIDE;
85
86 typedef struct /* IO SAPIC */
87 {
88 APIC_HEADER Header;
89 UINT8 IoSapicId; /* I/O SAPIC ID */
90 UINT8 Reserved; /* reserved - must be zero */
91 UINT32 Vector; /* interrupt base */
92 UINT64 IoSapicAddress; /* SAPIC's physical address */
93 } IO_SAPIC;
94
95 typedef struct /* LOCAL SAPIC */
96 {
97 APIC_HEADER Header;
98 UINT8 ProcessorId; /* ACPI processor id */
99 UINT8 LocalSapicId; /* Processor local SAPIC id */
100 UINT8 LocalSapicEid; /* Processor local SAPIC eid */
101 UINT8 Reserved[3];
102 UINT32 ProcessorEnabled: 1;
103 UINT32 FlagsReserved: 31;
104 } LOCAL_SAPIC;
105
106 typedef struct /* PLATFORM INTERRUPT SOURCE */
107 {
108 APIC_HEADER Header;
109 UINT16 Polarity : 2; /* Polarity of input signal */
110 UINT16 TriggerMode: 2; /* Trigger mode of input signal */
111 UINT16 Reserved1 : 12;
112 UINT8 InterruptType; /* 1-PMI, 2-INIT, 3-Error */
113 UINT8 ProcessorId; /* Processor ID of destination */
114 UINT8 ProcessorEid; /* Processor EID of destination */
115 UINT8 IoSapicVector; /* Value for redirection table */
116 UINT32 GlobalSystemInterrupt; /* Global System Interrupt */
117 UINT32 Reserved2;
118 } PLATFORM_INTERRUPT_SOURCE;
119
120 #pragma pack()
121
122 #endif /* !_MADT_H_ */
Cache object: ffb29a26ae1c1e8d6ebb485eabe505a9
|