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