xref: /haiku/src/add-ons/kernel/bus_managers/acpi/acpica/include/actbl2.h (revision 37fedaf8494b34aad811abcc49e79aa32943f880)
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 - 2013, 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_MTMR           "MTMR"      /* MID Timer table */
150 #define ACPI_SIG_SLIC           "SLIC"      /* Software Licensing Description Table */
151 #define ACPI_SIG_SPCR           "SPCR"      /* Serial Port Console Redirection table */
152 #define ACPI_SIG_SPMI           "SPMI"      /* Server Platform Management Interface table */
153 #define ACPI_SIG_TCPA           "TCPA"      /* Trusted Computing Platform Alliance table */
154 #define ACPI_SIG_UEFI           "UEFI"      /* Uefi Boot Optimization Table */
155 #define ACPI_SIG_VRTC           "VRTC"      /* Virtual Real Time Clock Table */
156 #define ACPI_SIG_WAET           "WAET"      /* Windows ACPI Emulated devices Table */
157 #define ACPI_SIG_WDAT           "WDAT"      /* Watchdog Action Table */
158 #define ACPI_SIG_WDDT           "WDDT"      /* Watchdog Timer Description Table */
159 #define ACPI_SIG_WDRT           "WDRT"      /* Watchdog Resource Table */
160 
161 #ifdef ACPI_UNDEFINED_TABLES
162 /*
163  * These tables have been seen in the field, but no definition has been found
164  */
165 #define ACPI_SIG_ATKG           "ATKG"
166 #define ACPI_SIG_GSCI           "GSCI"      /* GMCH SCI table */
167 #define ACPI_SIG_IEIT           "IEIT"
168 #endif
169 
170 /*
171  * All tables must be byte-packed to match the ACPI specification, since
172  * the tables are provided by the system BIOS.
173  */
174 #pragma pack(1)
175 
176 /*
177  * Note: C bitfields are not used for this reason:
178  *
179  * "Bitfields are great and easy to read, but unfortunately the C language
180  * does not specify the layout of bitfields in memory, which means they are
181  * essentially useless for dealing with packed data in on-disk formats or
182  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
183  * this decision was a design error in C. Ritchie could have picked an order
184  * and stuck with it." Norman Ramsey.
185  * See http://stackoverflow.com/a/1053662/41661
186  */
187 
188 
189 /*******************************************************************************
190  *
191  * ASF - Alert Standard Format table (Signature "ASF!")
192  *       Revision 0x10
193  *
194  * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
195  *
196  ******************************************************************************/
197 
198 typedef struct acpi_table_asf
199 {
200     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
201 
202 } ACPI_TABLE_ASF;
203 
204 
205 /* ASF subtable header */
206 
207 typedef struct acpi_asf_header
208 {
209     UINT8                   Type;
210     UINT8                   Reserved;
211     UINT16                  Length;
212 
213 } ACPI_ASF_HEADER;
214 
215 
216 /* Values for Type field above */
217 
218 enum AcpiAsfType
219 {
220     ACPI_ASF_TYPE_INFO          = 0,
221     ACPI_ASF_TYPE_ALERT         = 1,
222     ACPI_ASF_TYPE_CONTROL       = 2,
223     ACPI_ASF_TYPE_BOOT          = 3,
224     ACPI_ASF_TYPE_ADDRESS       = 4,
225     ACPI_ASF_TYPE_RESERVED      = 5
226 };
227 
228 /*
229  * ASF subtables
230  */
231 
232 /* 0: ASF Information */
233 
234 typedef struct acpi_asf_info
235 {
236     ACPI_ASF_HEADER         Header;
237     UINT8                   MinResetValue;
238     UINT8                   MinPollInterval;
239     UINT16                  SystemId;
240     UINT32                  MfgId;
241     UINT8                   Flags;
242     UINT8                   Reserved2[3];
243 
244 } ACPI_ASF_INFO;
245 
246 /* Masks for Flags field above */
247 
248 #define ACPI_ASF_SMBUS_PROTOCOLS    (1)
249 
250 
251 /* 1: ASF Alerts */
252 
253 typedef struct acpi_asf_alert
254 {
255     ACPI_ASF_HEADER         Header;
256     UINT8                   AssertMask;
257     UINT8                   DeassertMask;
258     UINT8                   Alerts;
259     UINT8                   DataLength;
260 
261 } ACPI_ASF_ALERT;
262 
263 typedef struct acpi_asf_alert_data
264 {
265     UINT8                   Address;
266     UINT8                   Command;
267     UINT8                   Mask;
268     UINT8                   Value;
269     UINT8                   SensorType;
270     UINT8                   Type;
271     UINT8                   Offset;
272     UINT8                   SourceType;
273     UINT8                   Severity;
274     UINT8                   SensorNumber;
275     UINT8                   Entity;
276     UINT8                   Instance;
277 
278 } ACPI_ASF_ALERT_DATA;
279 
280 
281 /* 2: ASF Remote Control */
282 
283 typedef struct acpi_asf_remote
284 {
285     ACPI_ASF_HEADER         Header;
286     UINT8                   Controls;
287     UINT8                   DataLength;
288     UINT16                  Reserved2;
289 
290 } ACPI_ASF_REMOTE;
291 
292 typedef struct acpi_asf_control_data
293 {
294     UINT8                   Function;
295     UINT8                   Address;
296     UINT8                   Command;
297     UINT8                   Value;
298 
299 } ACPI_ASF_CONTROL_DATA;
300 
301 
302 /* 3: ASF RMCP Boot Options */
303 
304 typedef struct acpi_asf_rmcp
305 {
306     ACPI_ASF_HEADER         Header;
307     UINT8                   Capabilities[7];
308     UINT8                   CompletionCode;
309     UINT32                  EnterpriseId;
310     UINT8                   Command;
311     UINT16                  Parameter;
312     UINT16                  BootOptions;
313     UINT16                  OemParameters;
314 
315 } ACPI_ASF_RMCP;
316 
317 
318 /* 4: ASF Address */
319 
320 typedef struct acpi_asf_address
321 {
322     ACPI_ASF_HEADER         Header;
323     UINT8                   EpromAddress;
324     UINT8                   Devices;
325 
326 } ACPI_ASF_ADDRESS;
327 
328 
329 /*******************************************************************************
330  *
331  * BOOT - Simple Boot Flag Table
332  *        Version 1
333  *
334  * Conforms to the "Simple Boot Flag Specification", Version 2.1
335  *
336  ******************************************************************************/
337 
338 typedef struct acpi_table_boot
339 {
340     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
341     UINT8                   CmosIndex;          /* Index in CMOS RAM for the boot register */
342     UINT8                   Reserved[3];
343 
344 } ACPI_TABLE_BOOT;
345 
346 
347 /*******************************************************************************
348  *
349  * CSRT - Core System Resource Table
350  *        Version 0
351  *
352  * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
353  *
354  ******************************************************************************/
355 
356 typedef struct acpi_table_csrt
357 {
358     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
359 
360 } ACPI_TABLE_CSRT;
361 
362 
363 /* Resource Group subtable */
364 
365 typedef struct acpi_csrt_group
366 {
367     UINT32                  Length;
368     UINT32                  VendorId;
369     UINT32                  SubvendorId;
370     UINT16                  DeviceId;
371     UINT16                  SubdeviceId;
372     UINT16                  Revision;
373     UINT16                  Reserved;
374     UINT32                  SharedInfoLength;
375 
376     /* Shared data immediately follows (Length = SharedInfoLength) */
377 
378 } ACPI_CSRT_GROUP;
379 
380 /* Shared Info subtable */
381 
382 typedef struct acpi_csrt_shared_info
383 {
384     UINT16                  MajorVersion;
385     UINT16                  MinorVersion;
386     UINT32                  MmioBaseLow;
387     UINT32                  MmioBaseHigh;
388     UINT32                  GsiInterrupt;
389     UINT8                   InterruptPolarity;
390     UINT8                   InterruptMode;
391     UINT8                   NumChannels;
392     UINT8                   DmaAddressWidth;
393     UINT16                  BaseRequestLine;
394     UINT16                  NumHandshakeSignals;
395     UINT32                  MaxBlockSize;
396 
397     /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
398 
399 } ACPI_CSRT_SHARED_INFO;
400 
401 /* Resource Descriptor subtable */
402 
403 typedef struct acpi_csrt_descriptor
404 {
405     UINT32                  Length;
406     UINT16                  Type;
407     UINT16                  Subtype;
408     UINT32                  Uid;
409 
410     /* Resource-specific information immediately follows */
411 
412 } ACPI_CSRT_DESCRIPTOR;
413 
414 
415 /* Resource Types */
416 
417 #define ACPI_CSRT_TYPE_INTERRUPT    0x0001
418 #define ACPI_CSRT_TYPE_TIMER        0x0002
419 #define ACPI_CSRT_TYPE_DMA          0x0003
420 
421 /* Resource Subtypes */
422 
423 #define ACPI_CSRT_XRUPT_LINE        0x0000
424 #define ACPI_CSRT_XRUPT_CONTROLLER  0x0001
425 #define ACPI_CSRT_TIMER             0x0000
426 #define ACPI_CSRT_DMA_CHANNEL       0x0000
427 #define ACPI_CSRT_DMA_CONTROLLER    0x0001
428 
429 
430 /*******************************************************************************
431  *
432  * DBG2 - Debug Port Table 2
433  *        Version 0 (Both main table and subtables)
434  *
435  * Conforms to "Microsoft Debug Port Table 2 (DBG2)", May 22 2012.
436  *
437  ******************************************************************************/
438 
439 typedef struct acpi_table_dbg2
440 {
441     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
442     UINT32                  InfoOffset;
443     UINT32                  InfoCount;
444 
445 } ACPI_TABLE_DBG2;
446 
447 
448 /* Debug Device Information Subtable */
449 
450 typedef struct acpi_dbg2_device
451 {
452     UINT8                   Revision;
453     UINT16                  Length;
454     UINT8                   RegisterCount;      /* Number of BaseAddress registers */
455     UINT16                  NamepathLength;
456     UINT16                  NamepathOffset;
457     UINT16                  OemDataLength;
458     UINT16                  OemDataOffset;
459     UINT16                  PortType;
460     UINT16                  PortSubtype;
461     UINT16                  Reserved;
462     UINT16                  BaseAddressOffset;
463     UINT16                  AddressSizeOffset;
464     /*
465      * Data that follows:
466      *    BaseAddress (required) - Each in 12-byte Generic Address Structure format.
467      *    AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.
468      *    Namepath    (required) - Null terminated string. Single dot if not supported.
469      *    OemData     (optional) - Length is OemDataLength.
470      */
471 } ACPI_DBG2_DEVICE;
472 
473 /* Types for PortType field above */
474 
475 #define ACPI_DBG2_SERIAL_PORT       0x8000
476 #define ACPI_DBG2_1394_PORT         0x8001
477 #define ACPI_DBG2_USB_PORT          0x8002
478 #define ACPI_DBG2_NET_PORT          0x8003
479 
480 /* Subtypes for PortSubtype field above */
481 
482 #define ACPI_DBG2_16550_COMPATIBLE  0x0000
483 #define ACPI_DBG2_16550_SUBSET      0x0001
484 
485 #define ACPI_DBG2_1394_STANDARD     0x0000
486 
487 #define ACPI_DBG2_USB_XHCI          0x0000
488 #define ACPI_DBG2_USB_EHCI          0x0001
489 
490 
491 /*******************************************************************************
492  *
493  * DBGP - Debug Port table
494  *        Version 1
495  *
496  * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
497  *
498  ******************************************************************************/
499 
500 typedef struct acpi_table_dbgp
501 {
502     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
503     UINT8                   Type;               /* 0=full 16550, 1=subset of 16550 */
504     UINT8                   Reserved[3];
505     ACPI_GENERIC_ADDRESS    DebugPort;
506 
507 } ACPI_TABLE_DBGP;
508 
509 
510 /*******************************************************************************
511  *
512  * DMAR - DMA Remapping table
513  *        Version 1
514  *
515  * Conforms to "Intel Virtualization Technology for Directed I/O",
516  * Version 1.2, Sept. 2008
517  *
518  ******************************************************************************/
519 
520 typedef struct acpi_table_dmar
521 {
522     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
523     UINT8                   Width;              /* Host Address Width */
524     UINT8                   Flags;
525     UINT8                   Reserved[10];
526 
527 } ACPI_TABLE_DMAR;
528 
529 /* Masks for Flags field above */
530 
531 #define ACPI_DMAR_INTR_REMAP        (1)
532 
533 
534 /* DMAR subtable header */
535 
536 typedef struct acpi_dmar_header
537 {
538     UINT16                  Type;
539     UINT16                  Length;
540 
541 } ACPI_DMAR_HEADER;
542 
543 /* Values for subtable type in ACPI_DMAR_HEADER */
544 
545 enum AcpiDmarType
546 {
547     ACPI_DMAR_TYPE_HARDWARE_UNIT        = 0,
548     ACPI_DMAR_TYPE_RESERVED_MEMORY      = 1,
549     ACPI_DMAR_TYPE_ATSR                 = 2,
550     ACPI_DMAR_HARDWARE_AFFINITY         = 3,
551     ACPI_DMAR_TYPE_RESERVED             = 4     /* 4 and greater are reserved */
552 };
553 
554 
555 /* DMAR Device Scope structure */
556 
557 typedef struct acpi_dmar_device_scope
558 {
559     UINT8                   EntryType;
560     UINT8                   Length;
561     UINT16                  Reserved;
562     UINT8                   EnumerationId;
563     UINT8                   Bus;
564 
565 } ACPI_DMAR_DEVICE_SCOPE;
566 
567 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE */
568 
569 enum AcpiDmarScopeType
570 {
571     ACPI_DMAR_SCOPE_TYPE_NOT_USED       = 0,
572     ACPI_DMAR_SCOPE_TYPE_ENDPOINT       = 1,
573     ACPI_DMAR_SCOPE_TYPE_BRIDGE         = 2,
574     ACPI_DMAR_SCOPE_TYPE_IOAPIC         = 3,
575     ACPI_DMAR_SCOPE_TYPE_HPET           = 4,
576     ACPI_DMAR_SCOPE_TYPE_RESERVED       = 5     /* 5 and greater are reserved */
577 };
578 
579 typedef struct acpi_dmar_pci_path
580 {
581     UINT8                   Device;
582     UINT8                   Function;
583 
584 } ACPI_DMAR_PCI_PATH;
585 
586 
587 /*
588  * DMAR Sub-tables, correspond to Type in ACPI_DMAR_HEADER
589  */
590 
591 /* 0: Hardware Unit Definition */
592 
593 typedef struct acpi_dmar_hardware_unit
594 {
595     ACPI_DMAR_HEADER        Header;
596     UINT8                   Flags;
597     UINT8                   Reserved;
598     UINT16                  Segment;
599     UINT64                  Address;            /* Register Base Address */
600 
601 } ACPI_DMAR_HARDWARE_UNIT;
602 
603 /* Masks for Flags field above */
604 
605 #define ACPI_DMAR_INCLUDE_ALL       (1)
606 
607 
608 /* 1: Reserved Memory Defininition */
609 
610 typedef struct acpi_dmar_reserved_memory
611 {
612     ACPI_DMAR_HEADER        Header;
613     UINT16                  Reserved;
614     UINT16                  Segment;
615     UINT64                  BaseAddress;        /* 4K aligned base address */
616     UINT64                  EndAddress;         /* 4K aligned limit address */
617 
618 } ACPI_DMAR_RESERVED_MEMORY;
619 
620 /* Masks for Flags field above */
621 
622 #define ACPI_DMAR_ALLOW_ALL         (1)
623 
624 
625 /* 2: Root Port ATS Capability Reporting Structure */
626 
627 typedef struct acpi_dmar_atsr
628 {
629     ACPI_DMAR_HEADER        Header;
630     UINT8                   Flags;
631     UINT8                   Reserved;
632     UINT16                  Segment;
633 
634 } ACPI_DMAR_ATSR;
635 
636 /* Masks for Flags field above */
637 
638 #define ACPI_DMAR_ALL_PORTS         (1)
639 
640 
641 /* 3: Remapping Hardware Static Affinity Structure */
642 
643 typedef struct acpi_dmar_rhsa
644 {
645     ACPI_DMAR_HEADER        Header;
646     UINT32                  Reserved;
647     UINT64                  BaseAddress;
648     UINT32                  ProximityDomain;
649 
650 } ACPI_DMAR_RHSA;
651 
652 
653 /*******************************************************************************
654  *
655  * HPET - High Precision Event Timer table
656  *        Version 1
657  *
658  * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
659  * Version 1.0a, October 2004
660  *
661  ******************************************************************************/
662 
663 typedef struct acpi_table_hpet
664 {
665     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
666     UINT32                  Id;                 /* Hardware ID of event timer block */
667     ACPI_GENERIC_ADDRESS    Address;            /* Address of event timer block */
668     UINT8                   Sequence;           /* HPET sequence number */
669     UINT16                  MinimumTick;        /* Main counter min tick, periodic mode */
670     UINT8                   Flags;
671 
672 } ACPI_TABLE_HPET;
673 
674 /* Masks for Flags field above */
675 
676 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
677 
678 /* Values for Page Protect flags */
679 
680 enum AcpiHpetPageProtect
681 {
682     ACPI_HPET_NO_PAGE_PROTECT       = 0,
683     ACPI_HPET_PAGE_PROTECT4         = 1,
684     ACPI_HPET_PAGE_PROTECT64        = 2
685 };
686 
687 
688 /*******************************************************************************
689  *
690  * IBFT - Boot Firmware Table
691  *        Version 1
692  *
693  * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
694  * Specification", Version 1.01, March 1, 2007
695  *
696  * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
697  * Therefore, it is not currently supported by the disassembler.
698  *
699  ******************************************************************************/
700 
701 typedef struct acpi_table_ibft
702 {
703     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
704     UINT8                   Reserved[12];
705 
706 } ACPI_TABLE_IBFT;
707 
708 
709 /* IBFT common subtable header */
710 
711 typedef struct acpi_ibft_header
712 {
713     UINT8                   Type;
714     UINT8                   Version;
715     UINT16                  Length;
716     UINT8                   Index;
717     UINT8                   Flags;
718 
719 } ACPI_IBFT_HEADER;
720 
721 /* Values for Type field above */
722 
723 enum AcpiIbftType
724 {
725     ACPI_IBFT_TYPE_NOT_USED         = 0,
726     ACPI_IBFT_TYPE_CONTROL          = 1,
727     ACPI_IBFT_TYPE_INITIATOR        = 2,
728     ACPI_IBFT_TYPE_NIC              = 3,
729     ACPI_IBFT_TYPE_TARGET           = 4,
730     ACPI_IBFT_TYPE_EXTENSIONS       = 5,
731     ACPI_IBFT_TYPE_RESERVED         = 6     /* 6 and greater are reserved */
732 };
733 
734 
735 /* IBFT subtables */
736 
737 typedef struct acpi_ibft_control
738 {
739     ACPI_IBFT_HEADER        Header;
740     UINT16                  Extensions;
741     UINT16                  InitiatorOffset;
742     UINT16                  Nic0Offset;
743     UINT16                  Target0Offset;
744     UINT16                  Nic1Offset;
745     UINT16                  Target1Offset;
746 
747 } ACPI_IBFT_CONTROL;
748 
749 typedef struct acpi_ibft_initiator
750 {
751     ACPI_IBFT_HEADER        Header;
752     UINT8                   SnsServer[16];
753     UINT8                   SlpServer[16];
754     UINT8                   PrimaryServer[16];
755     UINT8                   SecondaryServer[16];
756     UINT16                  NameLength;
757     UINT16                  NameOffset;
758 
759 } ACPI_IBFT_INITIATOR;
760 
761 typedef struct acpi_ibft_nic
762 {
763     ACPI_IBFT_HEADER        Header;
764     UINT8                   IpAddress[16];
765     UINT8                   SubnetMaskPrefix;
766     UINT8                   Origin;
767     UINT8                   Gateway[16];
768     UINT8                   PrimaryDns[16];
769     UINT8                   SecondaryDns[16];
770     UINT8                   Dhcp[16];
771     UINT16                  Vlan;
772     UINT8                   MacAddress[6];
773     UINT16                  PciAddress;
774     UINT16                  NameLength;
775     UINT16                  NameOffset;
776 
777 } ACPI_IBFT_NIC;
778 
779 typedef struct acpi_ibft_target
780 {
781     ACPI_IBFT_HEADER        Header;
782     UINT8                   TargetIpAddress[16];
783     UINT16                  TargetIpSocket;
784     UINT8                   TargetBootLun[8];
785     UINT8                   ChapType;
786     UINT8                   NicAssociation;
787     UINT16                  TargetNameLength;
788     UINT16                  TargetNameOffset;
789     UINT16                  ChapNameLength;
790     UINT16                  ChapNameOffset;
791     UINT16                  ChapSecretLength;
792     UINT16                  ChapSecretOffset;
793     UINT16                  ReverseChapNameLength;
794     UINT16                  ReverseChapNameOffset;
795     UINT16                  ReverseChapSecretLength;
796     UINT16                  ReverseChapSecretOffset;
797 
798 } ACPI_IBFT_TARGET;
799 
800 
801 /*******************************************************************************
802  *
803  * IVRS - I/O Virtualization Reporting Structure
804  *        Version 1
805  *
806  * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
807  * Revision 1.26, February 2009.
808  *
809  ******************************************************************************/
810 
811 typedef struct acpi_table_ivrs
812 {
813     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
814     UINT32                  Info;               /* Common virtualization info */
815     UINT64                  Reserved;
816 
817 } ACPI_TABLE_IVRS;
818 
819 /* Values for Info field above */
820 
821 #define ACPI_IVRS_PHYSICAL_SIZE     0x00007F00  /* 7 bits, physical address size */
822 #define ACPI_IVRS_VIRTUAL_SIZE      0x003F8000  /* 7 bits, virtual address size */
823 #define ACPI_IVRS_ATS_RESERVED      0x00400000  /* ATS address translation range reserved */
824 
825 
826 /* IVRS subtable header */
827 
828 typedef struct acpi_ivrs_header
829 {
830     UINT8                   Type;               /* Subtable type */
831     UINT8                   Flags;
832     UINT16                  Length;             /* Subtable length */
833     UINT16                  DeviceId;           /* ID of IOMMU */
834 
835 } ACPI_IVRS_HEADER;
836 
837 /* Values for subtable Type above */
838 
839 enum AcpiIvrsType
840 {
841     ACPI_IVRS_TYPE_HARDWARE         = 0x10,
842     ACPI_IVRS_TYPE_MEMORY1          = 0x20,
843     ACPI_IVRS_TYPE_MEMORY2          = 0x21,
844     ACPI_IVRS_TYPE_MEMORY3          = 0x22
845 };
846 
847 /* Masks for Flags field above for IVHD subtable */
848 
849 #define ACPI_IVHD_TT_ENABLE         (1)
850 #define ACPI_IVHD_PASS_PW           (1<<1)
851 #define ACPI_IVHD_RES_PASS_PW       (1<<2)
852 #define ACPI_IVHD_ISOC              (1<<3)
853 #define ACPI_IVHD_IOTLB             (1<<4)
854 
855 /* Masks for Flags field above for IVMD subtable */
856 
857 #define ACPI_IVMD_UNITY             (1)
858 #define ACPI_IVMD_READ              (1<<1)
859 #define ACPI_IVMD_WRITE             (1<<2)
860 #define ACPI_IVMD_EXCLUSION_RANGE   (1<<3)
861 
862 
863 /*
864  * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
865  */
866 
867 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
868 
869 typedef struct acpi_ivrs_hardware
870 {
871     ACPI_IVRS_HEADER        Header;
872     UINT16                  CapabilityOffset;   /* Offset for IOMMU control fields */
873     UINT64                  BaseAddress;        /* IOMMU control registers */
874     UINT16                  PciSegmentGroup;
875     UINT16                  Info;               /* MSI number and unit ID */
876     UINT32                  Reserved;
877 
878 } ACPI_IVRS_HARDWARE;
879 
880 /* Masks for Info field above */
881 
882 #define ACPI_IVHD_MSI_NUMBER_MASK   0x001F      /* 5 bits, MSI message number */
883 #define ACPI_IVHD_UNIT_ID_MASK      0x1F00      /* 5 bits, UnitID */
884 
885 
886 /*
887  * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
888  * Upper two bits of the Type field are the (encoded) length of the structure.
889  * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
890  * are reserved for future use but not defined.
891  */
892 typedef struct acpi_ivrs_de_header
893 {
894     UINT8                   Type;
895     UINT16                  Id;
896     UINT8                   DataSetting;
897 
898 } ACPI_IVRS_DE_HEADER;
899 
900 /* Length of device entry is in the top two bits of Type field above */
901 
902 #define ACPI_IVHD_ENTRY_LENGTH      0xC0
903 
904 /* Values for device entry Type field above */
905 
906 enum AcpiIvrsDeviceEntryType
907 {
908     /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
909 
910     ACPI_IVRS_TYPE_PAD4             = 0,
911     ACPI_IVRS_TYPE_ALL              = 1,
912     ACPI_IVRS_TYPE_SELECT           = 2,
913     ACPI_IVRS_TYPE_START            = 3,
914     ACPI_IVRS_TYPE_END              = 4,
915 
916     /* 8-byte device entries */
917 
918     ACPI_IVRS_TYPE_PAD8             = 64,
919     ACPI_IVRS_TYPE_NOT_USED         = 65,
920     ACPI_IVRS_TYPE_ALIAS_SELECT     = 66, /* Uses ACPI_IVRS_DEVICE8A */
921     ACPI_IVRS_TYPE_ALIAS_START      = 67, /* Uses ACPI_IVRS_DEVICE8A */
922     ACPI_IVRS_TYPE_EXT_SELECT       = 70, /* Uses ACPI_IVRS_DEVICE8B */
923     ACPI_IVRS_TYPE_EXT_START        = 71, /* Uses ACPI_IVRS_DEVICE8B */
924     ACPI_IVRS_TYPE_SPECIAL          = 72  /* Uses ACPI_IVRS_DEVICE8C */
925 };
926 
927 /* Values for Data field above */
928 
929 #define ACPI_IVHD_INIT_PASS         (1)
930 #define ACPI_IVHD_EINT_PASS         (1<<1)
931 #define ACPI_IVHD_NMI_PASS          (1<<2)
932 #define ACPI_IVHD_SYSTEM_MGMT       (3<<4)
933 #define ACPI_IVHD_LINT0_PASS        (1<<6)
934 #define ACPI_IVHD_LINT1_PASS        (1<<7)
935 
936 
937 /* Types 0-4: 4-byte device entry */
938 
939 typedef struct acpi_ivrs_device4
940 {
941     ACPI_IVRS_DE_HEADER     Header;
942 
943 } ACPI_IVRS_DEVICE4;
944 
945 /* Types 66-67: 8-byte device entry */
946 
947 typedef struct acpi_ivrs_device8a
948 {
949     ACPI_IVRS_DE_HEADER     Header;
950     UINT8                   Reserved1;
951     UINT16                  UsedId;
952     UINT8                   Reserved2;
953 
954 } ACPI_IVRS_DEVICE8A;
955 
956 /* Types 70-71: 8-byte device entry */
957 
958 typedef struct acpi_ivrs_device8b
959 {
960     ACPI_IVRS_DE_HEADER     Header;
961     UINT32                  ExtendedData;
962 
963 } ACPI_IVRS_DEVICE8B;
964 
965 /* Values for ExtendedData above */
966 
967 #define ACPI_IVHD_ATS_DISABLED      (1<<31)
968 
969 /* Type 72: 8-byte device entry */
970 
971 typedef struct acpi_ivrs_device8c
972 {
973     ACPI_IVRS_DE_HEADER     Header;
974     UINT8                   Handle;
975     UINT16                  UsedId;
976     UINT8                   Variety;
977 
978 } ACPI_IVRS_DEVICE8C;
979 
980 /* Values for Variety field above */
981 
982 #define ACPI_IVHD_IOAPIC            1
983 #define ACPI_IVHD_HPET              2
984 
985 
986 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
987 
988 typedef struct acpi_ivrs_memory
989 {
990     ACPI_IVRS_HEADER        Header;
991     UINT16                  AuxData;
992     UINT64                  Reserved;
993     UINT64                  StartAddress;
994     UINT64                  MemoryLength;
995 
996 } ACPI_IVRS_MEMORY;
997 
998 
999 /*******************************************************************************
1000  *
1001  * MCFG - PCI Memory Mapped Configuration table and sub-table
1002  *        Version 1
1003  *
1004  * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
1005  *
1006  ******************************************************************************/
1007 
1008 typedef struct acpi_table_mcfg
1009 {
1010     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1011     UINT8                   Reserved[8];
1012 
1013 } ACPI_TABLE_MCFG;
1014 
1015 
1016 /* Subtable */
1017 
1018 typedef struct acpi_mcfg_allocation
1019 {
1020     UINT64                  Address;            /* Base address, processor-relative */
1021     UINT16                  PciSegment;         /* PCI segment group number */
1022     UINT8                   StartBusNumber;     /* Starting PCI Bus number */
1023     UINT8                   EndBusNumber;       /* Final PCI Bus number */
1024     UINT32                  Reserved;
1025 
1026 } ACPI_MCFG_ALLOCATION;
1027 
1028 
1029 /*******************************************************************************
1030  *
1031  * MCHI - Management Controller Host Interface Table
1032  *        Version 1
1033  *
1034  * Conforms to "Management Component Transport Protocol (MCTP) Host
1035  * Interface Specification", Revision 1.0.0a, October 13, 2009
1036  *
1037  ******************************************************************************/
1038 
1039 typedef struct acpi_table_mchi
1040 {
1041     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1042     UINT8                   InterfaceType;
1043     UINT8                   Protocol;
1044     UINT64                  ProtocolData;
1045     UINT8                   InterruptType;
1046     UINT8                   Gpe;
1047     UINT8                   PciDeviceFlag;
1048     UINT32                  GlobalInterrupt;
1049     ACPI_GENERIC_ADDRESS    ControlRegister;
1050     UINT8                   PciSegment;
1051     UINT8                   PciBus;
1052     UINT8                   PciDevice;
1053     UINT8                   PciFunction;
1054 
1055 } ACPI_TABLE_MCHI;
1056 
1057 
1058 /*******************************************************************************
1059  *
1060  * MTMR - MID Timer Table
1061  *        Version 1
1062  *
1063  * Conforms to "Simple Firmware Interface Specification",
1064  * Draft 0.8.2, Oct 19, 2010
1065  * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
1066  *
1067  ******************************************************************************/
1068 
1069 typedef struct acpi_table_mtmr
1070 {
1071     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1072 
1073 } ACPI_TABLE_MTMR;
1074 
1075 /* MTMR entry */
1076 
1077 typedef struct acpi_mtmr_entry
1078 {
1079     ACPI_GENERIC_ADDRESS    PhysicalAddress;
1080     UINT32                  Frequency;
1081     UINT32                  Irq;
1082 
1083 } ACPI_MTMR_ENTRY;
1084 
1085 
1086 /*******************************************************************************
1087  *
1088  * SLIC - Software Licensing Description Table
1089  *        Version 1
1090  *
1091  * Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems",
1092  * Copyright 2006
1093  *
1094  ******************************************************************************/
1095 
1096 /* Basic SLIC table is only the common ACPI header */
1097 
1098 typedef struct acpi_table_slic
1099 {
1100     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1101 
1102 } ACPI_TABLE_SLIC;
1103 
1104 
1105 /* Common SLIC subtable header */
1106 
1107 typedef struct acpi_slic_header
1108 {
1109     UINT32                  Type;
1110     UINT32                  Length;
1111 
1112 } ACPI_SLIC_HEADER;
1113 
1114 /* Values for Type field above */
1115 
1116 enum AcpiSlicType
1117 {
1118     ACPI_SLIC_TYPE_PUBLIC_KEY           = 0,
1119     ACPI_SLIC_TYPE_WINDOWS_MARKER       = 1,
1120     ACPI_SLIC_TYPE_RESERVED             = 2    /* 2 and greater are reserved */
1121 };
1122 
1123 
1124 /*
1125  * SLIC Sub-tables, correspond to Type in ACPI_SLIC_HEADER
1126  */
1127 
1128 /* 0: Public Key Structure */
1129 
1130 typedef struct acpi_slic_key
1131 {
1132     ACPI_SLIC_HEADER        Header;
1133     UINT8                   KeyType;
1134     UINT8                   Version;
1135     UINT16                  Reserved;
1136     UINT32                  Algorithm;
1137     char                    Magic[4];
1138     UINT32                  BitLength;
1139     UINT32                  Exponent;
1140     UINT8                   Modulus[128];
1141 
1142 } ACPI_SLIC_KEY;
1143 
1144 
1145 /* 1: Windows Marker Structure */
1146 
1147 typedef struct acpi_slic_marker
1148 {
1149     ACPI_SLIC_HEADER        Header;
1150     UINT32                  Version;
1151     char                    OemId[ACPI_OEM_ID_SIZE];            /* ASCII OEM identification */
1152     char                    OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
1153     char                    WindowsFlag[8];
1154     UINT32                  SlicVersion;
1155     UINT8                   Reserved[16];
1156     UINT8                   Signature[128];
1157 
1158 } ACPI_SLIC_MARKER;
1159 
1160 
1161 /*******************************************************************************
1162  *
1163  * SPCR - Serial Port Console Redirection table
1164  *        Version 1
1165  *
1166  * Conforms to "Serial Port Console Redirection Table",
1167  * Version 1.00, January 11, 2002
1168  *
1169  ******************************************************************************/
1170 
1171 typedef struct acpi_table_spcr
1172 {
1173     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1174     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
1175     UINT8                   Reserved[3];
1176     ACPI_GENERIC_ADDRESS    SerialPort;
1177     UINT8                   InterruptType;
1178     UINT8                   PcInterrupt;
1179     UINT32                  Interrupt;
1180     UINT8                   BaudRate;
1181     UINT8                   Parity;
1182     UINT8                   StopBits;
1183     UINT8                   FlowControl;
1184     UINT8                   TerminalType;
1185     UINT8                   Reserved1;
1186     UINT16                  PciDeviceId;
1187     UINT16                  PciVendorId;
1188     UINT8                   PciBus;
1189     UINT8                   PciDevice;
1190     UINT8                   PciFunction;
1191     UINT32                  PciFlags;
1192     UINT8                   PciSegment;
1193     UINT32                  Reserved2;
1194 
1195 } ACPI_TABLE_SPCR;
1196 
1197 /* Masks for PciFlags field above */
1198 
1199 #define ACPI_SPCR_DO_NOT_DISABLE    (1)
1200 
1201 
1202 /*******************************************************************************
1203  *
1204  * SPMI - Server Platform Management Interface table
1205  *        Version 5
1206  *
1207  * Conforms to "Intelligent Platform Management Interface Specification
1208  * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
1209  * June 12, 2009 markup.
1210  *
1211  ******************************************************************************/
1212 
1213 typedef struct acpi_table_spmi
1214 {
1215     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1216     UINT8                   InterfaceType;
1217     UINT8                   Reserved;           /* Must be 1 */
1218     UINT16                  SpecRevision;       /* Version of IPMI */
1219     UINT8                   InterruptType;
1220     UINT8                   GpeNumber;          /* GPE assigned */
1221     UINT8                   Reserved1;
1222     UINT8                   PciDeviceFlag;
1223     UINT32                  Interrupt;
1224     ACPI_GENERIC_ADDRESS    IpmiRegister;
1225     UINT8                   PciSegment;
1226     UINT8                   PciBus;
1227     UINT8                   PciDevice;
1228     UINT8                   PciFunction;
1229     UINT8                   Reserved2;
1230 
1231 } ACPI_TABLE_SPMI;
1232 
1233 /* Values for InterfaceType above */
1234 
1235 enum AcpiSpmiInterfaceTypes
1236 {
1237     ACPI_SPMI_NOT_USED              = 0,
1238     ACPI_SPMI_KEYBOARD              = 1,
1239     ACPI_SPMI_SMI                   = 2,
1240     ACPI_SPMI_BLOCK_TRANSFER        = 3,
1241     ACPI_SPMI_SMBUS                 = 4,
1242     ACPI_SPMI_RESERVED              = 5         /* 5 and above are reserved */
1243 };
1244 
1245 
1246 /*******************************************************************************
1247  *
1248  * TCPA - Trusted Computing Platform Alliance table
1249  *        Version 1
1250  *
1251  * Conforms to "TCG PC Specific Implementation Specification",
1252  * Version 1.1, August 18, 2003
1253  *
1254  ******************************************************************************/
1255 
1256 typedef struct acpi_table_tcpa
1257 {
1258     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1259     UINT16                  Reserved;
1260     UINT32                  MaxLogLength;       /* Maximum length for the event log area */
1261     UINT64                  LogAddress;         /* Address of the event log area */
1262 
1263 } ACPI_TABLE_TCPA;
1264 
1265 
1266 /*******************************************************************************
1267  *
1268  * UEFI - UEFI Boot optimization Table
1269  *        Version 1
1270  *
1271  * Conforms to "Unified Extensible Firmware Interface Specification",
1272  * Version 2.3, May 8, 2009
1273  *
1274  ******************************************************************************/
1275 
1276 typedef struct acpi_table_uefi
1277 {
1278     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1279     UINT8                   Identifier[16];     /* UUID identifier */
1280     UINT16                  DataOffset;         /* Offset of remaining data in table */
1281 
1282 } ACPI_TABLE_UEFI;
1283 
1284 
1285 /*******************************************************************************
1286  *
1287  * VRTC - Virtual Real Time Clock Table
1288  *        Version 1
1289  *
1290  * Conforms to "Simple Firmware Interface Specification",
1291  * Draft 0.8.2, Oct 19, 2010
1292  * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
1293  *
1294  ******************************************************************************/
1295 
1296 typedef struct acpi_table_vrtc
1297 {
1298     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1299 
1300 } ACPI_TABLE_VRTC;
1301 
1302 /* VRTC entry */
1303 
1304 typedef struct acpi_vrtc_entry
1305 {
1306     ACPI_GENERIC_ADDRESS    PhysicalAddress;
1307     UINT32                  Irq;
1308 
1309 } ACPI_VRTC_ENTRY;
1310 
1311 
1312 /*******************************************************************************
1313  *
1314  * WAET - Windows ACPI Emulated devices Table
1315  *        Version 1
1316  *
1317  * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
1318  *
1319  ******************************************************************************/
1320 
1321 typedef struct acpi_table_waet
1322 {
1323     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1324     UINT32                  Flags;
1325 
1326 } ACPI_TABLE_WAET;
1327 
1328 /* Masks for Flags field above */
1329 
1330 #define ACPI_WAET_RTC_NO_ACK        (1)         /* RTC requires no int acknowledge */
1331 #define ACPI_WAET_TIMER_ONE_READ    (1<<1)      /* PM timer requires only one read */
1332 
1333 
1334 /*******************************************************************************
1335  *
1336  * WDAT - Watchdog Action Table
1337  *        Version 1
1338  *
1339  * Conforms to "Hardware Watchdog Timers Design Specification",
1340  * Copyright 2006 Microsoft Corporation.
1341  *
1342  ******************************************************************************/
1343 
1344 typedef struct acpi_table_wdat
1345 {
1346     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1347     UINT32                  HeaderLength;       /* Watchdog Header Length */
1348     UINT16                  PciSegment;         /* PCI Segment number */
1349     UINT8                   PciBus;             /* PCI Bus number */
1350     UINT8                   PciDevice;          /* PCI Device number */
1351     UINT8                   PciFunction;        /* PCI Function number */
1352     UINT8                   Reserved[3];
1353     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
1354     UINT32                  MaxCount;           /* Maximum counter value supported */
1355     UINT32                  MinCount;           /* Minimum counter value */
1356     UINT8                   Flags;
1357     UINT8                   Reserved2[3];
1358     UINT32                  Entries;            /* Number of watchdog entries that follow */
1359 
1360 } ACPI_TABLE_WDAT;
1361 
1362 /* Masks for Flags field above */
1363 
1364 #define ACPI_WDAT_ENABLED           (1)
1365 #define ACPI_WDAT_STOPPED           0x80
1366 
1367 
1368 /* WDAT Instruction Entries (actions) */
1369 
1370 typedef struct acpi_wdat_entry
1371 {
1372     UINT8                   Action;
1373     UINT8                   Instruction;
1374     UINT16                  Reserved;
1375     ACPI_GENERIC_ADDRESS    RegisterRegion;
1376     UINT32                  Value;              /* Value used with Read/Write register */
1377     UINT32                  Mask;               /* Bitmask required for this register instruction */
1378 
1379 } ACPI_WDAT_ENTRY;
1380 
1381 /* Values for Action field above */
1382 
1383 enum AcpiWdatActions
1384 {
1385     ACPI_WDAT_RESET                 = 1,
1386     ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1387     ACPI_WDAT_GET_COUNTDOWN         = 5,
1388     ACPI_WDAT_SET_COUNTDOWN         = 6,
1389     ACPI_WDAT_GET_RUNNING_STATE     = 8,
1390     ACPI_WDAT_SET_RUNNING_STATE     = 9,
1391     ACPI_WDAT_GET_STOPPED_STATE     = 10,
1392     ACPI_WDAT_SET_STOPPED_STATE     = 11,
1393     ACPI_WDAT_GET_REBOOT            = 16,
1394     ACPI_WDAT_SET_REBOOT            = 17,
1395     ACPI_WDAT_GET_SHUTDOWN          = 18,
1396     ACPI_WDAT_SET_SHUTDOWN          = 19,
1397     ACPI_WDAT_GET_STATUS            = 32,
1398     ACPI_WDAT_SET_STATUS            = 33,
1399     ACPI_WDAT_ACTION_RESERVED       = 34    /* 34 and greater are reserved */
1400 };
1401 
1402 /* Values for Instruction field above */
1403 
1404 enum AcpiWdatInstructions
1405 {
1406     ACPI_WDAT_READ_VALUE            = 0,
1407     ACPI_WDAT_READ_COUNTDOWN        = 1,
1408     ACPI_WDAT_WRITE_VALUE           = 2,
1409     ACPI_WDAT_WRITE_COUNTDOWN       = 3,
1410     ACPI_WDAT_INSTRUCTION_RESERVED  = 4,    /* 4 and greater are reserved */
1411     ACPI_WDAT_PRESERVE_REGISTER     = 0x80  /* Except for this value */
1412 };
1413 
1414 
1415 /*******************************************************************************
1416  *
1417  * WDDT - Watchdog Descriptor Table
1418  *        Version 1
1419  *
1420  * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
1421  * Version 001, September 2002
1422  *
1423  ******************************************************************************/
1424 
1425 typedef struct acpi_table_wddt
1426 {
1427     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1428     UINT16                  SpecVersion;
1429     UINT16                  TableVersion;
1430     UINT16                  PciVendorId;
1431     ACPI_GENERIC_ADDRESS    Address;
1432     UINT16                  MaxCount;           /* Maximum counter value supported */
1433     UINT16                  MinCount;           /* Minimum counter value supported */
1434     UINT16                  Period;
1435     UINT16                  Status;
1436     UINT16                  Capability;
1437 
1438 } ACPI_TABLE_WDDT;
1439 
1440 /* Flags for Status field above */
1441 
1442 #define ACPI_WDDT_AVAILABLE     (1)
1443 #define ACPI_WDDT_ACTIVE        (1<<1)
1444 #define ACPI_WDDT_TCO_OS_OWNED  (1<<2)
1445 #define ACPI_WDDT_USER_RESET    (1<<11)
1446 #define ACPI_WDDT_WDT_RESET     (1<<12)
1447 #define ACPI_WDDT_POWER_FAIL    (1<<13)
1448 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
1449 
1450 /* Flags for Capability field above */
1451 
1452 #define ACPI_WDDT_AUTO_RESET    (1)
1453 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
1454 
1455 
1456 /*******************************************************************************
1457  *
1458  * WDRT - Watchdog Resource Table
1459  *        Version 1
1460  *
1461  * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
1462  * Version 1.01, August 28, 2006
1463  *
1464  ******************************************************************************/
1465 
1466 typedef struct acpi_table_wdrt
1467 {
1468     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1469     ACPI_GENERIC_ADDRESS    ControlRegister;
1470     ACPI_GENERIC_ADDRESS    CountRegister;
1471     UINT16                  PciDeviceId;
1472     UINT16                  PciVendorId;
1473     UINT8                   PciBus;             /* PCI Bus number */
1474     UINT8                   PciDevice;          /* PCI Device number */
1475     UINT8                   PciFunction;        /* PCI Function number */
1476     UINT8                   PciSegment;         /* PCI Segment number */
1477     UINT16                  MaxCount;           /* Maximum counter value supported */
1478     UINT8                   Units;
1479 
1480 } ACPI_TABLE_WDRT;
1481 
1482 
1483 /* Reset to default packing */
1484 
1485 #pragma pack()
1486 
1487 #endif /* __ACTBL2_H__ */
1488