Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /****************************************************************************** |
2 | * | |
793c2388 | 3 | * Name: actbl1.h - Additional ACPI table definitions |
1da177e4 LT |
4 | * |
5 | *****************************************************************************/ | |
6 | ||
7 | /* | |
4a90c7e8 | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
1da177e4 LT |
9 | * All rights reserved. |
10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | |
15 | * notice, this list of conditions, and the following disclaimer, | |
16 | * without modification. | |
17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | |
18 | * substantially similar to the "NO WARRANTY" disclaimer below | |
19 | * ("Disclaimer") and any redistribution must be conditioned upon | |
20 | * including a substantially similar Disclaimer requirement for further | |
21 | * binary redistribution. | |
22 | * 3. Neither the names of the above-listed copyright holders nor the names | |
23 | * of any contributors may be used to endorse or promote products derived | |
24 | * from this software without specific prior written permission. | |
25 | * | |
26 | * Alternatively, this software may be distributed under the terms of the | |
27 | * GNU General Public License ("GPL") version 2 as published by the Free | |
28 | * Software Foundation. | |
29 | * | |
30 | * NO WARRANTY | |
31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | |
34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
41 | * POSSIBILITY OF SUCH DAMAGES. | |
42 | */ | |
43 | ||
44 | #ifndef __ACTBL1_H__ | |
45 | #define __ACTBL1_H__ | |
46 | ||
793c2388 BM |
47 | /******************************************************************************* |
48 | * | |
49 | * Additional ACPI Tables | |
50 | * | |
51 | * These tables are not consumed directly by the ACPICA subsystem, but are | |
52 | * included here to support device drivers and the AML disassembler. | |
53 | * | |
54 | ******************************************************************************/ | |
55 | ||
56 | /* | |
57 | * Values for description table header signatures. Useful because they make | |
58 | * it more difficult to inadvertently type in the wrong signature. | |
59 | */ | |
60 | #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ | |
61 | #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ | |
62 | #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */ | |
63 | #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */ | |
2502fffb | 64 | #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */ |
793c2388 BM |
65 | #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */ |
66 | #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ | |
67 | #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ | |
68 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ | |
69 | #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ | |
70 | #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */ | |
71 | #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ | |
72 | #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ | |
73 | #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */ | |
74 | #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ | |
75 | #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ | |
76 | ||
793c2388 BM |
77 | /* |
78 | * All tables must be byte-packed to match the ACPI specification, since | |
79 | * the tables are provided by the system BIOS. | |
80 | */ | |
1da177e4 LT |
81 | #pragma pack(1) |
82 | ||
83 | /* | |
793c2388 BM |
84 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. |
85 | * This is the only type that is even remotely portable. Anything else is not | |
86 | * portable, so do not use any other bitfield types. | |
1da177e4 | 87 | */ |
793c2388 | 88 | |
f3d2e786 BM |
89 | /* Common Sub-table header (used in MADT, SRAT, etc.) */ |
90 | ||
91 | struct acpi_subtable_header { | |
92 | u8 type; | |
93 | u8 length; | |
94 | }; | |
95 | ||
793c2388 BM |
96 | /******************************************************************************* |
97 | * | |
98 | * ASF - Alert Standard Format table (Signature "ASF!") | |
99 | * | |
100 | ******************************************************************************/ | |
101 | ||
102 | struct acpi_table_asf { | |
f3d2e786 BM |
103 | struct acpi_table_header header; /* Common ACPI table header */ |
104 | }; | |
793c2388 | 105 | |
f3d2e786 | 106 | /* ASF subtable header */ |
793c2388 BM |
107 | |
108 | struct acpi_asf_header { | |
f3d2e786 BM |
109 | u8 type; |
110 | u8 reserved; | |
111 | u16 length; | |
112 | }; | |
793c2388 | 113 | |
f3d2e786 | 114 | /* Values for Type field above */ |
793c2388 | 115 | |
f3d2e786 BM |
116 | enum acpi_asf_type { |
117 | ACPI_ASF_TYPE_INFO = 0, | |
118 | ACPI_ASF_TYPE_ALERT = 1, | |
119 | ACPI_ASF_TYPE_CONTROL = 2, | |
120 | ACPI_ASF_TYPE_BOOT = 3, | |
121 | ACPI_ASF_TYPE_ADDRESS = 4, | |
122 | ACPI_ASF_TYPE_RESERVED = 5 | |
123 | }; | |
1da177e4 | 124 | |
1da177e4 | 125 | /* |
793c2388 | 126 | * ASF subtables |
1da177e4 | 127 | */ |
793c2388 BM |
128 | |
129 | /* 0: ASF Information */ | |
130 | ||
131 | struct acpi_asf_info { | |
f3d2e786 BM |
132 | struct acpi_asf_header header; |
133 | u8 min_reset_value; | |
793c2388 BM |
134 | u8 min_poll_interval; |
135 | u16 system_id; | |
136 | u32 mfg_id; | |
137 | u8 flags; | |
138 | u8 reserved2[3]; | |
139 | }; | |
140 | ||
141 | /* 1: ASF Alerts */ | |
142 | ||
143 | struct acpi_asf_alert { | |
f3d2e786 BM |
144 | struct acpi_asf_header header; |
145 | u8 assert_mask; | |
793c2388 BM |
146 | u8 deassert_mask; |
147 | u8 alerts; | |
148 | u8 data_length; | |
149 | u8 array[1]; | |
150 | }; | |
151 | ||
152 | /* 2: ASF Remote Control */ | |
153 | ||
154 | struct acpi_asf_remote { | |
f3d2e786 BM |
155 | struct acpi_asf_header header; |
156 | u8 controls; | |
793c2388 BM |
157 | u8 data_length; |
158 | u16 reserved2; | |
159 | u8 array[1]; | |
160 | }; | |
161 | ||
162 | /* 3: ASF RMCP Boot Options */ | |
163 | ||
164 | struct acpi_asf_rmcp { | |
f3d2e786 BM |
165 | struct acpi_asf_header header; |
166 | u8 capabilities[7]; | |
793c2388 BM |
167 | u8 completion_code; |
168 | u32 enterprise_id; | |
169 | u8 command; | |
170 | u16 parameter; | |
171 | u16 boot_options; | |
172 | u16 oem_parameters; | |
173 | }; | |
174 | ||
175 | /* 4: ASF Address */ | |
176 | ||
177 | struct acpi_asf_address { | |
f3d2e786 BM |
178 | struct acpi_asf_header header; |
179 | u8 eprom_address; | |
793c2388 BM |
180 | u8 devices; |
181 | u8 smbus_addresses[1]; | |
182 | }; | |
183 | ||
184 | /******************************************************************************* | |
185 | * | |
186 | * BOOT - Simple Boot Flag Table | |
187 | * | |
188 | ******************************************************************************/ | |
189 | ||
190 | struct acpi_table_boot { | |
f3d2e786 BM |
191 | struct acpi_table_header header; /* Common ACPI table header */ |
192 | u8 cmos_index; /* Index in CMOS RAM for the boot register */ | |
793c2388 BM |
193 | u8 reserved[3]; |
194 | }; | |
195 | ||
196 | /******************************************************************************* | |
197 | * | |
198 | * CPEP - Corrected Platform Error Polling table | |
199 | * | |
200 | ******************************************************************************/ | |
201 | ||
202 | struct acpi_table_cpep { | |
f3d2e786 BM |
203 | struct acpi_table_header header; /* Common ACPI table header */ |
204 | u64 reserved; | |
793c2388 BM |
205 | }; |
206 | ||
207 | /* Subtable */ | |
208 | ||
209 | struct acpi_cpep_polling { | |
210 | u8 type; | |
211 | u8 length; | |
f3d2e786 BM |
212 | u8 id; /* Processor ID */ |
213 | u8 eid; /* Processor EID */ | |
214 | u32 interval; /* Polling interval (msec) */ | |
793c2388 BM |
215 | }; |
216 | ||
217 | /******************************************************************************* | |
218 | * | |
219 | * DBGP - Debug Port table | |
220 | * | |
221 | ******************************************************************************/ | |
222 | ||
223 | struct acpi_table_dbgp { | |
f3d2e786 BM |
224 | struct acpi_table_header header; /* Common ACPI table header */ |
225 | u8 type; /* 0=full 16550, 1=subset of 16550 */ | |
793c2388 BM |
226 | u8 reserved[3]; |
227 | struct acpi_generic_address debug_port; | |
228 | }; | |
229 | ||
2502fffb BM |
230 | /******************************************************************************* |
231 | * | |
232 | * DMAR - DMA Remapping table | |
233 | * | |
234 | ******************************************************************************/ | |
235 | ||
236 | struct acpi_table_dmar { | |
237 | struct acpi_table_header header; /* Common ACPI table header */ | |
238 | u8 width; /* Host Address Width */ | |
239 | u8 reserved[11]; | |
240 | }; | |
241 | ||
242 | /* DMAR subtable header */ | |
243 | ||
244 | struct acpi_dmar_header { | |
245 | u16 type; | |
246 | u16 length; | |
247 | u8 flags; | |
248 | u8 reserved[3]; | |
249 | }; | |
250 | ||
251 | /* Values for subtable type in struct acpi_dmar_header */ | |
252 | ||
253 | enum acpi_dmar_type { | |
254 | ACPI_DMAR_TYPE_HARDWARE_UNIT = 0, | |
255 | ACPI_DMAR_TYPE_RESERVED_MEMORY = 1, | |
256 | ACPI_DMAR_TYPE_RESERVED = 2 /* 2 and greater are reserved */ | |
257 | }; | |
258 | ||
259 | struct acpi_dmar_device_scope { | |
260 | u8 entry_type; | |
261 | u8 length; | |
262 | u8 segment; | |
263 | u8 bus; | |
264 | }; | |
265 | ||
266 | /* Values for entry_type in struct acpi_dmar_device_scope */ | |
267 | ||
268 | enum acpi_dmar_scope_type { | |
269 | ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, | |
270 | ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1, | |
271 | ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2, | |
272 | ACPI_DMAR_SCOPE_TYPE_RESERVED = 3 /* 3 and greater are reserved */ | |
273 | }; | |
274 | ||
275 | /* | |
276 | * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header | |
277 | */ | |
278 | ||
279 | /* 0: Hardware Unit Definition */ | |
280 | ||
281 | struct acpi_dmar_hardware_unit { | |
282 | struct acpi_dmar_header header; | |
283 | u64 address; /* Register Base Address */ | |
284 | }; | |
285 | ||
286 | /* Flags */ | |
287 | ||
288 | #define ACPI_DMAR_INCLUDE_ALL (1) | |
289 | ||
290 | /* 1: Reserved Memory Defininition */ | |
291 | ||
292 | struct acpi_dmar_reserved_memory { | |
293 | struct acpi_dmar_header header; | |
294 | u64 address; /* 4_k aligned base address */ | |
295 | u64 end_address; /* 4_k aligned limit address */ | |
296 | }; | |
297 | ||
298 | /* Flags */ | |
299 | ||
300 | #define ACPI_DMAR_ALLOW_ALL (1) | |
301 | ||
793c2388 BM |
302 | /******************************************************************************* |
303 | * | |
304 | * ECDT - Embedded Controller Boot Resources Table | |
305 | * | |
306 | ******************************************************************************/ | |
307 | ||
f3d2e786 BM |
308 | struct acpi_table_ecdt { |
309 | struct acpi_table_header header; /* Common ACPI table header */ | |
310 | struct acpi_generic_address control; /* Address of EC command/status register */ | |
311 | struct acpi_generic_address data; /* Address of EC data register */ | |
793c2388 | 312 | u32 uid; /* Unique ID - must be same as the EC _UID method */ |
f3d2e786 BM |
313 | u8 gpe; /* The GPE for the EC */ |
314 | u8 id[1]; /* Full namepath of the EC in the ACPI namespace */ | |
793c2388 BM |
315 | }; |
316 | ||
317 | /******************************************************************************* | |
318 | * | |
319 | * HPET - High Precision Event Timer table | |
320 | * | |
321 | ******************************************************************************/ | |
322 | ||
f3d2e786 BM |
323 | struct acpi_table_hpet { |
324 | struct acpi_table_header header; /* Common ACPI table header */ | |
325 | u32 id; /* Hardware ID of event timer block */ | |
326 | struct acpi_generic_address address; /* Address of event timer block */ | |
327 | u8 sequence; /* HPET sequence number */ | |
328 | u16 minimum_tick; /* Main counter min tick, periodic mode */ | |
329 | u8 flags; | |
793c2388 BM |
330 | }; |
331 | ||
f3d2e786 BM |
332 | /*! Flags */ |
333 | ||
334 | #define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */ | |
335 | #define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */ | |
336 | #define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */ | |
337 | ||
338 | /*! [End] no source code translation !*/ | |
793c2388 BM |
339 | |
340 | /******************************************************************************* | |
341 | * | |
342 | * MADT - Multiple APIC Description Table | |
343 | * | |
344 | ******************************************************************************/ | |
345 | ||
f3d2e786 BM |
346 | struct acpi_table_madt { |
347 | struct acpi_table_header header; /* Common ACPI table header */ | |
348 | u32 address; /* Physical address of local APIC */ | |
349 | u32 flags; | |
1da177e4 LT |
350 | }; |
351 | ||
f3d2e786 | 352 | /* Flags */ |
793c2388 | 353 | |
f3d2e786 | 354 | #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */ |
793c2388 | 355 | |
f3d2e786 | 356 | /* Values for PCATCompat flag */ |
793c2388 | 357 | |
f3d2e786 BM |
358 | #define ACPI_MADT_DUAL_PIC 0 |
359 | #define ACPI_MADT_MULTIPLE_APIC 1 | |
793c2388 | 360 | |
f3d2e786 | 361 | /* Values for subtable type in struct acpi_subtable_header */ |
793c2388 | 362 | |
f3d2e786 BM |
363 | enum acpi_madt_type { |
364 | ACPI_MADT_TYPE_LOCAL_APIC = 0, | |
365 | ACPI_MADT_TYPE_IO_APIC = 1, | |
366 | ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2, | |
367 | ACPI_MADT_TYPE_NMI_SOURCE = 3, | |
368 | ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4, | |
369 | ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5, | |
370 | ACPI_MADT_TYPE_IO_SAPIC = 6, | |
371 | ACPI_MADT_TYPE_LOCAL_SAPIC = 7, | |
372 | ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, | |
373 | ACPI_MADT_TYPE_RESERVED = 9 /* 9 and greater are reserved */ | |
374 | }; | |
793c2388 | 375 | |
1da177e4 | 376 | /* |
f3d2e786 | 377 | * MADT Sub-tables, correspond to Type in struct acpi_subtable_header |
1da177e4 | 378 | */ |
793c2388 | 379 | |
f3d2e786 | 380 | /* 0: Processor Local APIC */ |
793c2388 | 381 | |
f3d2e786 BM |
382 | struct acpi_madt_local_apic { |
383 | struct acpi_subtable_header header; | |
384 | u8 processor_id; /* ACPI processor id */ | |
385 | u8 id; /* Processor's local APIC id */ | |
386 | u32 lapic_flags; | |
387 | }; | |
793c2388 BM |
388 | |
389 | /* 1: IO APIC */ | |
390 | ||
f3d2e786 BM |
391 | struct acpi_madt_io_apic { |
392 | struct acpi_subtable_header header; | |
393 | u8 id; /* I/O APIC ID */ | |
793c2388 BM |
394 | u8 reserved; /* Reserved - must be zero */ |
395 | u32 address; /* APIC physical address */ | |
f3d2e786 | 396 | u32 global_irq_base; /* Global system interrupt where INTI lines start */ |
793c2388 BM |
397 | }; |
398 | ||
399 | /* 2: Interrupt Override */ | |
400 | ||
f3d2e786 BM |
401 | struct acpi_madt_interrupt_override { |
402 | struct acpi_subtable_header header; | |
403 | u8 bus; /* 0 - ISA */ | |
404 | u8 source_irq; /* Interrupt source (IRQ) */ | |
405 | u32 global_irq; /* Global system interrupt */ | |
406 | u16 inti_flags; | |
407 | }; | |
793c2388 | 408 | |
f3d2e786 | 409 | /* 3: NMI Source */ |
793c2388 | 410 | |
f3d2e786 BM |
411 | struct acpi_madt_nmi_source { |
412 | struct acpi_subtable_header header; | |
413 | u16 inti_flags; | |
414 | u32 global_irq; /* Global system interrupt */ | |
793c2388 BM |
415 | }; |
416 | ||
417 | /* 4: Local APIC NMI */ | |
418 | ||
f3d2e786 BM |
419 | struct acpi_madt_local_apic_nmi { |
420 | struct acpi_subtable_header header; | |
421 | u8 processor_id; /* ACPI processor id */ | |
422 | u16 inti_flags; | |
423 | u8 lint; /* LINTn to which NMI is connected */ | |
793c2388 BM |
424 | }; |
425 | ||
426 | /* 5: Address Override */ | |
427 | ||
f3d2e786 BM |
428 | struct acpi_madt_local_apic_override { |
429 | struct acpi_subtable_header header; | |
430 | u16 reserved; /* Reserved, must be zero */ | |
793c2388 BM |
431 | u64 address; /* APIC physical address */ |
432 | }; | |
433 | ||
434 | /* 6: I/O Sapic */ | |
435 | ||
f3d2e786 BM |
436 | struct acpi_madt_io_sapic { |
437 | struct acpi_subtable_header header; | |
438 | u8 id; /* I/O SAPIC ID */ | |
793c2388 | 439 | u8 reserved; /* Reserved, must be zero */ |
f3d2e786 | 440 | u32 global_irq_base; /* Global interrupt for SAPIC start */ |
793c2388 BM |
441 | u64 address; /* SAPIC physical address */ |
442 | }; | |
443 | ||
444 | /* 7: Local Sapic */ | |
445 | ||
f3d2e786 BM |
446 | struct acpi_madt_local_sapic { |
447 | struct acpi_subtable_header header; | |
448 | u8 processor_id; /* ACPI processor id */ | |
449 | u8 id; /* SAPIC ID */ | |
450 | u8 eid; /* SAPIC EID */ | |
793c2388 | 451 | u8 reserved[3]; /* Reserved, must be zero */ |
f3d2e786 BM |
452 | u32 lapic_flags; |
453 | u32 uid; /* Numeric UID - ACPI 3.0 */ | |
454 | char uid_string[1]; /* String UID - ACPI 3.0 */ | |
793c2388 BM |
455 | }; |
456 | ||
457 | /* 8: Platform Interrupt Source */ | |
458 | ||
f3d2e786 BM |
459 | struct acpi_madt_interrupt_source { |
460 | struct acpi_subtable_header header; | |
461 | u16 inti_flags; | |
462 | u8 type; /* 1=PMI, 2=INIT, 3=corrected */ | |
463 | u8 id; /* Processor ID */ | |
464 | u8 eid; /* Processor EID */ | |
793c2388 | 465 | u8 io_sapic_vector; /* Vector value for PMI interrupts */ |
f3d2e786 | 466 | u32 global_irq; /* Global system interrupt */ |
793c2388 BM |
467 | u32 flags; /* Interrupt Source Flags */ |
468 | }; | |
469 | ||
f3d2e786 BM |
470 | /* Flags field above */ |
471 | ||
472 | #define ACPI_MADT_CPEI_OVERRIDE (1) | |
473 | ||
474 | /* | |
475 | * Common flags fields for MADT subtables | |
476 | */ | |
477 | ||
478 | /* MADT Local APIC flags (lapic_flags) */ | |
479 | ||
480 | #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ | |
481 | ||
482 | /* MADT MPS INTI flags (inti_flags) */ | |
483 | ||
484 | #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */ | |
485 | #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */ | |
486 | ||
487 | /* Values for MPS INTI flags */ | |
488 | ||
489 | #define ACPI_MADT_POLARITY_CONFORMS 0 | |
490 | #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1 | |
491 | #define ACPI_MADT_POLARITY_RESERVED 2 | |
492 | #define ACPI_MADT_POLARITY_ACTIVE_LOW 3 | |
493 | ||
494 | #define ACPI_MADT_TRIGGER_CONFORMS (0) | |
495 | #define ACPI_MADT_TRIGGER_EDGE (1<<2) | |
496 | #define ACPI_MADT_TRIGGER_RESERVED (2<<2) | |
497 | #define ACPI_MADT_TRIGGER_LEVEL (3<<2) | |
498 | ||
793c2388 BM |
499 | /******************************************************************************* |
500 | * | |
501 | * MCFG - PCI Memory Mapped Configuration table and sub-table | |
502 | * | |
503 | ******************************************************************************/ | |
504 | ||
505 | struct acpi_table_mcfg { | |
f3d2e786 BM |
506 | struct acpi_table_header header; /* Common ACPI table header */ |
507 | u8 reserved[8]; | |
793c2388 BM |
508 | }; |
509 | ||
f3d2e786 BM |
510 | /* Subtable */ |
511 | ||
793c2388 | 512 | struct acpi_mcfg_allocation { |
f3d2e786 | 513 | u64 address; /* Base address, processor-relative */ |
793c2388 BM |
514 | u16 pci_segment; /* PCI segment group number */ |
515 | u8 start_bus_number; /* Starting PCI Bus number */ | |
516 | u8 end_bus_number; /* Final PCI Bus number */ | |
517 | u32 reserved; | |
518 | }; | |
793c2388 BM |
519 | |
520 | /******************************************************************************* | |
521 | * | |
522 | * SBST - Smart Battery Specification Table | |
523 | * | |
524 | ******************************************************************************/ | |
525 | ||
f3d2e786 BM |
526 | struct acpi_table_sbst { |
527 | struct acpi_table_header header; /* Common ACPI table header */ | |
528 | u32 warning_level; | |
793c2388 BM |
529 | u32 low_level; |
530 | u32 critical_level; | |
531 | }; | |
532 | ||
533 | /******************************************************************************* | |
534 | * | |
535 | * SLIT - System Locality Distance Information Table | |
536 | * | |
537 | ******************************************************************************/ | |
538 | ||
f3d2e786 BM |
539 | struct acpi_table_slit { |
540 | struct acpi_table_header header; /* Common ACPI table header */ | |
541 | u64 locality_count; | |
542 | u8 entry[1]; /* Real size = localities^2 */ | |
793c2388 BM |
543 | }; |
544 | ||
545 | /******************************************************************************* | |
546 | * | |
547 | * SPCR - Serial Port Console Redirection table | |
548 | * | |
549 | ******************************************************************************/ | |
550 | ||
551 | struct acpi_table_spcr { | |
f3d2e786 BM |
552 | struct acpi_table_header header; /* Common ACPI table header */ |
553 | u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ | |
793c2388 BM |
554 | u8 reserved[3]; |
555 | struct acpi_generic_address serial_port; | |
556 | u8 interrupt_type; | |
557 | u8 pc_interrupt; | |
558 | u32 interrupt; | |
559 | u8 baud_rate; | |
560 | u8 parity; | |
561 | u8 stop_bits; | |
562 | u8 flow_control; | |
563 | u8 terminal_type; | |
f3d2e786 | 564 | u8 reserved1; |
793c2388 BM |
565 | u16 pci_device_id; |
566 | u16 pci_vendor_id; | |
567 | u8 pci_bus; | |
568 | u8 pci_device; | |
569 | u8 pci_function; | |
570 | u32 pci_flags; | |
571 | u8 pci_segment; | |
f3d2e786 | 572 | u32 reserved2; |
793c2388 BM |
573 | }; |
574 | ||
575 | /******************************************************************************* | |
576 | * | |
577 | * SPMI - Server Platform Management Interface table | |
578 | * | |
579 | ******************************************************************************/ | |
580 | ||
581 | struct acpi_table_spmi { | |
f3d2e786 BM |
582 | struct acpi_table_header header; /* Common ACPI table header */ |
583 | u8 reserved; | |
793c2388 BM |
584 | u8 interface_type; |
585 | u16 spec_revision; /* Version of IPMI */ | |
586 | u8 interrupt_type; | |
587 | u8 gpe_number; /* GPE assigned */ | |
f3d2e786 | 588 | u8 reserved1; |
793c2388 BM |
589 | u8 pci_device_flag; |
590 | u32 interrupt; | |
591 | struct acpi_generic_address ipmi_register; | |
592 | u8 pci_segment; | |
593 | u8 pci_bus; | |
594 | u8 pci_device; | |
595 | u8 pci_function; | |
596 | }; | |
597 | ||
598 | /******************************************************************************* | |
599 | * | |
600 | * SRAT - System Resource Affinity Table | |
601 | * | |
602 | ******************************************************************************/ | |
603 | ||
f3d2e786 BM |
604 | struct acpi_table_srat { |
605 | struct acpi_table_header header; /* Common ACPI table header */ | |
606 | u32 table_revision; /* Must be value '1' */ | |
607 | u64 reserved; /* Reserved, must be zero */ | |
793c2388 BM |
608 | }; |
609 | ||
f3d2e786 | 610 | /* Values for subtable type in struct acpi_subtable_header */ |
793c2388 | 611 | |
f3d2e786 BM |
612 | enum acpi_srat_type { |
613 | ACPI_SRAT_TYPE_CPU_AFFINITY = 0, | |
614 | ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, | |
615 | ACPI_SRAT_TYPE_RESERVED = 2 | |
616 | }; | |
793c2388 BM |
617 | |
618 | /* SRAT sub-tables */ | |
619 | ||
f3d2e786 BM |
620 | struct acpi_srat_cpu_affinity { |
621 | struct acpi_subtable_header header; | |
622 | u8 proximity_domain_lo; | |
793c2388 | 623 | u8 apic_id; |
f3d2e786 | 624 | u32 flags; |
793c2388 BM |
625 | u8 local_sapic_eid; |
626 | u8 proximity_domain_hi[3]; | |
f3d2e786 | 627 | u32 reserved; /* Reserved, must be zero */ |
793c2388 BM |
628 | }; |
629 | ||
f3d2e786 BM |
630 | /* Flags */ |
631 | ||
632 | #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ | |
633 | ||
634 | struct acpi_srat_mem_affinity { | |
635 | struct acpi_subtable_header header; | |
636 | u32 proximity_domain; | |
637 | u16 reserved; /* Reserved, must be zero */ | |
793c2388 | 638 | u64 base_address; |
f3d2e786 BM |
639 | u64 length; |
640 | u32 memory_type; /* See acpi_address_range_id */ | |
641 | u32 flags; | |
642 | u64 reserved1; /* Reserved, must be zero */ | |
643 | }; | |
644 | ||
645 | /* Flags */ | |
f9f4601f | 646 | |
f3d2e786 BM |
647 | #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */ |
648 | #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ | |
649 | #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */ | |
f9f4601f | 650 | |
f3d2e786 | 651 | /* Memory types */ |
793c2388 | 652 | |
f3d2e786 BM |
653 | enum acpi_address_range_id { |
654 | ACPI_ADDRESS_RANGE_MEMORY = 1, | |
655 | ACPI_ADDRESS_RANGE_RESERVED = 2, | |
656 | ACPI_ADDRESS_RANGE_ACPI = 3, | |
657 | ACPI_ADDRESS_RANGE_NVS = 4, | |
658 | ACPI_ADDRESS_RANGE_COUNT = 5 | |
793c2388 BM |
659 | }; |
660 | ||
661 | /******************************************************************************* | |
662 | * | |
663 | * TCPA - Trusted Computing Platform Alliance table | |
664 | * | |
665 | ******************************************************************************/ | |
666 | ||
667 | struct acpi_table_tcpa { | |
f3d2e786 BM |
668 | struct acpi_table_header header; /* Common ACPI table header */ |
669 | u16 reserved; | |
793c2388 BM |
670 | u32 max_log_length; /* Maximum length for the event log area */ |
671 | u64 log_address; /* Address of the event log area */ | |
1da177e4 LT |
672 | }; |
673 | ||
793c2388 BM |
674 | /******************************************************************************* |
675 | * | |
676 | * WDRT - Watchdog Resource Table | |
677 | * | |
678 | ******************************************************************************/ | |
679 | ||
680 | struct acpi_table_wdrt { | |
f3d2e786 BM |
681 | struct acpi_table_header header; /* Common ACPI table header */ |
682 | u32 header_length; /* Watchdog Header Length */ | |
793c2388 BM |
683 | u8 pci_segment; /* PCI Segment number */ |
684 | u8 pci_bus; /* PCI Bus number */ | |
685 | u8 pci_device; /* PCI Device number */ | |
686 | u8 pci_function; /* PCI Function number */ | |
687 | u32 timer_period; /* Period of one timer count (msec) */ | |
688 | u32 max_count; /* Maximum counter value supported */ | |
689 | u32 min_count; /* Minimum counter value */ | |
690 | u8 flags; | |
691 | u8 reserved[3]; | |
692 | u32 entries; /* Number of watchdog entries that follow */ | |
693 | }; | |
694 | ||
f3d2e786 BM |
695 | /* Flags */ |
696 | ||
697 | #define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */ | |
793c2388 BM |
698 | |
699 | /* Reset to default packing */ | |
700 | ||
1da177e4 LT |
701 | #pragma pack() |
702 | ||
4be44fcd | 703 | #endif /* __ACTBL1_H__ */ |