Commit | Line | Data |
---|---|---|
a8357b0c BM |
1 | /****************************************************************************** |
2 | * | |
3 | * Name: actbl2.h - ACPI Specification Revision 2.0 Tables | |
4 | * | |
5 | *****************************************************************************/ | |
6 | ||
7 | /* | |
8 | * Copyright (C) 2000 - 2010, Intel Corp. | |
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 | ||
b24aad44 BM |
44 | #ifndef __ACTBL2_H__ |
45 | #define __ACTBL2_H__ | |
46 | ||
47 | /******************************************************************************* | |
48 | * | |
49 | * Additional ACPI Tables (2) | |
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 | * The tables in this file are defined by third-party specifications, and are | |
55 | * not defined directly by the ACPI specification itself. | |
56 | * | |
57 | ******************************************************************************/ | |
58 | ||
59 | /* | |
6e2d5ebd BM |
60 | * Values for description table header signatures for tables defined in this |
61 | * file. Useful because they make it more difficult to inadvertently type in | |
62 | * the wrong signature. | |
b24aad44 BM |
63 | */ |
64 | #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ | |
65 | #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ | |
66 | #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */ | |
67 | #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */ | |
68 | #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ | |
69 | #define ACPI_SIG_IBFT "IBFT" /* i_sCSI Boot Firmware Table */ | |
6e2d5ebd | 70 | #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ |
b24aad44 | 71 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ |
0e264f0b | 72 | #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ |
b24aad44 BM |
73 | #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ |
74 | #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ | |
75 | #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ | |
76 | #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ | |
77 | #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ | |
6e2d5ebd | 78 | #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ |
b24aad44 BM |
79 | #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ |
80 | #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ | |
81 | ||
4461cf54 BM |
82 | #ifdef ACPI_UNDEFINED_TABLES |
83 | /* | |
84 | * These tables have been seen in the field, but no definition has been found | |
85 | */ | |
86 | #define ACPI_SIG_ATKG "ATKG" | |
87 | #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */ | |
88 | #define ACPI_SIG_IEIT "IEIT" | |
89 | #endif | |
90 | ||
b24aad44 BM |
91 | /* |
92 | * All tables must be byte-packed to match the ACPI specification, since | |
93 | * the tables are provided by the system BIOS. | |
94 | */ | |
95 | #pragma pack(1) | |
96 | ||
97 | /* | |
98 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. | |
99 | * This is the only type that is even remotely portable. Anything else is not | |
100 | * portable, so do not use any other bitfield types. | |
101 | */ | |
102 | ||
103 | /******************************************************************************* | |
104 | * | |
105 | * ASF - Alert Standard Format table (Signature "ASF!") | |
6e2d5ebd | 106 | * Revision 0x10 |
b24aad44 BM |
107 | * |
108 | * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003 | |
109 | * | |
110 | ******************************************************************************/ | |
111 | ||
112 | struct acpi_table_asf { | |
113 | struct acpi_table_header header; /* Common ACPI table header */ | |
114 | }; | |
115 | ||
116 | /* ASF subtable header */ | |
117 | ||
118 | struct acpi_asf_header { | |
119 | u8 type; | |
120 | u8 reserved; | |
121 | u16 length; | |
122 | }; | |
123 | ||
124 | /* Values for Type field above */ | |
125 | ||
126 | enum acpi_asf_type { | |
127 | ACPI_ASF_TYPE_INFO = 0, | |
128 | ACPI_ASF_TYPE_ALERT = 1, | |
129 | ACPI_ASF_TYPE_CONTROL = 2, | |
130 | ACPI_ASF_TYPE_BOOT = 3, | |
131 | ACPI_ASF_TYPE_ADDRESS = 4, | |
132 | ACPI_ASF_TYPE_RESERVED = 5 | |
133 | }; | |
134 | ||
135 | /* | |
136 | * ASF subtables | |
137 | */ | |
138 | ||
139 | /* 0: ASF Information */ | |
140 | ||
141 | struct acpi_asf_info { | |
142 | struct acpi_asf_header header; | |
143 | u8 min_reset_value; | |
144 | u8 min_poll_interval; | |
145 | u16 system_id; | |
146 | u32 mfg_id; | |
147 | u8 flags; | |
148 | u8 reserved2[3]; | |
149 | }; | |
150 | ||
6e2d5ebd BM |
151 | /* Masks for Flags field above */ |
152 | ||
153 | #define ACPI_ASF_SMBUS_PROTOCOLS (1) | |
154 | ||
b24aad44 BM |
155 | /* 1: ASF Alerts */ |
156 | ||
157 | struct acpi_asf_alert { | |
158 | struct acpi_asf_header header; | |
159 | u8 assert_mask; | |
160 | u8 deassert_mask; | |
161 | u8 alerts; | |
162 | u8 data_length; | |
163 | }; | |
164 | ||
165 | struct acpi_asf_alert_data { | |
166 | u8 address; | |
167 | u8 command; | |
168 | u8 mask; | |
169 | u8 value; | |
170 | u8 sensor_type; | |
171 | u8 type; | |
172 | u8 offset; | |
173 | u8 source_type; | |
174 | u8 severity; | |
175 | u8 sensor_number; | |
176 | u8 entity; | |
177 | u8 instance; | |
178 | }; | |
179 | ||
180 | /* 2: ASF Remote Control */ | |
181 | ||
182 | struct acpi_asf_remote { | |
183 | struct acpi_asf_header header; | |
184 | u8 controls; | |
185 | u8 data_length; | |
186 | u16 reserved2; | |
187 | }; | |
188 | ||
189 | struct acpi_asf_control_data { | |
190 | u8 function; | |
191 | u8 address; | |
192 | u8 command; | |
193 | u8 value; | |
194 | }; | |
195 | ||
196 | /* 3: ASF RMCP Boot Options */ | |
197 | ||
198 | struct acpi_asf_rmcp { | |
199 | struct acpi_asf_header header; | |
200 | u8 capabilities[7]; | |
201 | u8 completion_code; | |
202 | u32 enterprise_id; | |
203 | u8 command; | |
204 | u16 parameter; | |
205 | u16 boot_options; | |
206 | u16 oem_parameters; | |
207 | }; | |
208 | ||
209 | /* 4: ASF Address */ | |
210 | ||
211 | struct acpi_asf_address { | |
212 | struct acpi_asf_header header; | |
213 | u8 eprom_address; | |
214 | u8 devices; | |
215 | }; | |
216 | ||
217 | /******************************************************************************* | |
218 | * | |
219 | * BOOT - Simple Boot Flag Table | |
6e2d5ebd BM |
220 | * Version 1 |
221 | * | |
222 | * Conforms to the "Simple Boot Flag Specification", Version 2.1 | |
b24aad44 BM |
223 | * |
224 | ******************************************************************************/ | |
225 | ||
226 | struct acpi_table_boot { | |
227 | struct acpi_table_header header; /* Common ACPI table header */ | |
228 | u8 cmos_index; /* Index in CMOS RAM for the boot register */ | |
229 | u8 reserved[3]; | |
230 | }; | |
231 | ||
232 | /******************************************************************************* | |
233 | * | |
234 | * DBGP - Debug Port table | |
6e2d5ebd BM |
235 | * Version 1 |
236 | * | |
237 | * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000 | |
b24aad44 BM |
238 | * |
239 | ******************************************************************************/ | |
240 | ||
241 | struct acpi_table_dbgp { | |
242 | struct acpi_table_header header; /* Common ACPI table header */ | |
243 | u8 type; /* 0=full 16550, 1=subset of 16550 */ | |
244 | u8 reserved[3]; | |
245 | struct acpi_generic_address debug_port; | |
246 | }; | |
247 | ||
248 | /******************************************************************************* | |
249 | * | |
250 | * DMAR - DMA Remapping table | |
6e2d5ebd BM |
251 | * Version 1 |
252 | * | |
253 | * Conforms to "Intel Virtualization Technology for Directed I/O", | |
254 | * Version 1.2, Sept. 2008 | |
b24aad44 BM |
255 | * |
256 | ******************************************************************************/ | |
257 | ||
258 | struct acpi_table_dmar { | |
259 | struct acpi_table_header header; /* Common ACPI table header */ | |
260 | u8 width; /* Host Address Width */ | |
261 | u8 flags; | |
262 | u8 reserved[10]; | |
263 | }; | |
264 | ||
6e2d5ebd | 265 | /* Masks for Flags field above */ |
b24aad44 BM |
266 | |
267 | #define ACPI_DMAR_INTR_REMAP (1) | |
268 | ||
269 | /* DMAR subtable header */ | |
270 | ||
271 | struct acpi_dmar_header { | |
272 | u16 type; | |
273 | u16 length; | |
274 | }; | |
275 | ||
276 | /* Values for subtable type in struct acpi_dmar_header */ | |
277 | ||
278 | enum acpi_dmar_type { | |
279 | ACPI_DMAR_TYPE_HARDWARE_UNIT = 0, | |
280 | ACPI_DMAR_TYPE_RESERVED_MEMORY = 1, | |
281 | ACPI_DMAR_TYPE_ATSR = 2, | |
6e2d5ebd BM |
282 | ACPI_DMAR_HARDWARE_AFFINITY = 3, |
283 | ACPI_DMAR_TYPE_RESERVED = 4 /* 4 and greater are reserved */ | |
b24aad44 BM |
284 | }; |
285 | ||
6e2d5ebd BM |
286 | /* DMAR Device Scope structure */ |
287 | ||
b24aad44 BM |
288 | struct acpi_dmar_device_scope { |
289 | u8 entry_type; | |
290 | u8 length; | |
291 | u16 reserved; | |
292 | u8 enumeration_id; | |
293 | u8 bus; | |
294 | }; | |
295 | ||
296 | /* Values for entry_type in struct acpi_dmar_device_scope */ | |
297 | ||
298 | enum acpi_dmar_scope_type { | |
299 | ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, | |
300 | ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1, | |
301 | ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2, | |
302 | ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3, | |
303 | ACPI_DMAR_SCOPE_TYPE_HPET = 4, | |
304 | ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */ | |
305 | }; | |
306 | ||
307 | struct acpi_dmar_pci_path { | |
308 | u8 dev; | |
309 | u8 fn; | |
310 | }; | |
311 | ||
312 | /* | |
313 | * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header | |
314 | */ | |
315 | ||
316 | /* 0: Hardware Unit Definition */ | |
317 | ||
318 | struct acpi_dmar_hardware_unit { | |
319 | struct acpi_dmar_header header; | |
320 | u8 flags; | |
321 | u8 reserved; | |
322 | u16 segment; | |
323 | u64 address; /* Register Base Address */ | |
324 | }; | |
325 | ||
6e2d5ebd | 326 | /* Masks for Flags field above */ |
b24aad44 BM |
327 | |
328 | #define ACPI_DMAR_INCLUDE_ALL (1) | |
329 | ||
330 | /* 1: Reserved Memory Defininition */ | |
331 | ||
332 | struct acpi_dmar_reserved_memory { | |
333 | struct acpi_dmar_header header; | |
334 | u16 reserved; | |
335 | u16 segment; | |
336 | u64 base_address; /* 4_k aligned base address */ | |
337 | u64 end_address; /* 4_k aligned limit address */ | |
338 | }; | |
339 | ||
6e2d5ebd | 340 | /* Masks for Flags field above */ |
b24aad44 BM |
341 | |
342 | #define ACPI_DMAR_ALLOW_ALL (1) | |
343 | ||
344 | /* 2: Root Port ATS Capability Reporting Structure */ | |
345 | ||
346 | struct acpi_dmar_atsr { | |
347 | struct acpi_dmar_header header; | |
348 | u8 flags; | |
349 | u8 reserved; | |
350 | u16 segment; | |
351 | }; | |
352 | ||
6e2d5ebd | 353 | /* Masks for Flags field above */ |
b24aad44 BM |
354 | |
355 | #define ACPI_DMAR_ALL_PORTS (1) | |
356 | ||
6e2d5ebd BM |
357 | /* 3: Remapping Hardware Static Affinity Structure */ |
358 | ||
359 | struct acpi_dmar_rhsa { | |
360 | struct acpi_dmar_header header; | |
361 | u32 reserved; | |
362 | u64 base_address; | |
363 | u32 proximity_domain; | |
364 | }; | |
365 | ||
b24aad44 BM |
366 | /******************************************************************************* |
367 | * | |
368 | * HPET - High Precision Event Timer table | |
6e2d5ebd BM |
369 | * Version 1 |
370 | * | |
371 | * Conforms to "IA-PC HPET (High Precision Event Timers) Specification", | |
372 | * Version 1.0a, October 2004 | |
b24aad44 BM |
373 | * |
374 | ******************************************************************************/ | |
375 | ||
376 | struct acpi_table_hpet { | |
377 | struct acpi_table_header header; /* Common ACPI table header */ | |
378 | u32 id; /* Hardware ID of event timer block */ | |
379 | struct acpi_generic_address address; /* Address of event timer block */ | |
380 | u8 sequence; /* HPET sequence number */ | |
381 | u16 minimum_tick; /* Main counter min tick, periodic mode */ | |
382 | u8 flags; | |
383 | }; | |
384 | ||
6e2d5ebd | 385 | /* Masks for Flags field above */ |
b24aad44 | 386 | |
6e2d5ebd | 387 | #define ACPI_HPET_PAGE_PROTECT_MASK (3) |
b24aad44 | 388 | |
6e2d5ebd BM |
389 | /* Values for Page Protect flags */ |
390 | ||
391 | enum acpi_hpet_page_protect { | |
392 | ACPI_HPET_NO_PAGE_PROTECT = 0, | |
393 | ACPI_HPET_PAGE_PROTECT4 = 1, | |
394 | ACPI_HPET_PAGE_PROTECT64 = 2 | |
395 | }; | |
b24aad44 BM |
396 | |
397 | /******************************************************************************* | |
398 | * | |
399 | * IBFT - Boot Firmware Table | |
6e2d5ebd BM |
400 | * Version 1 |
401 | * | |
402 | * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b | |
403 | * Specification", Version 1.01, March 1, 2007 | |
404 | * | |
405 | * Note: It appears that this table is not intended to appear in the RSDT/XSDT. | |
406 | * Therefore, it is not currently supported by the disassembler. | |
b24aad44 BM |
407 | * |
408 | ******************************************************************************/ | |
409 | ||
410 | struct acpi_table_ibft { | |
411 | struct acpi_table_header header; /* Common ACPI table header */ | |
412 | u8 reserved[12]; | |
413 | }; | |
414 | ||
415 | /* IBFT common subtable header */ | |
416 | ||
417 | struct acpi_ibft_header { | |
418 | u8 type; | |
419 | u8 version; | |
420 | u16 length; | |
421 | u8 index; | |
422 | u8 flags; | |
423 | }; | |
424 | ||
425 | /* Values for Type field above */ | |
426 | ||
427 | enum acpi_ibft_type { | |
428 | ACPI_IBFT_TYPE_NOT_USED = 0, | |
429 | ACPI_IBFT_TYPE_CONTROL = 1, | |
430 | ACPI_IBFT_TYPE_INITIATOR = 2, | |
431 | ACPI_IBFT_TYPE_NIC = 3, | |
432 | ACPI_IBFT_TYPE_TARGET = 4, | |
433 | ACPI_IBFT_TYPE_EXTENSIONS = 5, | |
434 | ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */ | |
435 | }; | |
436 | ||
437 | /* IBFT subtables */ | |
438 | ||
439 | struct acpi_ibft_control { | |
440 | struct acpi_ibft_header header; | |
441 | u16 extensions; | |
442 | u16 initiator_offset; | |
443 | u16 nic0_offset; | |
444 | u16 target0_offset; | |
445 | u16 nic1_offset; | |
446 | u16 target1_offset; | |
447 | }; | |
448 | ||
449 | struct acpi_ibft_initiator { | |
450 | struct acpi_ibft_header header; | |
451 | u8 sns_server[16]; | |
452 | u8 slp_server[16]; | |
453 | u8 primary_server[16]; | |
454 | u8 secondary_server[16]; | |
455 | u16 name_length; | |
456 | u16 name_offset; | |
457 | }; | |
458 | ||
459 | struct acpi_ibft_nic { | |
460 | struct acpi_ibft_header header; | |
461 | u8 ip_address[16]; | |
462 | u8 subnet_mask_prefix; | |
463 | u8 origin; | |
464 | u8 gateway[16]; | |
465 | u8 primary_dns[16]; | |
466 | u8 secondary_dns[16]; | |
467 | u8 dhcp[16]; | |
468 | u16 vlan; | |
469 | u8 mac_address[6]; | |
470 | u16 pci_address; | |
471 | u16 name_length; | |
472 | u16 name_offset; | |
473 | }; | |
474 | ||
475 | struct acpi_ibft_target { | |
476 | struct acpi_ibft_header header; | |
477 | u8 target_ip_address[16]; | |
478 | u16 target_ip_socket; | |
479 | u8 target_boot_lun[8]; | |
480 | u8 chap_type; | |
481 | u8 nic_association; | |
482 | u16 target_name_length; | |
483 | u16 target_name_offset; | |
484 | u16 chap_name_length; | |
485 | u16 chap_name_offset; | |
486 | u16 chap_secret_length; | |
487 | u16 chap_secret_offset; | |
488 | u16 reverse_chap_name_length; | |
489 | u16 reverse_chap_name_offset; | |
490 | u16 reverse_chap_secret_length; | |
491 | u16 reverse_chap_secret_offset; | |
492 | }; | |
493 | ||
6e2d5ebd BM |
494 | /******************************************************************************* |
495 | * | |
496 | * IVRS - I/O Virtualization Reporting Structure | |
497 | * Version 1 | |
498 | * | |
499 | * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification", | |
500 | * Revision 1.26, February 2009. | |
501 | * | |
502 | ******************************************************************************/ | |
503 | ||
504 | struct acpi_table_ivrs { | |
505 | struct acpi_table_header header; /* Common ACPI table header */ | |
506 | u32 info; /* Common virtualization info */ | |
507 | u64 reserved; | |
508 | }; | |
509 | ||
510 | /* Values for Info field above */ | |
511 | ||
512 | #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */ | |
513 | #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */ | |
514 | #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */ | |
515 | ||
516 | /* IVRS subtable header */ | |
517 | ||
518 | struct acpi_ivrs_header { | |
519 | u8 type; /* Subtable type */ | |
520 | u8 flags; | |
521 | u16 length; /* Subtable length */ | |
522 | u16 device_id; /* ID of IOMMU */ | |
523 | }; | |
524 | ||
525 | /* Values for subtable Type above */ | |
526 | ||
527 | enum acpi_ivrs_type { | |
528 | ACPI_IVRS_TYPE_HARDWARE = 0x10, | |
529 | ACPI_IVRS_TYPE_MEMORY1 = 0x20, | |
530 | ACPI_IVRS_TYPE_MEMORY2 = 0x21, | |
531 | ACPI_IVRS_TYPE_MEMORY3 = 0x22 | |
532 | }; | |
533 | ||
534 | /* Masks for Flags field above for IVHD subtable */ | |
535 | ||
536 | #define ACPI_IVHD_TT_ENABLE (1) | |
537 | #define ACPI_IVHD_PASS_PW (1<<1) | |
538 | #define ACPI_IVHD_RES_PASS_PW (1<<2) | |
539 | #define ACPI_IVHD_ISOC (1<<3) | |
540 | #define ACPI_IVHD_IOTLB (1<<4) | |
541 | ||
542 | /* Masks for Flags field above for IVMD subtable */ | |
543 | ||
544 | #define ACPI_IVMD_UNITY (1) | |
545 | #define ACPI_IVMD_READ (1<<1) | |
546 | #define ACPI_IVMD_WRITE (1<<2) | |
547 | #define ACPI_IVMD_EXCLUSION_RANGE (1<<3) | |
548 | ||
549 | /* | |
550 | * IVRS subtables, correspond to Type in struct acpi_ivrs_header | |
551 | */ | |
552 | ||
553 | /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */ | |
554 | ||
555 | struct acpi_ivrs_hardware { | |
556 | struct acpi_ivrs_header header; | |
557 | u16 capability_offset; /* Offset for IOMMU control fields */ | |
558 | u64 base_address; /* IOMMU control registers */ | |
559 | u16 pci_segment_group; | |
560 | u16 info; /* MSI number and unit ID */ | |
561 | u32 reserved; | |
562 | }; | |
563 | ||
564 | /* Masks for Info field above */ | |
565 | ||
566 | #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */ | |
567 | #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, unit_iD */ | |
568 | ||
569 | /* | |
570 | * Device Entries for IVHD subtable, appear after struct acpi_ivrs_hardware structure. | |
571 | * Upper two bits of the Type field are the (encoded) length of the structure. | |
572 | * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries | |
573 | * are reserved for future use but not defined. | |
574 | */ | |
575 | struct acpi_ivrs_de_header { | |
576 | u8 type; | |
577 | u16 id; | |
578 | u8 data_setting; | |
579 | }; | |
580 | ||
581 | /* Length of device entry is in the top two bits of Type field above */ | |
582 | ||
583 | #define ACPI_IVHD_ENTRY_LENGTH 0xC0 | |
584 | ||
585 | /* Values for device entry Type field above */ | |
586 | ||
587 | enum acpi_ivrs_device_entry_type { | |
588 | /* 4-byte device entries, all use struct acpi_ivrs_device4 */ | |
589 | ||
590 | ACPI_IVRS_TYPE_PAD4 = 0, | |
591 | ACPI_IVRS_TYPE_ALL = 1, | |
592 | ACPI_IVRS_TYPE_SELECT = 2, | |
593 | ACPI_IVRS_TYPE_START = 3, | |
594 | ACPI_IVRS_TYPE_END = 4, | |
595 | ||
596 | /* 8-byte device entries */ | |
597 | ||
598 | ACPI_IVRS_TYPE_PAD8 = 64, | |
599 | ACPI_IVRS_TYPE_NOT_USED = 65, | |
600 | ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses struct acpi_ivrs_device8a */ | |
601 | ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses struct acpi_ivrs_device8a */ | |
602 | ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses struct acpi_ivrs_device8b */ | |
603 | ACPI_IVRS_TYPE_EXT_START = 71, /* Uses struct acpi_ivrs_device8b */ | |
604 | ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses struct acpi_ivrs_device8c */ | |
605 | }; | |
606 | ||
607 | /* Values for Data field above */ | |
608 | ||
609 | #define ACPI_IVHD_INIT_PASS (1) | |
610 | #define ACPI_IVHD_EINT_PASS (1<<1) | |
611 | #define ACPI_IVHD_NMI_PASS (1<<2) | |
612 | #define ACPI_IVHD_SYSTEM_MGMT (3<<4) | |
613 | #define ACPI_IVHD_LINT0_PASS (1<<6) | |
614 | #define ACPI_IVHD_LINT1_PASS (1<<7) | |
615 | ||
616 | /* Types 0-4: 4-byte device entry */ | |
617 | ||
618 | struct acpi_ivrs_device4 { | |
619 | struct acpi_ivrs_de_header header; | |
620 | }; | |
621 | ||
622 | /* Types 66-67: 8-byte device entry */ | |
623 | ||
624 | struct acpi_ivrs_device8a { | |
625 | struct acpi_ivrs_de_header header; | |
626 | u8 reserved1; | |
627 | u16 used_id; | |
628 | u8 reserved2; | |
629 | }; | |
630 | ||
631 | /* Types 70-71: 8-byte device entry */ | |
632 | ||
633 | struct acpi_ivrs_device8b { | |
634 | struct acpi_ivrs_de_header header; | |
635 | u32 extended_data; | |
636 | }; | |
637 | ||
638 | /* Values for extended_data above */ | |
639 | ||
640 | #define ACPI_IVHD_ATS_DISABLED (1<<31) | |
641 | ||
642 | /* Type 72: 8-byte device entry */ | |
643 | ||
644 | struct acpi_ivrs_device8c { | |
645 | struct acpi_ivrs_de_header header; | |
646 | u8 handle; | |
647 | u16 used_id; | |
648 | u8 variety; | |
649 | }; | |
650 | ||
651 | /* Values for Variety field above */ | |
652 | ||
653 | #define ACPI_IVHD_IOAPIC 1 | |
654 | #define ACPI_IVHD_HPET 2 | |
655 | ||
656 | /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */ | |
657 | ||
658 | struct acpi_ivrs_memory { | |
659 | struct acpi_ivrs_header header; | |
660 | u16 aux_data; | |
661 | u64 reserved; | |
662 | u64 start_address; | |
663 | u64 memory_length; | |
664 | }; | |
665 | ||
b24aad44 BM |
666 | /******************************************************************************* |
667 | * | |
668 | * MCFG - PCI Memory Mapped Configuration table and sub-table | |
6e2d5ebd BM |
669 | * Version 1 |
670 | * | |
671 | * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005 | |
b24aad44 BM |
672 | * |
673 | ******************************************************************************/ | |
674 | ||
675 | struct acpi_table_mcfg { | |
676 | struct acpi_table_header header; /* Common ACPI table header */ | |
677 | u8 reserved[8]; | |
678 | }; | |
679 | ||
680 | /* Subtable */ | |
681 | ||
682 | struct acpi_mcfg_allocation { | |
683 | u64 address; /* Base address, processor-relative */ | |
684 | u16 pci_segment; /* PCI segment group number */ | |
685 | u8 start_bus_number; /* Starting PCI Bus number */ | |
686 | u8 end_bus_number; /* Final PCI Bus number */ | |
687 | u32 reserved; | |
688 | }; | |
689 | ||
0e264f0b BM |
690 | /******************************************************************************* |
691 | * | |
692 | * MCHI - Management Controller Host Interface Table | |
693 | * Version 1 | |
694 | * | |
695 | * Conforms to "Management Component Transport Protocol (MCTP) Host | |
696 | * Interface Specification", Revision 1.0.0a, October 13, 2009 | |
697 | * | |
698 | ******************************************************************************/ | |
699 | ||
700 | struct acpi_table_mchi { | |
701 | struct acpi_table_header header; /* Common ACPI table header */ | |
702 | u8 interface_type; | |
703 | u8 protocol; | |
704 | u64 protocol_data; | |
705 | u8 interrupt_type; | |
706 | u8 gpe; | |
707 | u8 pci_device_flag; | |
708 | u32 global_interrupt; | |
709 | struct acpi_generic_address control_register; | |
710 | u8 pci_segment; | |
711 | u8 pci_bus; | |
712 | u8 pci_device; | |
713 | u8 pci_function; | |
714 | }; | |
715 | ||
b24aad44 BM |
716 | /******************************************************************************* |
717 | * | |
718 | * SPCR - Serial Port Console Redirection table | |
6e2d5ebd BM |
719 | * Version 1 |
720 | * | |
721 | * Conforms to "Serial Port Console Redirection Table", | |
722 | * Version 1.00, January 11, 2002 | |
b24aad44 BM |
723 | * |
724 | ******************************************************************************/ | |
725 | ||
726 | struct acpi_table_spcr { | |
727 | struct acpi_table_header header; /* Common ACPI table header */ | |
728 | u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ | |
729 | u8 reserved[3]; | |
730 | struct acpi_generic_address serial_port; | |
731 | u8 interrupt_type; | |
732 | u8 pc_interrupt; | |
733 | u32 interrupt; | |
734 | u8 baud_rate; | |
735 | u8 parity; | |
736 | u8 stop_bits; | |
737 | u8 flow_control; | |
738 | u8 terminal_type; | |
739 | u8 reserved1; | |
740 | u16 pci_device_id; | |
741 | u16 pci_vendor_id; | |
742 | u8 pci_bus; | |
743 | u8 pci_device; | |
744 | u8 pci_function; | |
745 | u32 pci_flags; | |
746 | u8 pci_segment; | |
747 | u32 reserved2; | |
748 | }; | |
749 | ||
6e2d5ebd BM |
750 | /* Masks for pci_flags field above */ |
751 | ||
752 | #define ACPI_SPCR_DO_NOT_DISABLE (1) | |
753 | ||
b24aad44 BM |
754 | /******************************************************************************* |
755 | * | |
756 | * SPMI - Server Platform Management Interface table | |
6e2d5ebd BM |
757 | * Version 5 |
758 | * | |
759 | * Conforms to "Intelligent Platform Management Interface Specification | |
760 | * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with | |
761 | * June 12, 2009 markup. | |
b24aad44 BM |
762 | * |
763 | ******************************************************************************/ | |
764 | ||
765 | struct acpi_table_spmi { | |
766 | struct acpi_table_header header; /* Common ACPI table header */ | |
b24aad44 | 767 | u8 interface_type; |
6e2d5ebd | 768 | u8 reserved; /* Must be 1 */ |
b24aad44 BM |
769 | u16 spec_revision; /* Version of IPMI */ |
770 | u8 interrupt_type; | |
771 | u8 gpe_number; /* GPE assigned */ | |
772 | u8 reserved1; | |
773 | u8 pci_device_flag; | |
774 | u32 interrupt; | |
775 | struct acpi_generic_address ipmi_register; | |
776 | u8 pci_segment; | |
777 | u8 pci_bus; | |
778 | u8 pci_device; | |
779 | u8 pci_function; | |
6e2d5ebd BM |
780 | u8 reserved2; |
781 | }; | |
782 | ||
783 | /* Values for interface_type above */ | |
784 | ||
785 | enum acpi_spmi_interface_types { | |
786 | ACPI_SPMI_NOT_USED = 0, | |
787 | ACPI_SPMI_KEYBOARD = 1, | |
788 | ACPI_SPMI_SMI = 2, | |
789 | ACPI_SPMI_BLOCK_TRANSFER = 3, | |
790 | ACPI_SPMI_SMBUS = 4, | |
791 | ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */ | |
b24aad44 BM |
792 | }; |
793 | ||
794 | /******************************************************************************* | |
795 | * | |
796 | * TCPA - Trusted Computing Platform Alliance table | |
6e2d5ebd BM |
797 | * Version 1 |
798 | * | |
799 | * Conforms to "TCG PC Specific Implementation Specification", | |
800 | * Version 1.1, August 18, 2003 | |
b24aad44 BM |
801 | * |
802 | ******************************************************************************/ | |
803 | ||
804 | struct acpi_table_tcpa { | |
805 | struct acpi_table_header header; /* Common ACPI table header */ | |
806 | u16 reserved; | |
807 | u32 max_log_length; /* Maximum length for the event log area */ | |
808 | u64 log_address; /* Address of the event log area */ | |
809 | }; | |
810 | ||
811 | /******************************************************************************* | |
812 | * | |
813 | * UEFI - UEFI Boot optimization Table | |
6e2d5ebd BM |
814 | * Version 1 |
815 | * | |
816 | * Conforms to "Unified Extensible Firmware Interface Specification", | |
817 | * Version 2.3, May 8, 2009 | |
b24aad44 BM |
818 | * |
819 | ******************************************************************************/ | |
820 | ||
821 | struct acpi_table_uefi { | |
822 | struct acpi_table_header header; /* Common ACPI table header */ | |
823 | u8 identifier[16]; /* UUID identifier */ | |
824 | u16 data_offset; /* Offset of remaining data in table */ | |
b24aad44 BM |
825 | }; |
826 | ||
6e2d5ebd BM |
827 | /******************************************************************************* |
828 | * | |
829 | * WAET - Windows ACPI Emulated devices Table | |
830 | * Version 1 | |
831 | * | |
832 | * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009 | |
833 | * | |
834 | ******************************************************************************/ | |
835 | ||
836 | struct acpi_table_waet { | |
837 | struct acpi_table_header header; /* Common ACPI table header */ | |
838 | u32 flags; | |
839 | }; | |
840 | ||
841 | /* Masks for Flags field above */ | |
842 | ||
843 | #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */ | |
844 | #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */ | |
845 | ||
b24aad44 BM |
846 | /******************************************************************************* |
847 | * | |
848 | * WDAT - Watchdog Action Table | |
6e2d5ebd BM |
849 | * Version 1 |
850 | * | |
851 | * Conforms to "Hardware Watchdog Timers Design Specification", | |
852 | * Copyright 2006 Microsoft Corporation. | |
b24aad44 BM |
853 | * |
854 | ******************************************************************************/ | |
855 | ||
856 | struct acpi_table_wdat { | |
857 | struct acpi_table_header header; /* Common ACPI table header */ | |
858 | u32 header_length; /* Watchdog Header Length */ | |
859 | u16 pci_segment; /* PCI Segment number */ | |
860 | u8 pci_bus; /* PCI Bus number */ | |
861 | u8 pci_device; /* PCI Device number */ | |
862 | u8 pci_function; /* PCI Function number */ | |
863 | u8 reserved[3]; | |
864 | u32 timer_period; /* Period of one timer count (msec) */ | |
865 | u32 max_count; /* Maximum counter value supported */ | |
866 | u32 min_count; /* Minimum counter value */ | |
867 | u8 flags; | |
868 | u8 reserved2[3]; | |
869 | u32 entries; /* Number of watchdog entries that follow */ | |
870 | }; | |
871 | ||
6e2d5ebd BM |
872 | /* Masks for Flags field above */ |
873 | ||
874 | #define ACPI_WDAT_ENABLED (1) | |
875 | #define ACPI_WDAT_STOPPED 0x80 | |
876 | ||
b24aad44 BM |
877 | /* WDAT Instruction Entries (actions) */ |
878 | ||
879 | struct acpi_wdat_entry { | |
6e2d5ebd BM |
880 | u8 action; |
881 | u8 instruction; | |
882 | u16 reserved; | |
883 | struct acpi_generic_address register_region; | |
884 | u32 value; /* Value used with Read/Write register */ | |
885 | u32 mask; /* Bitmask required for this register instruction */ | |
b24aad44 BM |
886 | }; |
887 | ||
888 | /* Values for Action field above */ | |
889 | ||
890 | enum acpi_wdat_actions { | |
891 | ACPI_WDAT_RESET = 1, | |
892 | ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4, | |
893 | ACPI_WDAT_GET_COUNTDOWN = 5, | |
894 | ACPI_WDAT_SET_COUNTDOWN = 6, | |
895 | ACPI_WDAT_GET_RUNNING_STATE = 8, | |
896 | ACPI_WDAT_SET_RUNNING_STATE = 9, | |
897 | ACPI_WDAT_GET_STOPPED_STATE = 10, | |
898 | ACPI_WDAT_SET_STOPPED_STATE = 11, | |
899 | ACPI_WDAT_GET_REBOOT = 16, | |
900 | ACPI_WDAT_SET_REBOOT = 17, | |
901 | ACPI_WDAT_GET_SHUTDOWN = 18, | |
902 | ACPI_WDAT_SET_SHUTDOWN = 19, | |
903 | ACPI_WDAT_GET_STATUS = 32, | |
904 | ACPI_WDAT_SET_STATUS = 33, | |
905 | ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */ | |
906 | }; | |
907 | ||
908 | /* Values for Instruction field above */ | |
909 | ||
910 | enum acpi_wdat_instructions { | |
911 | ACPI_WDAT_READ_VALUE = 0, | |
912 | ACPI_WDAT_READ_COUNTDOWN = 1, | |
913 | ACPI_WDAT_WRITE_VALUE = 2, | |
914 | ACPI_WDAT_WRITE_COUNTDOWN = 3, | |
915 | ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */ | |
916 | ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */ | |
917 | }; | |
918 | ||
919 | /******************************************************************************* | |
920 | * | |
921 | * WDRT - Watchdog Resource Table | |
6e2d5ebd BM |
922 | * Version 1 |
923 | * | |
924 | * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003", | |
925 | * Version 1.01, August 28, 2006 | |
b24aad44 BM |
926 | * |
927 | ******************************************************************************/ | |
928 | ||
929 | struct acpi_table_wdrt { | |
930 | struct acpi_table_header header; /* Common ACPI table header */ | |
6e2d5ebd BM |
931 | struct acpi_generic_address control_register; |
932 | struct acpi_generic_address count_register; | |
933 | u16 pci_device_id; | |
934 | u16 pci_vendor_id; | |
b24aad44 BM |
935 | u8 pci_bus; /* PCI Bus number */ |
936 | u8 pci_device; /* PCI Device number */ | |
937 | u8 pci_function; /* PCI Function number */ | |
6e2d5ebd BM |
938 | u8 pci_segment; /* PCI Segment number */ |
939 | u16 max_count; /* Maximum counter value supported */ | |
940 | u8 units; | |
b24aad44 BM |
941 | }; |
942 | ||
b24aad44 BM |
943 | /* Reset to default packing */ |
944 | ||
945 | #pragma pack() | |
946 | ||
947 | #endif /* __ACTBL2_H__ */ |