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