xref: /haiku/src/add-ons/kernel/bus_managers/acpi/acpica/include/actbl2.h (revision 204dee708a999d5a71d0cb9497650ee7cef85d0a)
1 /******************************************************************************
2  *
3  * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
4  *
5  *****************************************************************************/
6 
7 /******************************************************************************
8  *
9  * 1. Copyright Notice
10  *
11  * Some or all of this work - Copyright (c) 1999 - 2012, Intel Corp.
12  * All rights reserved.
13  *
14  * 2. License
15  *
16  * 2.1. This is your license from Intel Corp. under its intellectual property
17  * rights. You may have additional license terms from the party that provided
18  * you this software, covering your right to use that party's intellectual
19  * property rights.
20  *
21  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22  * copy of the source code appearing in this file ("Covered Code") an
23  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24  * base code distributed originally by Intel ("Original Intel Code") to copy,
25  * make derivatives, distribute, use and display any portion of the Covered
26  * Code in any form, with the right to sublicense such rights; and
27  *
28  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29  * license (with the right to sublicense), under only those claims of Intel
30  * patents that are infringed by the Original Intel Code, to make, use, sell,
31  * offer to sell, and import the Covered Code and derivative works thereof
32  * solely to the minimum extent necessary to exercise the above copyright
33  * license, and in no event shall the patent license extend to any additions
34  * to or modifications of the Original Intel Code. No other license or right
35  * is granted directly or by implication, estoppel or otherwise;
36  *
37  * The above copyright and patent license is granted only if the following
38  * conditions are met:
39  *
40  * 3. Conditions
41  *
42  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43  * Redistribution of source code of any substantial portion of the Covered
44  * Code or modification with rights to further distribute source must include
45  * the above Copyright Notice, the above License, this list of Conditions,
46  * and the following Disclaimer and Export Compliance provision. In addition,
47  * Licensee must cause all Covered Code to which Licensee contributes to
48  * contain a file documenting the changes Licensee made to create that Covered
49  * Code and the date of any change. Licensee must include in that file the
50  * documentation of any changes made by any predecessor Licensee. Licensee
51  * must include a prominent statement that the modification is derived,
52  * directly or indirectly, from Original Intel Code.
53  *
54  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55  * Redistribution of source code of any substantial portion of the Covered
56  * Code or modification without rights to further distribute source must
57  * include the following Disclaimer and Export Compliance provision in the
58  * documentation and/or other materials provided with distribution. In
59  * addition, Licensee may not authorize further sublicense of source of any
60  * portion of the Covered Code, and must include terms to the effect that the
61  * license from Licensee to its licensee is limited to the intellectual
62  * property embodied in the software Licensee provides to its licensee, and
63  * not to intellectual property embodied in modifications its licensee may
64  * make.
65  *
66  * 3.3. Redistribution of Executable. Redistribution in executable form of any
67  * substantial portion of the Covered Code or modification must reproduce the
68  * above Copyright Notice, and the following Disclaimer and Export Compliance
69  * provision in the documentation and/or other materials provided with the
70  * distribution.
71  *
72  * 3.4. Intel retains all right, title, and interest in and to the Original
73  * Intel Code.
74  *
75  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76  * Intel shall be used in advertising or otherwise to promote the sale, use or
77  * other dealings in products derived from or relating to the Covered Code
78  * without prior written authorization from Intel.
79  *
80  * 4. Disclaimer and Export Compliance
81  *
82  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88  * PARTICULAR PURPOSE.
89  *
90  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97  * LIMITED REMEDY.
98  *
99  * 4.3. Licensee shall not export, either directly or indirectly, any of this
100  * software or system incorporating such software without first obtaining any
101  * required license or other approval from the U. S. Department of Commerce or
102  * any other agency or department of the United States Government. In the
103  * event Licensee exports any such software from the United States or
104  * re-exports any such software from a foreign destination, Licensee shall
105  * ensure that the distribution and export/re-export of the software is in
106  * compliance with all laws, regulations, orders, or other restrictions of the
107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108  * any of its subsidiaries will export/re-export any technical data, process,
109  * software, or service, directly or indirectly, to any country for which the
110  * United States government or any agency thereof requires an export license,
111  * other governmental approval, or letter of assurance, without first obtaining
112  * such license, approval or letter.
113  *
114  *****************************************************************************/
115 
116 #ifndef __ACTBL2_H__
117 #define __ACTBL2_H__
118 
119 
120 /*******************************************************************************
121  *
122  * Additional ACPI Tables (2)
123  *
124  * These tables are not consumed directly by the ACPICA subsystem, but are
125  * included here to support device drivers and the AML disassembler.
126  *
127  * The tables in this file are defined by third-party specifications, and are
128  * not defined directly by the ACPI specification itself.
129  *
130  ******************************************************************************/
131 
132 
133 /*
134  * Values for description table header signatures for tables defined in this
135  * file. Useful because they make it more difficult to inadvertently type in
136  * the wrong signature.
137  */
138 #define ACPI_SIG_ASF            "ASF!"      /* Alert Standard Format table */
139 #define ACPI_SIG_BOOT           "BOOT"      /* Simple Boot Flag Table */
140 #define ACPI_SIG_CSRT           "CSRT"      /* Core System Resource Table */
141 #define ACPI_SIG_DBG2           "DBG2"      /* Debug Port table type 2 */
142 #define ACPI_SIG_DBGP           "DBGP"      /* Debug Port table */
143 #define ACPI_SIG_DMAR           "DMAR"      /* DMA Remapping table */
144 #define ACPI_SIG_HPET           "HPET"      /* High Precision Event Timer table */
145 #define ACPI_SIG_IBFT           "IBFT"      /* iSCSI Boot Firmware Table */
146 #define ACPI_SIG_IVRS           "IVRS"      /* I/O Virtualization Reporting Structure */
147 #define ACPI_SIG_MCFG           "MCFG"      /* PCI Memory Mapped Configuration table */
148 #define ACPI_SIG_MCHI           "MCHI"      /* Management Controller Host Interface table */
149 #define ACPI_SIG_SLIC           "SLIC"      /* Software Licensing Description Table */
150 #define ACPI_SIG_SPCR           "SPCR"      /* Serial Port Console Redirection table */
151 #define ACPI_SIG_SPMI           "SPMI"      /* Server Platform Management Interface table */
152 #define ACPI_SIG_TCPA           "TCPA"      /* Trusted Computing Platform Alliance table */
153 #define ACPI_SIG_UEFI           "UEFI"      /* Uefi Boot Optimization Table */
154 #define ACPI_SIG_WAET           "WAET"      /* Windows ACPI Emulated devices Table */
155 #define ACPI_SIG_WDAT           "WDAT"      /* Watchdog Action Table */
156 #define ACPI_SIG_WDDT           "WDDT"      /* Watchdog Timer Description Table */
157 #define ACPI_SIG_WDRT           "WDRT"      /* Watchdog Resource Table */
158 
159 #ifdef ACPI_UNDEFINED_TABLES
160 /*
161  * These tables have been seen in the field, but no definition has been found
162  */
163 #define ACPI_SIG_ATKG           "ATKG"
164 #define ACPI_SIG_GSCI           "GSCI"      /* GMCH SCI table */
165 #define ACPI_SIG_IEIT           "IEIT"
166 #endif
167 
168 /*
169  * All tables must be byte-packed to match the ACPI specification, since
170  * the tables are provided by the system BIOS.
171  */
172 #pragma pack(1)
173 
174 /*
175  * Note: C bitfields are not used for this reason:
176  *
177  * "Bitfields are great and easy to read, but unfortunately the C language
178  * does not specify the layout of bitfields in memory, which means they are
179  * essentially useless for dealing with packed data in on-disk formats or
180  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
181  * this decision was a design error in C. Ritchie could have picked an order
182  * and stuck with it." Norman Ramsey.
183  * See http://stackoverflow.com/a/1053662/41661
184  */
185 
186 
187 /*******************************************************************************
188  *
189  * ASF - Alert Standard Format table (Signature "ASF!")
190  *       Revision 0x10
191  *
192  * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
193  *
194  ******************************************************************************/
195 
196 typedef struct acpi_table_asf
197 {
198     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
199 
200 } ACPI_TABLE_ASF;
201 
202 
203 /* ASF subtable header */
204 
205 typedef struct acpi_asf_header
206 {
207     UINT8                   Type;
208     UINT8                   Reserved;
209     UINT16                  Length;
210 
211 } ACPI_ASF_HEADER;
212 
213 
214 /* Values for Type field above */
215 
216 enum AcpiAsfType
217 {
218     ACPI_ASF_TYPE_INFO          = 0,
219     ACPI_ASF_TYPE_ALERT         = 1,
220     ACPI_ASF_TYPE_CONTROL       = 2,
221     ACPI_ASF_TYPE_BOOT          = 3,
222     ACPI_ASF_TYPE_ADDRESS       = 4,
223     ACPI_ASF_TYPE_RESERVED      = 5
224 };
225 
226 /*
227  * ASF subtables
228  */
229 
230 /* 0: ASF Information */
231 
232 typedef struct acpi_asf_info
233 {
234     ACPI_ASF_HEADER         Header;
235     UINT8                   MinResetValue;
236     UINT8                   MinPollInterval;
237     UINT16                  SystemId;
238     UINT32                  MfgId;
239     UINT8                   Flags;
240     UINT8                   Reserved2[3];
241 
242 } ACPI_ASF_INFO;
243 
244 /* Masks for Flags field above */
245 
246 #define ACPI_ASF_SMBUS_PROTOCOLS    (1)
247 
248 
249 /* 1: ASF Alerts */
250 
251 typedef struct acpi_asf_alert
252 {
253     ACPI_ASF_HEADER         Header;
254     UINT8                   AssertMask;
255     UINT8                   DeassertMask;
256     UINT8                   Alerts;
257     UINT8                   DataLength;
258 
259 } ACPI_ASF_ALERT;
260 
261 typedef struct acpi_asf_alert_data
262 {
263     UINT8                   Address;
264     UINT8                   Command;
265     UINT8                   Mask;
266     UINT8                   Value;
267     UINT8                   SensorType;
268     UINT8                   Type;
269     UINT8                   Offset;
270     UINT8                   SourceType;
271     UINT8                   Severity;
272     UINT8                   SensorNumber;
273     UINT8                   Entity;
274     UINT8                   Instance;
275 
276 } ACPI_ASF_ALERT_DATA;
277 
278 
279 /* 2: ASF Remote Control */
280 
281 typedef struct acpi_asf_remote
282 {
283     ACPI_ASF_HEADER         Header;
284     UINT8                   Controls;
285     UINT8                   DataLength;
286     UINT16                  Reserved2;
287 
288 } ACPI_ASF_REMOTE;
289 
290 typedef struct acpi_asf_control_data
291 {
292     UINT8                   Function;
293     UINT8                   Address;
294     UINT8                   Command;
295     UINT8                   Value;
296 
297 } ACPI_ASF_CONTROL_DATA;
298 
299 
300 /* 3: ASF RMCP Boot Options */
301 
302 typedef struct acpi_asf_rmcp
303 {
304     ACPI_ASF_HEADER         Header;
305     UINT8                   Capabilities[7];
306     UINT8                   CompletionCode;
307     UINT32                  EnterpriseId;
308     UINT8                   Command;
309     UINT16                  Parameter;
310     UINT16                  BootOptions;
311     UINT16                  OemParameters;
312 
313 } ACPI_ASF_RMCP;
314 
315 
316 /* 4: ASF Address */
317 
318 typedef struct acpi_asf_address
319 {
320     ACPI_ASF_HEADER         Header;
321     UINT8                   EpromAddress;
322     UINT8                   Devices;
323 
324 } ACPI_ASF_ADDRESS;
325 
326 
327 /*******************************************************************************
328  *
329  * BOOT - Simple Boot Flag Table
330  *        Version 1
331  *
332  * Conforms to the "Simple Boot Flag Specification", Version 2.1
333  *
334  ******************************************************************************/
335 
336 typedef struct acpi_table_boot
337 {
338     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
339     UINT8                   CmosIndex;          /* Index in CMOS RAM for the boot register */
340     UINT8                   Reserved[3];
341 
342 } ACPI_TABLE_BOOT;
343 
344 
345 /*******************************************************************************
346  *
347  * CSRT - Core System Resource Table
348  *        Version 0
349  *
350  * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
351  *
352  ******************************************************************************/
353 
354 typedef struct acpi_table_csrt
355 {
356     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
357 
358 } ACPI_TABLE_CSRT;
359 
360 /* Resource Group subtable */
361 
362 typedef struct acpi_csrt_group
363 {
364     UINT32                  Length;
365     UINT32                  VendorId;
366     UINT32                  SubvendorId;
367     UINT16                  DeviceId;
368     UINT16                  SubdeviceId;
369     UINT16                  Revision;
370     UINT16                  Reserved;
371     UINT32                  InfoLength;
372 
373     /* Shared data (length = InfoLength) immediately follows */
374 
375 } ACPI_CSRT_GROUP;
376 
377 /* Resource Descriptor subtable */
378 
379 typedef struct acpi_csrt_descriptor
380 {
381     UINT32                  Length;
382     UINT16                  Type;
383     UINT16                  Subtype;
384     UINT32                  Uid;
385 
386     /* Resource-specific information immediately follows */
387 
388 } ACPI_CSRT_DESCRIPTOR;
389 
390 
391 /* Resource Types */
392 
393 #define ACPI_CSRT_TYPE_INTERRUPT    0x0001
394 #define ACPI_CSRT_TYPE_TIMER        0x0002
395 #define ACPI_CSRT_TYPE_DMA          0x0003
396 
397 /* Resource Subtypes */
398 
399 #define ACPI_CSRT_XRUPT_LINE        0x0000
400 #define ACPI_CSRT_XRUPT_CONTROLLER  0x0001
401 #define ACPI_CSRT_TIMER             0x0000
402 #define ACPI_CSRT_DMA_CHANNEL       0x0000
403 #define ACPI_CSRT_DMA_CONTROLLER    0x0001
404 
405 
406 /*******************************************************************************
407  *
408  * DBG2 - Debug Port Table 2
409  *        Version 0 (Both main table and subtables)
410  *
411  * Conforms to "Microsoft Debug Port Table 2 (DBG2)", May 22 2012.
412  *
413  ******************************************************************************/
414 
415 typedef struct acpi_table_dbg2
416 {
417     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
418     UINT32                  InfoOffset;
419     UINT32                  InfoCount;
420 
421 } ACPI_TABLE_DBG2;
422 
423 
424 /* Debug Device Information Subtable */
425 
426 typedef struct acpi_dbg2_device
427 {
428     UINT8                   Revision;
429     UINT16                  Length;
430     UINT8                   RegisterCount;      /* Number of BaseAddress registers */
431     UINT16                  NamepathLength;
432     UINT16                  NamepathOffset;
433     UINT16                  OemDataLength;
434     UINT16                  OemDataOffset;
435     UINT16                  PortType;
436     UINT16                  PortSubtype;
437     UINT16                  Reserved;
438     UINT16                  BaseAddressOffset;
439     UINT16                  AddressSizeOffset;
440     /*
441      * Data that follows:
442      *    BaseAddress (required) - Each in 12-byte Generic Address Structure format.
443      *    AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.
444      *    Namepath    (required) - Null terminated string. Single dot if not supported.
445      *    OemData     (optional) - Length is OemDataLength.
446      */
447 } ACPI_DBG2_DEVICE;
448 
449 /* Types for PortType field above */
450 
451 #define ACPI_DBG2_SERIAL_PORT       0x8000
452 #define ACPI_DBG2_1394_PORT         0x8001
453 #define ACPI_DBG2_USB_PORT          0x8002
454 #define ACPI_DBG2_NET_PORT          0x8003
455 
456 /* Subtypes for PortSubtype field above */
457 
458 #define ACPI_DBG2_16550_COMPATIBLE  0x0000
459 #define ACPI_DBG2_16550_SUBSET      0x0001
460 
461 #define ACPI_DBG2_1394_STANDARD     0x0000
462 
463 #define ACPI_DBG2_USB_XHCI          0x0000
464 #define ACPI_DBG2_USB_EHCI          0x0001
465 
466 
467 /*******************************************************************************
468  *
469  * DBGP - Debug Port table
470  *        Version 1
471  *
472  * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
473  *
474  ******************************************************************************/
475 
476 typedef struct acpi_table_dbgp
477 {
478     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
479     UINT8                   Type;               /* 0=full 16550, 1=subset of 16550 */
480     UINT8                   Reserved[3];
481     ACPI_GENERIC_ADDRESS    DebugPort;
482 
483 } ACPI_TABLE_DBGP;
484 
485 
486 /*******************************************************************************
487  *
488  * DMAR - DMA Remapping table
489  *        Version 1
490  *
491  * Conforms to "Intel Virtualization Technology for Directed I/O",
492  * Version 1.2, Sept. 2008
493  *
494  ******************************************************************************/
495 
496 typedef struct acpi_table_dmar
497 {
498     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
499     UINT8                   Width;              /* Host Address Width */
500     UINT8                   Flags;
501     UINT8                   Reserved[10];
502 
503 } ACPI_TABLE_DMAR;
504 
505 /* Masks for Flags field above */
506 
507 #define ACPI_DMAR_INTR_REMAP        (1)
508 
509 
510 /* DMAR subtable header */
511 
512 typedef struct acpi_dmar_header
513 {
514     UINT16                  Type;
515     UINT16                  Length;
516 
517 } ACPI_DMAR_HEADER;
518 
519 /* Values for subtable type in ACPI_DMAR_HEADER */
520 
521 enum AcpiDmarType
522 {
523     ACPI_DMAR_TYPE_HARDWARE_UNIT        = 0,
524     ACPI_DMAR_TYPE_RESERVED_MEMORY      = 1,
525     ACPI_DMAR_TYPE_ATSR                 = 2,
526     ACPI_DMAR_HARDWARE_AFFINITY         = 3,
527     ACPI_DMAR_TYPE_RESERVED             = 4     /* 4 and greater are reserved */
528 };
529 
530 
531 /* DMAR Device Scope structure */
532 
533 typedef struct acpi_dmar_device_scope
534 {
535     UINT8                   EntryType;
536     UINT8                   Length;
537     UINT16                  Reserved;
538     UINT8                   EnumerationId;
539     UINT8                   Bus;
540 
541 } ACPI_DMAR_DEVICE_SCOPE;
542 
543 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE */
544 
545 enum AcpiDmarScopeType
546 {
547     ACPI_DMAR_SCOPE_TYPE_NOT_USED       = 0,
548     ACPI_DMAR_SCOPE_TYPE_ENDPOINT       = 1,
549     ACPI_DMAR_SCOPE_TYPE_BRIDGE         = 2,
550     ACPI_DMAR_SCOPE_TYPE_IOAPIC         = 3,
551     ACPI_DMAR_SCOPE_TYPE_HPET           = 4,
552     ACPI_DMAR_SCOPE_TYPE_RESERVED       = 5     /* 5 and greater are reserved */
553 };
554 
555 typedef struct acpi_dmar_pci_path
556 {
557     UINT8                   Device;
558     UINT8                   Function;
559 
560 } ACPI_DMAR_PCI_PATH;
561 
562 
563 /*
564  * DMAR Sub-tables, correspond to Type in ACPI_DMAR_HEADER
565  */
566 
567 /* 0: Hardware Unit Definition */
568 
569 typedef struct acpi_dmar_hardware_unit
570 {
571     ACPI_DMAR_HEADER        Header;
572     UINT8                   Flags;
573     UINT8                   Reserved;
574     UINT16                  Segment;
575     UINT64                  Address;            /* Register Base Address */
576 
577 } ACPI_DMAR_HARDWARE_UNIT;
578 
579 /* Masks for Flags field above */
580 
581 #define ACPI_DMAR_INCLUDE_ALL       (1)
582 
583 
584 /* 1: Reserved Memory Defininition */
585 
586 typedef struct acpi_dmar_reserved_memory
587 {
588     ACPI_DMAR_HEADER        Header;
589     UINT16                  Reserved;
590     UINT16                  Segment;
591     UINT64                  BaseAddress;        /* 4K aligned base address */
592     UINT64                  EndAddress;         /* 4K aligned limit address */
593 
594 } ACPI_DMAR_RESERVED_MEMORY;
595 
596 /* Masks for Flags field above */
597 
598 #define ACPI_DMAR_ALLOW_ALL         (1)
599 
600 
601 /* 2: Root Port ATS Capability Reporting Structure */
602 
603 typedef struct acpi_dmar_atsr
604 {
605     ACPI_DMAR_HEADER        Header;
606     UINT8                   Flags;
607     UINT8                   Reserved;
608     UINT16                  Segment;
609 
610 } ACPI_DMAR_ATSR;
611 
612 /* Masks for Flags field above */
613 
614 #define ACPI_DMAR_ALL_PORTS         (1)
615 
616 
617 /* 3: Remapping Hardware Static Affinity Structure */
618 
619 typedef struct acpi_dmar_rhsa
620 {
621     ACPI_DMAR_HEADER        Header;
622     UINT32                  Reserved;
623     UINT64                  BaseAddress;
624     UINT32                  ProximityDomain;
625 
626 } ACPI_DMAR_RHSA;
627 
628 
629 /*******************************************************************************
630  *
631  * HPET - High Precision Event Timer table
632  *        Version 1
633  *
634  * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
635  * Version 1.0a, October 2004
636  *
637  ******************************************************************************/
638 
639 typedef struct acpi_table_hpet
640 {
641     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
642     UINT32                  Id;                 /* Hardware ID of event timer block */
643     ACPI_GENERIC_ADDRESS    Address;            /* Address of event timer block */
644     UINT8                   Sequence;           /* HPET sequence number */
645     UINT16                  MinimumTick;        /* Main counter min tick, periodic mode */
646     UINT8                   Flags;
647 
648 } ACPI_TABLE_HPET;
649 
650 /* Masks for Flags field above */
651 
652 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
653 
654 /* Values for Page Protect flags */
655 
656 enum AcpiHpetPageProtect
657 {
658     ACPI_HPET_NO_PAGE_PROTECT       = 0,
659     ACPI_HPET_PAGE_PROTECT4         = 1,
660     ACPI_HPET_PAGE_PROTECT64        = 2
661 };
662 
663 
664 /*******************************************************************************
665  *
666  * IBFT - Boot Firmware Table
667  *        Version 1
668  *
669  * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
670  * Specification", Version 1.01, March 1, 2007
671  *
672  * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
673  * Therefore, it is not currently supported by the disassembler.
674  *
675  ******************************************************************************/
676 
677 typedef struct acpi_table_ibft
678 {
679     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
680     UINT8                   Reserved[12];
681 
682 } ACPI_TABLE_IBFT;
683 
684 
685 /* IBFT common subtable header */
686 
687 typedef struct acpi_ibft_header
688 {
689     UINT8                   Type;
690     UINT8                   Version;
691     UINT16                  Length;
692     UINT8                   Index;
693     UINT8                   Flags;
694 
695 } ACPI_IBFT_HEADER;
696 
697 /* Values for Type field above */
698 
699 enum AcpiIbftType
700 {
701     ACPI_IBFT_TYPE_NOT_USED         = 0,
702     ACPI_IBFT_TYPE_CONTROL          = 1,
703     ACPI_IBFT_TYPE_INITIATOR        = 2,
704     ACPI_IBFT_TYPE_NIC              = 3,
705     ACPI_IBFT_TYPE_TARGET           = 4,
706     ACPI_IBFT_TYPE_EXTENSIONS       = 5,
707     ACPI_IBFT_TYPE_RESERVED         = 6     /* 6 and greater are reserved */
708 };
709 
710 
711 /* IBFT subtables */
712 
713 typedef struct acpi_ibft_control
714 {
715     ACPI_IBFT_HEADER        Header;
716     UINT16                  Extensions;
717     UINT16                  InitiatorOffset;
718     UINT16                  Nic0Offset;
719     UINT16                  Target0Offset;
720     UINT16                  Nic1Offset;
721     UINT16                  Target1Offset;
722 
723 } ACPI_IBFT_CONTROL;
724 
725 typedef struct acpi_ibft_initiator
726 {
727     ACPI_IBFT_HEADER        Header;
728     UINT8                   SnsServer[16];
729     UINT8                   SlpServer[16];
730     UINT8                   PrimaryServer[16];
731     UINT8                   SecondaryServer[16];
732     UINT16                  NameLength;
733     UINT16                  NameOffset;
734 
735 } ACPI_IBFT_INITIATOR;
736 
737 typedef struct acpi_ibft_nic
738 {
739     ACPI_IBFT_HEADER        Header;
740     UINT8                   IpAddress[16];
741     UINT8                   SubnetMaskPrefix;
742     UINT8                   Origin;
743     UINT8                   Gateway[16];
744     UINT8                   PrimaryDns[16];
745     UINT8                   SecondaryDns[16];
746     UINT8                   Dhcp[16];
747     UINT16                  Vlan;
748     UINT8                   MacAddress[6];
749     UINT16                  PciAddress;
750     UINT16                  NameLength;
751     UINT16                  NameOffset;
752 
753 } ACPI_IBFT_NIC;
754 
755 typedef struct acpi_ibft_target
756 {
757     ACPI_IBFT_HEADER        Header;
758     UINT8                   TargetIpAddress[16];
759     UINT16                  TargetIpSocket;
760     UINT8                   TargetBootLun[8];
761     UINT8                   ChapType;
762     UINT8                   NicAssociation;
763     UINT16                  TargetNameLength;
764     UINT16                  TargetNameOffset;
765     UINT16                  ChapNameLength;
766     UINT16                  ChapNameOffset;
767     UINT16                  ChapSecretLength;
768     UINT16                  ChapSecretOffset;
769     UINT16                  ReverseChapNameLength;
770     UINT16                  ReverseChapNameOffset;
771     UINT16                  ReverseChapSecretLength;
772     UINT16                  ReverseChapSecretOffset;
773 
774 } ACPI_IBFT_TARGET;
775 
776 
777 /*******************************************************************************
778  *
779  * IVRS - I/O Virtualization Reporting Structure
780  *        Version 1
781  *
782  * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
783  * Revision 1.26, February 2009.
784  *
785  ******************************************************************************/
786 
787 typedef struct acpi_table_ivrs
788 {
789     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
790     UINT32                  Info;               /* Common virtualization info */
791     UINT64                  Reserved;
792 
793 } ACPI_TABLE_IVRS;
794 
795 /* Values for Info field above */
796 
797 #define ACPI_IVRS_PHYSICAL_SIZE     0x00007F00  /* 7 bits, physical address size */
798 #define ACPI_IVRS_VIRTUAL_SIZE      0x003F8000  /* 7 bits, virtual address size */
799 #define ACPI_IVRS_ATS_RESERVED      0x00400000  /* ATS address translation range reserved */
800 
801 
802 /* IVRS subtable header */
803 
804 typedef struct acpi_ivrs_header
805 {
806     UINT8                   Type;               /* Subtable type */
807     UINT8                   Flags;
808     UINT16                  Length;             /* Subtable length */
809     UINT16                  DeviceId;           /* ID of IOMMU */
810 
811 } ACPI_IVRS_HEADER;
812 
813 /* Values for subtable Type above */
814 
815 enum AcpiIvrsType
816 {
817     ACPI_IVRS_TYPE_HARDWARE         = 0x10,
818     ACPI_IVRS_TYPE_MEMORY1          = 0x20,
819     ACPI_IVRS_TYPE_MEMORY2          = 0x21,
820     ACPI_IVRS_TYPE_MEMORY3          = 0x22
821 };
822 
823 /* Masks for Flags field above for IVHD subtable */
824 
825 #define ACPI_IVHD_TT_ENABLE         (1)
826 #define ACPI_IVHD_PASS_PW           (1<<1)
827 #define ACPI_IVHD_RES_PASS_PW       (1<<2)
828 #define ACPI_IVHD_ISOC              (1<<3)
829 #define ACPI_IVHD_IOTLB             (1<<4)
830 
831 /* Masks for Flags field above for IVMD subtable */
832 
833 #define ACPI_IVMD_UNITY             (1)
834 #define ACPI_IVMD_READ              (1<<1)
835 #define ACPI_IVMD_WRITE             (1<<2)
836 #define ACPI_IVMD_EXCLUSION_RANGE   (1<<3)
837 
838 
839 /*
840  * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
841  */
842 
843 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
844 
845 typedef struct acpi_ivrs_hardware
846 {
847     ACPI_IVRS_HEADER        Header;
848     UINT16                  CapabilityOffset;   /* Offset for IOMMU control fields */
849     UINT64                  BaseAddress;        /* IOMMU control registers */
850     UINT16                  PciSegmentGroup;
851     UINT16                  Info;               /* MSI number and unit ID */
852     UINT32                  Reserved;
853 
854 } ACPI_IVRS_HARDWARE;
855 
856 /* Masks for Info field above */
857 
858 #define ACPI_IVHD_MSI_NUMBER_MASK   0x001F      /* 5 bits, MSI message number */
859 #define ACPI_IVHD_UNIT_ID_MASK      0x1F00      /* 5 bits, UnitID */
860 
861 
862 /*
863  * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
864  * Upper two bits of the Type field are the (encoded) length of the structure.
865  * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
866  * are reserved for future use but not defined.
867  */
868 typedef struct acpi_ivrs_de_header
869 {
870     UINT8                   Type;
871     UINT16                  Id;
872     UINT8                   DataSetting;
873 
874 } ACPI_IVRS_DE_HEADER;
875 
876 /* Length of device entry is in the top two bits of Type field above */
877 
878 #define ACPI_IVHD_ENTRY_LENGTH      0xC0
879 
880 /* Values for device entry Type field above */
881 
882 enum AcpiIvrsDeviceEntryType
883 {
884     /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
885 
886     ACPI_IVRS_TYPE_PAD4             = 0,
887     ACPI_IVRS_TYPE_ALL              = 1,
888     ACPI_IVRS_TYPE_SELECT           = 2,
889     ACPI_IVRS_TYPE_START            = 3,
890     ACPI_IVRS_TYPE_END              = 4,
891 
892     /* 8-byte device entries */
893 
894     ACPI_IVRS_TYPE_PAD8             = 64,
895     ACPI_IVRS_TYPE_NOT_USED         = 65,
896     ACPI_IVRS_TYPE_ALIAS_SELECT     = 66, /* Uses ACPI_IVRS_DEVICE8A */
897     ACPI_IVRS_TYPE_ALIAS_START      = 67, /* Uses ACPI_IVRS_DEVICE8A */
898     ACPI_IVRS_TYPE_EXT_SELECT       = 70, /* Uses ACPI_IVRS_DEVICE8B */
899     ACPI_IVRS_TYPE_EXT_START        = 71, /* Uses ACPI_IVRS_DEVICE8B */
900     ACPI_IVRS_TYPE_SPECIAL          = 72  /* Uses ACPI_IVRS_DEVICE8C */
901 };
902 
903 /* Values for Data field above */
904 
905 #define ACPI_IVHD_INIT_PASS         (1)
906 #define ACPI_IVHD_EINT_PASS         (1<<1)
907 #define ACPI_IVHD_NMI_PASS          (1<<2)
908 #define ACPI_IVHD_SYSTEM_MGMT       (3<<4)
909 #define ACPI_IVHD_LINT0_PASS        (1<<6)
910 #define ACPI_IVHD_LINT1_PASS        (1<<7)
911 
912 
913 /* Types 0-4: 4-byte device entry */
914 
915 typedef struct acpi_ivrs_device4
916 {
917     ACPI_IVRS_DE_HEADER     Header;
918 
919 } ACPI_IVRS_DEVICE4;
920 
921 /* Types 66-67: 8-byte device entry */
922 
923 typedef struct acpi_ivrs_device8a
924 {
925     ACPI_IVRS_DE_HEADER     Header;
926     UINT8                   Reserved1;
927     UINT16                  UsedId;
928     UINT8                   Reserved2;
929 
930 } ACPI_IVRS_DEVICE8A;
931 
932 /* Types 70-71: 8-byte device entry */
933 
934 typedef struct acpi_ivrs_device8b
935 {
936     ACPI_IVRS_DE_HEADER     Header;
937     UINT32                  ExtendedData;
938 
939 } ACPI_IVRS_DEVICE8B;
940 
941 /* Values for ExtendedData above */
942 
943 #define ACPI_IVHD_ATS_DISABLED      (1<<31)
944 
945 /* Type 72: 8-byte device entry */
946 
947 typedef struct acpi_ivrs_device8c
948 {
949     ACPI_IVRS_DE_HEADER     Header;
950     UINT8                   Handle;
951     UINT16                  UsedId;
952     UINT8                   Variety;
953 
954 } ACPI_IVRS_DEVICE8C;
955 
956 /* Values for Variety field above */
957 
958 #define ACPI_IVHD_IOAPIC            1
959 #define ACPI_IVHD_HPET              2
960 
961 
962 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
963 
964 typedef struct acpi_ivrs_memory
965 {
966     ACPI_IVRS_HEADER        Header;
967     UINT16                  AuxData;
968     UINT64                  Reserved;
969     UINT64                  StartAddress;
970     UINT64                  MemoryLength;
971 
972 } ACPI_IVRS_MEMORY;
973 
974 
975 /*******************************************************************************
976  *
977  * MCFG - PCI Memory Mapped Configuration table and sub-table
978  *        Version 1
979  *
980  * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
981  *
982  ******************************************************************************/
983 
984 typedef struct acpi_table_mcfg
985 {
986     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
987     UINT8                   Reserved[8];
988 
989 } ACPI_TABLE_MCFG;
990 
991 
992 /* Subtable */
993 
994 typedef struct acpi_mcfg_allocation
995 {
996     UINT64                  Address;            /* Base address, processor-relative */
997     UINT16                  PciSegment;         /* PCI segment group number */
998     UINT8                   StartBusNumber;     /* Starting PCI Bus number */
999     UINT8                   EndBusNumber;       /* Final PCI Bus number */
1000     UINT32                  Reserved;
1001 
1002 } ACPI_MCFG_ALLOCATION;
1003 
1004 
1005 /*******************************************************************************
1006  *
1007  * MCHI - Management Controller Host Interface Table
1008  *        Version 1
1009  *
1010  * Conforms to "Management Component Transport Protocol (MCTP) Host
1011  * Interface Specification", Revision 1.0.0a, October 13, 2009
1012  *
1013  ******************************************************************************/
1014 
1015 typedef struct acpi_table_mchi
1016 {
1017     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1018     UINT8                   InterfaceType;
1019     UINT8                   Protocol;
1020     UINT64                  ProtocolData;
1021     UINT8                   InterruptType;
1022     UINT8                   Gpe;
1023     UINT8                   PciDeviceFlag;
1024     UINT32                  GlobalInterrupt;
1025     ACPI_GENERIC_ADDRESS    ControlRegister;
1026     UINT8                   PciSegment;
1027     UINT8                   PciBus;
1028     UINT8                   PciDevice;
1029     UINT8                   PciFunction;
1030 
1031 } ACPI_TABLE_MCHI;
1032 
1033 
1034 /*******************************************************************************
1035  *
1036  * SLIC - Software Licensing Description Table
1037  *        Version 1
1038  *
1039  * Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems",
1040  * Copyright 2006
1041  *
1042  ******************************************************************************/
1043 
1044 /* Basic SLIC table is only the common ACPI header */
1045 
1046 typedef struct acpi_table_slic
1047 {
1048     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1049 
1050 } ACPI_TABLE_SLIC;
1051 
1052 
1053 /* Common SLIC subtable header */
1054 
1055 typedef struct acpi_slic_header
1056 {
1057     UINT32                  Type;
1058     UINT32                  Length;
1059 
1060 } ACPI_SLIC_HEADER;
1061 
1062 /* Values for Type field above */
1063 
1064 enum AcpiSlicType
1065 {
1066     ACPI_SLIC_TYPE_PUBLIC_KEY           = 0,
1067     ACPI_SLIC_TYPE_WINDOWS_MARKER       = 1,
1068     ACPI_SLIC_TYPE_RESERVED             = 2    /* 2 and greater are reserved */
1069 };
1070 
1071 
1072 /*
1073  * SLIC Sub-tables, correspond to Type in ACPI_SLIC_HEADER
1074  */
1075 
1076 /* 0: Public Key Structure */
1077 
1078 typedef struct acpi_slic_key
1079 {
1080     ACPI_SLIC_HEADER        Header;
1081     UINT8                   KeyType;
1082     UINT8                   Version;
1083     UINT16                  Reserved;
1084     UINT32                  Algorithm;
1085     char                    Magic[4];
1086     UINT32                  BitLength;
1087     UINT32                  Exponent;
1088     UINT8                   Modulus[128];
1089 
1090 } ACPI_SLIC_KEY;
1091 
1092 
1093 /* 1: Windows Marker Structure */
1094 
1095 typedef struct acpi_slic_marker
1096 {
1097     ACPI_SLIC_HEADER        Header;
1098     UINT32                  Version;
1099     char                    OemId[ACPI_OEM_ID_SIZE];            /* ASCII OEM identification */
1100     char                    OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
1101     char                    WindowsFlag[8];
1102     UINT32                  SlicVersion;
1103     UINT8                   Reserved[16];
1104     UINT8                   Signature[128];
1105 
1106 } ACPI_SLIC_MARKER;
1107 
1108 
1109 /*******************************************************************************
1110  *
1111  * SPCR - Serial Port Console Redirection table
1112  *        Version 1
1113  *
1114  * Conforms to "Serial Port Console Redirection Table",
1115  * Version 1.00, January 11, 2002
1116  *
1117  ******************************************************************************/
1118 
1119 typedef struct acpi_table_spcr
1120 {
1121     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1122     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
1123     UINT8                   Reserved[3];
1124     ACPI_GENERIC_ADDRESS    SerialPort;
1125     UINT8                   InterruptType;
1126     UINT8                   PcInterrupt;
1127     UINT32                  Interrupt;
1128     UINT8                   BaudRate;
1129     UINT8                   Parity;
1130     UINT8                   StopBits;
1131     UINT8                   FlowControl;
1132     UINT8                   TerminalType;
1133     UINT8                   Reserved1;
1134     UINT16                  PciDeviceId;
1135     UINT16                  PciVendorId;
1136     UINT8                   PciBus;
1137     UINT8                   PciDevice;
1138     UINT8                   PciFunction;
1139     UINT32                  PciFlags;
1140     UINT8                   PciSegment;
1141     UINT32                  Reserved2;
1142 
1143 } ACPI_TABLE_SPCR;
1144 
1145 /* Masks for PciFlags field above */
1146 
1147 #define ACPI_SPCR_DO_NOT_DISABLE    (1)
1148 
1149 
1150 /*******************************************************************************
1151  *
1152  * SPMI - Server Platform Management Interface table
1153  *        Version 5
1154  *
1155  * Conforms to "Intelligent Platform Management Interface Specification
1156  * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
1157  * June 12, 2009 markup.
1158  *
1159  ******************************************************************************/
1160 
1161 typedef struct acpi_table_spmi
1162 {
1163     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1164     UINT8                   InterfaceType;
1165     UINT8                   Reserved;           /* Must be 1 */
1166     UINT16                  SpecRevision;       /* Version of IPMI */
1167     UINT8                   InterruptType;
1168     UINT8                   GpeNumber;          /* GPE assigned */
1169     UINT8                   Reserved1;
1170     UINT8                   PciDeviceFlag;
1171     UINT32                  Interrupt;
1172     ACPI_GENERIC_ADDRESS    IpmiRegister;
1173     UINT8                   PciSegment;
1174     UINT8                   PciBus;
1175     UINT8                   PciDevice;
1176     UINT8                   PciFunction;
1177     UINT8                   Reserved2;
1178 
1179 } ACPI_TABLE_SPMI;
1180 
1181 /* Values for InterfaceType above */
1182 
1183 enum AcpiSpmiInterfaceTypes
1184 {
1185     ACPI_SPMI_NOT_USED              = 0,
1186     ACPI_SPMI_KEYBOARD              = 1,
1187     ACPI_SPMI_SMI                   = 2,
1188     ACPI_SPMI_BLOCK_TRANSFER        = 3,
1189     ACPI_SPMI_SMBUS                 = 4,
1190     ACPI_SPMI_RESERVED              = 5         /* 5 and above are reserved */
1191 };
1192 
1193 
1194 /*******************************************************************************
1195  *
1196  * TCPA - Trusted Computing Platform Alliance table
1197  *        Version 1
1198  *
1199  * Conforms to "TCG PC Specific Implementation Specification",
1200  * Version 1.1, August 18, 2003
1201  *
1202  ******************************************************************************/
1203 
1204 typedef struct acpi_table_tcpa
1205 {
1206     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1207     UINT16                  Reserved;
1208     UINT32                  MaxLogLength;       /* Maximum length for the event log area */
1209     UINT64                  LogAddress;         /* Address of the event log area */
1210 
1211 } ACPI_TABLE_TCPA;
1212 
1213 
1214 /*******************************************************************************
1215  *
1216  * UEFI - UEFI Boot optimization Table
1217  *        Version 1
1218  *
1219  * Conforms to "Unified Extensible Firmware Interface Specification",
1220  * Version 2.3, May 8, 2009
1221  *
1222  ******************************************************************************/
1223 
1224 typedef struct acpi_table_uefi
1225 {
1226     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1227     UINT8                   Identifier[16];     /* UUID identifier */
1228     UINT16                  DataOffset;         /* Offset of remaining data in table */
1229 
1230 } ACPI_TABLE_UEFI;
1231 
1232 
1233 /*******************************************************************************
1234  *
1235  * WAET - Windows ACPI Emulated devices Table
1236  *        Version 1
1237  *
1238  * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
1239  *
1240  ******************************************************************************/
1241 
1242 typedef struct acpi_table_waet
1243 {
1244     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1245     UINT32                  Flags;
1246 
1247 } ACPI_TABLE_WAET;
1248 
1249 /* Masks for Flags field above */
1250 
1251 #define ACPI_WAET_RTC_NO_ACK        (1)         /* RTC requires no int acknowledge */
1252 #define ACPI_WAET_TIMER_ONE_READ    (1<<1)      /* PM timer requires only one read */
1253 
1254 
1255 /*******************************************************************************
1256  *
1257  * WDAT - Watchdog Action Table
1258  *        Version 1
1259  *
1260  * Conforms to "Hardware Watchdog Timers Design Specification",
1261  * Copyright 2006 Microsoft Corporation.
1262  *
1263  ******************************************************************************/
1264 
1265 typedef struct acpi_table_wdat
1266 {
1267     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1268     UINT32                  HeaderLength;       /* Watchdog Header Length */
1269     UINT16                  PciSegment;         /* PCI Segment number */
1270     UINT8                   PciBus;             /* PCI Bus number */
1271     UINT8                   PciDevice;          /* PCI Device number */
1272     UINT8                   PciFunction;        /* PCI Function number */
1273     UINT8                   Reserved[3];
1274     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
1275     UINT32                  MaxCount;           /* Maximum counter value supported */
1276     UINT32                  MinCount;           /* Minimum counter value */
1277     UINT8                   Flags;
1278     UINT8                   Reserved2[3];
1279     UINT32                  Entries;            /* Number of watchdog entries that follow */
1280 
1281 } ACPI_TABLE_WDAT;
1282 
1283 /* Masks for Flags field above */
1284 
1285 #define ACPI_WDAT_ENABLED           (1)
1286 #define ACPI_WDAT_STOPPED           0x80
1287 
1288 
1289 /* WDAT Instruction Entries (actions) */
1290 
1291 typedef struct acpi_wdat_entry
1292 {
1293     UINT8                   Action;
1294     UINT8                   Instruction;
1295     UINT16                  Reserved;
1296     ACPI_GENERIC_ADDRESS    RegisterRegion;
1297     UINT32                  Value;              /* Value used with Read/Write register */
1298     UINT32                  Mask;               /* Bitmask required for this register instruction */
1299 
1300 } ACPI_WDAT_ENTRY;
1301 
1302 /* Values for Action field above */
1303 
1304 enum AcpiWdatActions
1305 {
1306     ACPI_WDAT_RESET                 = 1,
1307     ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1308     ACPI_WDAT_GET_COUNTDOWN         = 5,
1309     ACPI_WDAT_SET_COUNTDOWN         = 6,
1310     ACPI_WDAT_GET_RUNNING_STATE     = 8,
1311     ACPI_WDAT_SET_RUNNING_STATE     = 9,
1312     ACPI_WDAT_GET_STOPPED_STATE     = 10,
1313     ACPI_WDAT_SET_STOPPED_STATE     = 11,
1314     ACPI_WDAT_GET_REBOOT            = 16,
1315     ACPI_WDAT_SET_REBOOT            = 17,
1316     ACPI_WDAT_GET_SHUTDOWN          = 18,
1317     ACPI_WDAT_SET_SHUTDOWN          = 19,
1318     ACPI_WDAT_GET_STATUS            = 32,
1319     ACPI_WDAT_SET_STATUS            = 33,
1320     ACPI_WDAT_ACTION_RESERVED       = 34    /* 34 and greater are reserved */
1321 };
1322 
1323 /* Values for Instruction field above */
1324 
1325 enum AcpiWdatInstructions
1326 {
1327     ACPI_WDAT_READ_VALUE            = 0,
1328     ACPI_WDAT_READ_COUNTDOWN        = 1,
1329     ACPI_WDAT_WRITE_VALUE           = 2,
1330     ACPI_WDAT_WRITE_COUNTDOWN       = 3,
1331     ACPI_WDAT_INSTRUCTION_RESERVED  = 4,    /* 4 and greater are reserved */
1332     ACPI_WDAT_PRESERVE_REGISTER     = 0x80  /* Except for this value */
1333 };
1334 
1335 
1336 /*******************************************************************************
1337  *
1338  * WDDT - Watchdog Descriptor Table
1339  *        Version 1
1340  *
1341  * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
1342  * Version 001, September 2002
1343  *
1344  ******************************************************************************/
1345 
1346 typedef struct acpi_table_wddt
1347 {
1348     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1349     UINT16                  SpecVersion;
1350     UINT16                  TableVersion;
1351     UINT16                  PciVendorId;
1352     ACPI_GENERIC_ADDRESS    Address;
1353     UINT16                  MaxCount;           /* Maximum counter value supported */
1354     UINT16                  MinCount;           /* Minimum counter value supported */
1355     UINT16                  Period;
1356     UINT16                  Status;
1357     UINT16                  Capability;
1358 
1359 } ACPI_TABLE_WDDT;
1360 
1361 /* Flags for Status field above */
1362 
1363 #define ACPI_WDDT_AVAILABLE     (1)
1364 #define ACPI_WDDT_ACTIVE        (1<<1)
1365 #define ACPI_WDDT_TCO_OS_OWNED  (1<<2)
1366 #define ACPI_WDDT_USER_RESET    (1<<11)
1367 #define ACPI_WDDT_WDT_RESET     (1<<12)
1368 #define ACPI_WDDT_POWER_FAIL    (1<<13)
1369 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
1370 
1371 /* Flags for Capability field above */
1372 
1373 #define ACPI_WDDT_AUTO_RESET    (1)
1374 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
1375 
1376 
1377 /*******************************************************************************
1378  *
1379  * WDRT - Watchdog Resource Table
1380  *        Version 1
1381  *
1382  * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
1383  * Version 1.01, August 28, 2006
1384  *
1385  ******************************************************************************/
1386 
1387 typedef struct acpi_table_wdrt
1388 {
1389     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1390     ACPI_GENERIC_ADDRESS    ControlRegister;
1391     ACPI_GENERIC_ADDRESS    CountRegister;
1392     UINT16                  PciDeviceId;
1393     UINT16                  PciVendorId;
1394     UINT8                   PciBus;             /* PCI Bus number */
1395     UINT8                   PciDevice;          /* PCI Device number */
1396     UINT8                   PciFunction;        /* PCI Function number */
1397     UINT8                   PciSegment;         /* PCI Segment number */
1398     UINT16                  MaxCount;           /* Maximum counter value supported */
1399     UINT8                   Units;
1400 
1401 } ACPI_TABLE_WDRT;
1402 
1403 
1404 /* Reset to default packing */
1405 
1406 #pragma pack()
1407 
1408 #endif /* __ACTBL2_H__ */
1409