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