1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 #ifndef _MACHINE_MP_H
35 #define _MACHINE_MP_H
36
37
38
39
40
41
42
43
44
45 struct mp_float {
46 u_int8_t signature[4];
47 #define MPF_SIGNATURE "_MP_"
48 u_int32_t pointer;
49 u_int8_t length;
50 u_int8_t revision;
51 u_int8_t checksum;
52 u_int8_t feature1;
53 #define MP_CONF_EXTENDED 0
54 #define MP_CONF_2_ISA 1
55 #define MP_CONF_2_EISA_NO_8 2
56 #define MP_CONF_2_EISA 3
57 #define MP_CONF_2_MCA 4
58 #define MP_CONF_2_ISA_PCI 5
59 #define MP_CONF_2_EISA_PCI 6
60 #define MP_CONF_2_MCA_PCI 7
61 u_int8_t feature2;
62 #define MP_IMCR 0x80
63 u_int8_t feature3;
64 u_int8_t feature4;
65 u_int8_t feature5;
66 };
67
68
69
70
71 struct mp_conf {
72 u_int8_t signature[4];
73 #define MPC_SIGNATURE "PCMP"
74 u_int16_t length;
75 u_int8_t revision;
76 u_int8_t checksum;
77 u_int8_t oem[8];
78 u_int8_t product[12];
79 u_int32_t oem_pointer;
80 u_int16_t oem_length;
81 u_int16_t entry_count;
82 u_int32_t local_apic;
83 u_int16_t ext_length;
84 u_int8_t et_checksum;
85 u_int8_t reserved;
86 };
87
88
89
90
91 struct mp_proc {
92 u_int8_t type;
93 #define MP_PROCESSOR 0
94 u_int8_t local_apic;
95 u_int8_t apic_version;
96 u_int8_t flags;
97 #define MP_ENABLE 0x01
98 #define MP_BOOTCPU 0x02
99 u_int32_t cpu_signature;
100 #define MP_STEPPING 0x0000000F
101 #define MP_MODEL 0x000000F0
102 #define MP_FAMILY 0x00000F00
103 u_int32_t feature_flags;
104 #define MP_FP 0x00000001
105 #define MP_MCE 0x00000080
106 #define MP_CX8 0x00000100
107 #define MP_APIC 0x00000200
108 u_int32_t reserved1;
109 u_int32_t reserved2;
110 };
111
112
113
114
115 struct mp_bus {
116 u_int8_t type;
117 #define MP_BUS 1
118 u_int8_t bus_id;
119 u_int8_t bustype[6] __attribute((packed));
120 #define MP_BUS_CBUS "CBUS "
121 #define MP_BUS_CBUSII "CBUSII"
122 #define MP_BUS_EISA "EISA "
123 #define MP_BUS_FUTURE "FUTURE"
124 #define MP_BUS_INTERN "INTERN"
125 #define MP_BUS_ISA "ISA "
126 #define MP_BUS_MBI "MBI "
127 #define MP_BUS_MBII "MBII "
128 #define MP_BUS_MCA "MCA "
129 #define MP_BUS_MPI "MPI "
130 #define MP_BUS_MPSA "MPSA "
131 #define MP_BUS_NUBUS "NUBUS "
132 #define MP_BUS_PCI "PCI "
133 #define MP_BUS_PCCARD "PCMCIA"
134 #define MP_BUS_TC "TC "
135 #define MP_BUS_VLB "VL "
136 #define MP_BUS_VME "VME "
137 #define MP_BUS_XPRESS "XPRESS"
138 };
139
140
141
142
143 struct mp_apic {
144 u_int8_t type;
145 #define MP_IOAPIC 2
146 u_int8_t apic_id;
147 u_int8_t apic_version;
148 u_int8_t apic_flags;
149 #define MP_APIC_ENABLE 0x80
150 u_int32_t apic_address;
151 };
152
153
154
155
156
157 struct mp_irq {
158 u_int8_t type;
159 #define MP_INTSRC 3
160 #define MP_LOCINTSRC 4
161 u_int8_t irqtype;
162 #define MP_INT_NORMAL 0
163 #define MP_INT_NMI 1
164 #define MP_INT_SMI 2
165 #define MP_INT_EXT 3
166 u_int16_t irqflags;
167 u_int8_t bus_id;
168 u_int8_t source_irq;
169 u_int8_t destination_apic;
170 #define MP_ALL_APIC 0xFF
171 u_int8_t apic_intr;
172 };
173
174
175
176
177 struct mp_map {
178 u_int8_t type;
179 #define MP_SYSMAP 128
180 u_int8_t length;
181 u_int8_t bus;
182 u_int8_t address_type;
183 #define MP_ADDR_IO 0
184 #define MP_ADDR_MEM 1
185 #define MP_ADDR_PRE 2
186 u_int64_t address_base;
187 u_int64_t address_length;
188 };
189
190
191
192
193 struct mp_bushier {
194 u_int8_t type;
195 #define MP_BUSHIER 129
196 u_int8_t length;
197 u_int8_t bus_id;
198 u_int8_t bus_info;
199 #define MP_BUS_SUB 0x01
200 u_int8_t parent;
201 u_int8_t reserved1;
202 u_int16_t reserved2;
203 };
204
205
206
207
208 struct mp_buscompat {
209 u_int8_t type;
210 #define MP_BUSCOMPAT 130
211 u_int8_t length;
212 u_int8_t bus_id;
213 u_int8_t modifier;
214 #define MP_COMPAT_SUB 0x01
215 u_int32_t range;
216 };
217
218 #ifdef _KERNEL
219 extern int napics;
220 #endif
221
222 #endif