xref: /titanic_44/usr/src/uts/intel/sys/acpi/actbl2.h (revision a9c12afde877c596eed286ac3f1d518246e5cd1e)
1 /******************************************************************************
2  *
3  * Name: actbl2.h - ACPI Specification Revision 2.0 Tables
4  *
5  *****************************************************************************/
6 
7 /******************************************************************************
8  *
9  * 1. Copyright Notice
10  *
11  * Some or all of this work - Copyright (c) 1999 - 2009, 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_DBGP           "DBGP"      /* Debug Port table */
141 #define ACPI_SIG_DMAR           "DMAR"      /* DMA Remapping table */
142 #define ACPI_SIG_HPET           "HPET"      /* High Precision Event Timer table */
143 #define ACPI_SIG_IBFT           "IBFT"      /* iSCSI Boot Firmware Table */
144 #define ACPI_SIG_IVRS           "IVRS"      /* I/O Virtualization Reporting Structure */
145 #define ACPI_SIG_MCFG           "MCFG"      /* PCI Memory Mapped Configuration table */
146 #define ACPI_SIG_SLIC           "SLIC"      /* Software Licensing Description Table */
147 #define ACPI_SIG_SPCR           "SPCR"      /* Serial Port Console Redirection table */
148 #define ACPI_SIG_SPMI           "SPMI"      /* Server Platform Management Interface table */
149 #define ACPI_SIG_TCPA           "TCPA"      /* Trusted Computing Platform Alliance table */
150 #define ACPI_SIG_UEFI           "UEFI"      /* Uefi Boot Optimization Table */
151 #define ACPI_SIG_WAET           "WAET"      /* Windows ACPI Emulated devices Table */
152 #define ACPI_SIG_WDAT           "WDAT"      /* Watchdog Action Table */
153 #define ACPI_SIG_WDRT           "WDRT"      /* Watchdog Resource Table */
154 
155 
156 /*
157  * All tables must be byte-packed to match the ACPI specification, since
158  * the tables are provided by the system BIOS.
159  */
160 #pragma pack(1)
161 
162 /*
163  * Note about bitfields: The UINT8 type is used for bitfields in ACPI tables.
164  * This is the only type that is even remotely portable. Anything else is not
165  * portable, so do not use any other bitfield types.
166  */
167 
168 
169 /*******************************************************************************
170  *
171  * ASF - Alert Standard Format table (Signature "ASF!")
172  *       Revision 0x10
173  *
174  * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
175  *
176  ******************************************************************************/
177 
178 typedef struct acpi_table_asf
179 {
180     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
181 
182 } ACPI_TABLE_ASF;
183 
184 
185 /* ASF subtable header */
186 
187 typedef struct acpi_asf_header
188 {
189     UINT8                   Type;
190     UINT8                   Reserved;
191     UINT16                  Length;
192 
193 } ACPI_ASF_HEADER;
194 
195 
196 /* Values for Type field above */
197 
198 enum AcpiAsfType
199 {
200     ACPI_ASF_TYPE_INFO          = 0,
201     ACPI_ASF_TYPE_ALERT         = 1,
202     ACPI_ASF_TYPE_CONTROL       = 2,
203     ACPI_ASF_TYPE_BOOT          = 3,
204     ACPI_ASF_TYPE_ADDRESS       = 4,
205     ACPI_ASF_TYPE_RESERVED      = 5
206 };
207 
208 /*
209  * ASF subtables
210  */
211 
212 /* 0: ASF Information */
213 
214 typedef struct acpi_asf_info
215 {
216     ACPI_ASF_HEADER         Header;
217     UINT8                   MinResetValue;
218     UINT8                   MinPollInterval;
219     UINT16                  SystemId;
220     UINT32                  MfgId;
221     UINT8                   Flags;
222     UINT8                   Reserved2[3];
223 
224 } ACPI_ASF_INFO;
225 
226 /* Masks for Flags field above */
227 
228 #define ACPI_ASF_SMBUS_PROTOCOLS    (1)
229 
230 
231 /* 1: ASF Alerts */
232 
233 typedef struct acpi_asf_alert
234 {
235     ACPI_ASF_HEADER         Header;
236     UINT8                   AssertMask;
237     UINT8                   DeassertMask;
238     UINT8                   Alerts;
239     UINT8                   DataLength;
240 
241 } ACPI_ASF_ALERT;
242 
243 typedef struct acpi_asf_alert_data
244 {
245     UINT8                   Address;
246     UINT8                   Command;
247     UINT8                   Mask;
248     UINT8                   Value;
249     UINT8                   SensorType;
250     UINT8                   Type;
251     UINT8                   Offset;
252     UINT8                   SourceType;
253     UINT8                   Severity;
254     UINT8                   SensorNumber;
255     UINT8                   Entity;
256     UINT8                   Instance;
257 
258 } ACPI_ASF_ALERT_DATA;
259 
260 
261 /* 2: ASF Remote Control */
262 
263 typedef struct acpi_asf_remote
264 {
265     ACPI_ASF_HEADER         Header;
266     UINT8                   Controls;
267     UINT8                   DataLength;
268     UINT16                  Reserved2;
269 
270 } ACPI_ASF_REMOTE;
271 
272 typedef struct acpi_asf_control_data
273 {
274     UINT8                   Function;
275     UINT8                   Address;
276     UINT8                   Command;
277     UINT8                   Value;
278 
279 } ACPI_ASF_CONTROL_DATA;
280 
281 
282 /* 3: ASF RMCP Boot Options */
283 
284 typedef struct acpi_asf_rmcp
285 {
286     ACPI_ASF_HEADER         Header;
287     UINT8                   Capabilities[7];
288     UINT8                   CompletionCode;
289     UINT32                  EnterpriseId;
290     UINT8                   Command;
291     UINT16                  Parameter;
292     UINT16                  BootOptions;
293     UINT16                  OemParameters;
294 
295 } ACPI_ASF_RMCP;
296 
297 
298 /* 4: ASF Address */
299 
300 typedef struct acpi_asf_address
301 {
302     ACPI_ASF_HEADER         Header;
303     UINT8                   EpromAddress;
304     UINT8                   Devices;
305 
306 } ACPI_ASF_ADDRESS;
307 
308 
309 /*******************************************************************************
310  *
311  * BOOT - Simple Boot Flag Table
312  *        Version 1
313  *
314  * Conforms to the "Simple Boot Flag Specification", Version 2.1
315  *
316  ******************************************************************************/
317 
318 typedef struct acpi_table_boot
319 {
320     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
321     UINT8                   CmosIndex;          /* Index in CMOS RAM for the boot register */
322     UINT8                   Reserved[3];
323 
324 } ACPI_TABLE_BOOT;
325 
326 
327 /*******************************************************************************
328  *
329  * DBGP - Debug Port table
330  *        Version 1
331  *
332  * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
333  *
334  ******************************************************************************/
335 
336 typedef struct acpi_table_dbgp
337 {
338     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
339     UINT8                   Type;               /* 0=full 16550, 1=subset of 16550 */
340     UINT8                   Reserved[3];
341     ACPI_GENERIC_ADDRESS    DebugPort;
342 
343 } ACPI_TABLE_DBGP;
344 
345 
346 /*******************************************************************************
347  *
348  * DMAR - DMA Remapping table
349  *        Version 1
350  *
351  * Conforms to "Intel Virtualization Technology for Directed I/O",
352  * Version 1.2, Sept. 2008
353  *
354  ******************************************************************************/
355 
356 typedef struct acpi_table_dmar
357 {
358     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
359     UINT8                   Width;              /* Host Address Width */
360     UINT8                   Flags;
361     UINT8                   Reserved[10];
362 
363 } ACPI_TABLE_DMAR;
364 
365 /* Masks for Flags field above */
366 
367 #define ACPI_DMAR_INTR_REMAP        (1)
368 
369 
370 /* DMAR subtable header */
371 
372 typedef struct acpi_dmar_header
373 {
374     UINT16                  Type;
375     UINT16                  Length;
376 
377 } ACPI_DMAR_HEADER;
378 
379 /* Values for subtable type in ACPI_DMAR_HEADER */
380 
381 enum AcpiDmarType
382 {
383     ACPI_DMAR_TYPE_HARDWARE_UNIT        = 0,
384     ACPI_DMAR_TYPE_RESERVED_MEMORY      = 1,
385     ACPI_DMAR_TYPE_ATSR                 = 2,
386     ACPI_DMAR_HARDWARE_AFFINITY         = 3,
387     ACPI_DMAR_TYPE_RESERVED             = 4     /* 4 and greater are reserved */
388 };
389 
390 
391 /* DMAR Device Scope structure */
392 
393 typedef struct acpi_dmar_device_scope
394 {
395     UINT8                   EntryType;
396     UINT8                   Length;
397     UINT16                  Reserved;
398     UINT8                   EnumerationId;
399     UINT8                   Bus;
400 
401 } ACPI_DMAR_DEVICE_SCOPE;
402 
403 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE */
404 
405 enum AcpiDmarScopeType
406 {
407     ACPI_DMAR_SCOPE_TYPE_NOT_USED       = 0,
408     ACPI_DMAR_SCOPE_TYPE_ENDPOINT       = 1,
409     ACPI_DMAR_SCOPE_TYPE_BRIDGE         = 2,
410     ACPI_DMAR_SCOPE_TYPE_IOAPIC         = 3,
411     ACPI_DMAR_SCOPE_TYPE_HPET           = 4,
412     ACPI_DMAR_SCOPE_TYPE_RESERVED       = 5     /* 5 and greater are reserved */
413 };
414 
415 typedef struct acpi_dmar_pci_path
416 {
417     UINT8                   Device;
418     UINT8                   Function;
419 
420 } ACPI_DMAR_PCI_PATH;
421 
422 
423 /*
424  * DMAR Sub-tables, correspond to Type in ACPI_DMAR_HEADER
425  */
426 
427 /* 0: Hardware Unit Definition */
428 
429 typedef struct acpi_dmar_hardware_unit
430 {
431     ACPI_DMAR_HEADER        Header;
432     UINT8                   Flags;
433     UINT8                   Reserved;
434     UINT16                  Segment;
435     UINT64                  Address;            /* Register Base Address */
436 
437 } ACPI_DMAR_HARDWARE_UNIT;
438 
439 /* Masks for Flags field above */
440 
441 #define ACPI_DMAR_INCLUDE_ALL       (1)
442 
443 
444 /* 1: Reserved Memory Defininition */
445 
446 typedef struct acpi_dmar_reserved_memory
447 {
448     ACPI_DMAR_HEADER        Header;
449     UINT16                  Reserved;
450     UINT16                  Segment;
451     UINT64                  BaseAddress;        /* 4K aligned base address */
452     UINT64                  EndAddress;         /* 4K aligned limit address */
453 
454 } ACPI_DMAR_RESERVED_MEMORY;
455 
456 /* Masks for Flags field above */
457 
458 #define ACPI_DMAR_ALLOW_ALL         (1)
459 
460 
461 /* 2: Root Port ATS Capability Reporting Structure */
462 
463 typedef struct acpi_dmar_atsr
464 {
465     ACPI_DMAR_HEADER        Header;
466     UINT8                   Flags;
467     UINT8                   Reserved;
468     UINT16                  Segment;
469 
470 } ACPI_DMAR_ATSR;
471 
472 /* Masks for Flags field above */
473 
474 #define ACPI_DMAR_ALL_PORTS         (1)
475 
476 
477 /* 3: Remapping Hardware Static Affinity Structure */
478 
479 typedef struct acpi_dmar_rhsa
480 {
481     ACPI_DMAR_HEADER        Header;
482     UINT32                  Reserved;
483     UINT64                  BaseAddress;
484     UINT32                  ProximityDomain;
485 
486 } ACPI_DMAR_RHSA;
487 
488 
489 /*******************************************************************************
490  *
491  * HPET - High Precision Event Timer table
492  *        Version 1
493  *
494  * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
495  * Version 1.0a, October 2004
496  *
497  ******************************************************************************/
498 
499 typedef struct acpi_table_hpet
500 {
501     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
502     UINT32                  Id;                 /* Hardware ID of event timer block */
503     ACPI_GENERIC_ADDRESS    Address;            /* Address of event timer block */
504     UINT8                   Sequence;           /* HPET sequence number */
505     UINT16                  MinimumTick;        /* Main counter min tick, periodic mode */
506     UINT8                   Flags;
507 
508 } ACPI_TABLE_HPET;
509 
510 /* Masks for Flags field above */
511 
512 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
513 
514 /* Values for Page Protect flags */
515 
516 enum AcpiHpetPageProtect
517 {
518     ACPI_HPET_NO_PAGE_PROTECT       = 0,
519     ACPI_HPET_PAGE_PROTECT4         = 1,
520     ACPI_HPET_PAGE_PROTECT64        = 2
521 };
522 
523 
524 /*******************************************************************************
525  *
526  * IBFT - Boot Firmware Table
527  *        Version 1
528  *
529  * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
530  * Specification", Version 1.01, March 1, 2007
531  *
532  * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
533  * Therefore, it is not currently supported by the disassembler.
534  *
535  ******************************************************************************/
536 
537 typedef struct acpi_table_ibft
538 {
539     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
540     UINT8                   Reserved[12];
541 
542 } ACPI_TABLE_IBFT;
543 
544 
545 /* IBFT common subtable header */
546 
547 typedef struct acpi_ibft_header
548 {
549     UINT8                   Type;
550     UINT8                   Version;
551     UINT16                  Length;
552     UINT8                   Index;
553     UINT8                   Flags;
554 
555 } ACPI_IBFT_HEADER;
556 
557 /* Values for Type field above */
558 
559 enum AcpiIbftType
560 {
561     ACPI_IBFT_TYPE_NOT_USED         = 0,
562     ACPI_IBFT_TYPE_CONTROL          = 1,
563     ACPI_IBFT_TYPE_INITIATOR        = 2,
564     ACPI_IBFT_TYPE_NIC              = 3,
565     ACPI_IBFT_TYPE_TARGET           = 4,
566     ACPI_IBFT_TYPE_EXTENSIONS       = 5,
567     ACPI_IBFT_TYPE_RESERVED         = 6     /* 6 and greater are reserved */
568 };
569 
570 
571 /* IBFT subtables */
572 
573 typedef struct acpi_ibft_control
574 {
575     ACPI_IBFT_HEADER        Header;
576     UINT16                  Extensions;
577     UINT16                  InitiatorOffset;
578     UINT16                  Nic0Offset;
579     UINT16                  Target0Offset;
580     UINT16                  Nic1Offset;
581     UINT16                  Target1Offset;
582 
583 } ACPI_IBFT_CONTROL;
584 
585 typedef struct acpi_ibft_initiator
586 {
587     ACPI_IBFT_HEADER        Header;
588     UINT8                   SnsServer[16];
589     UINT8                   SlpServer[16];
590     UINT8                   PrimaryServer[16];
591     UINT8                   SecondaryServer[16];
592     UINT16                  NameLength;
593     UINT16                  NameOffset;
594 
595 } ACPI_IBFT_INITIATOR;
596 
597 typedef struct acpi_ibft_nic
598 {
599     ACPI_IBFT_HEADER        Header;
600     UINT8                   IpAddress[16];
601     UINT8                   SubnetMaskPrefix;
602     UINT8                   Origin;
603     UINT8                   Gateway[16];
604     UINT8                   PrimaryDns[16];
605     UINT8                   SecondaryDns[16];
606     UINT8                   Dhcp[16];
607     UINT16                  Vlan;
608     UINT8                   MacAddress[6];
609     UINT16                  PciAddress;
610     UINT16                  NameLength;
611     UINT16                  NameOffset;
612 
613 } ACPI_IBFT_NIC;
614 
615 typedef struct acpi_ibft_target
616 {
617     ACPI_IBFT_HEADER        Header;
618     UINT8                   TargetIpAddress[16];
619     UINT16                  TargetIpSocket;
620     UINT8                   TargetBootLun[8];
621     UINT8                   ChapType;
622     UINT8                   NicAssociation;
623     UINT16                  TargetNameLength;
624     UINT16                  TargetNameOffset;
625     UINT16                  ChapNameLength;
626     UINT16                  ChapNameOffset;
627     UINT16                  ChapSecretLength;
628     UINT16                  ChapSecretOffset;
629     UINT16                  ReverseChapNameLength;
630     UINT16                  ReverseChapNameOffset;
631     UINT16                  ReverseChapSecretLength;
632     UINT16                  ReverseChapSecretOffset;
633 
634 } ACPI_IBFT_TARGET;
635 
636 
637 /*******************************************************************************
638  *
639  * IVRS - I/O Virtualization Reporting Structure
640  *        Version 1
641  *
642  * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
643  * Revision 1.26, February 2009.
644  *
645  ******************************************************************************/
646 
647 typedef struct acpi_table_ivrs
648 {
649     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
650     UINT32                  Info;               /* Common virtualization info */
651     UINT64                  Reserved;
652 
653 } ACPI_TABLE_IVRS;
654 
655 /* Values for Info field above */
656 
657 #define ACPI_IVRS_PHYSICAL_SIZE     0x00007F00  /* 7 bits, physical address size */
658 #define ACPI_IVRS_VIRTUAL_SIZE      0x003F8000  /* 7 bits, virtual address size */
659 #define ACPI_IVRS_ATS_RESERVED      0x00400000  /* ATS address translation range reserved */
660 
661 
662 /* IVRS subtable header */
663 
664 typedef struct acpi_ivrs_header
665 {
666     UINT8                   Type;               /* Subtable type */
667     UINT8                   Flags;
668     UINT16                  Length;             /* Subtable length */
669     UINT16                  DeviceId;           /* ID of IOMMU */
670 
671 } ACPI_IVRS_HEADER;
672 
673 /* Values for subtable Type above */
674 
675 enum AcpiIvrsType
676 {
677     ACPI_IVRS_TYPE_HARDWARE         = 0x10,
678     ACPI_IVRS_TYPE_MEMORY1          = 0x20,
679     ACPI_IVRS_TYPE_MEMORY2          = 0x21,
680     ACPI_IVRS_TYPE_MEMORY3          = 0x22
681 };
682 
683 /* Masks for Flags field above for IVHD subtable */
684 
685 #define ACPI_IVHD_TT_ENABLE         (1)
686 #define ACPI_IVHD_PASS_PW           (1<<1)
687 #define ACPI_IVHD_RES_PASS_PW       (1<<2)
688 #define ACPI_IVHD_ISOC              (1<<3)
689 #define ACPI_IVHD_IOTLB             (1<<4)
690 
691 /* Masks for Flags field above for IVMD subtable */
692 
693 #define ACPI_IVMD_UNITY             (1)
694 #define ACPI_IVMD_READ              (1<<1)
695 #define ACPI_IVMD_WRITE             (1<<2)
696 #define ACPI_IVMD_EXCLUSION_RANGE   (1<<3)
697 
698 
699 /*
700  * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
701  */
702 
703 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
704 
705 typedef struct acpi_ivrs_hardware
706 {
707     ACPI_IVRS_HEADER        Header;
708     UINT16                  CapabilityOffset;   /* Offset for IOMMU control fields */
709     UINT64                  BaseAddress;        /* IOMMU control registers */
710     UINT16                  PciSegmentGroup;
711     UINT16                  Info;               /* MSI number and unit ID */
712     UINT32                  Reserved;
713 
714 } ACPI_IVRS_HARDWARE;
715 
716 /* Masks for Info field above */
717 
718 #define ACPI_IVHD_MSI_NUMBER_MASK   0x001F      /* 5 bits, MSI message number */
719 #define ACPI_IVHD_UNIT_ID_MASK      0x1F00      /* 5 bits, UnitID */
720 
721 
722 /*
723  * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
724  * Upper two bits of the Type field are the (encoded) length of the structure.
725  * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
726  * are reserved for future use but not defined.
727  */
728 typedef struct acpi_ivrs_de_header
729 {
730     UINT8                   Type;
731     UINT16                  Id;
732     UINT8                   DataSetting;
733 
734 } ACPI_IVRS_DE_HEADER;
735 
736 /* Length of device entry is in the top two bits of Type field above */
737 
738 #define ACPI_IVHD_ENTRY_LENGTH      0xC0
739 
740 /* Values for device entry Type field above */
741 
742 enum AcpiIvrsDeviceEntryType
743 {
744     /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
745 
746     ACPI_IVRS_TYPE_PAD4             = 0,
747     ACPI_IVRS_TYPE_ALL              = 1,
748     ACPI_IVRS_TYPE_SELECT           = 2,
749     ACPI_IVRS_TYPE_START            = 3,
750     ACPI_IVRS_TYPE_END              = 4,
751 
752     /* 8-byte device entries */
753 
754     ACPI_IVRS_TYPE_PAD8             = 64,
755     ACPI_IVRS_TYPE_NOT_USED         = 65,
756     ACPI_IVRS_TYPE_ALIAS_SELECT     = 66, /* Uses ACPI_IVRS_DEVICE8A */
757     ACPI_IVRS_TYPE_ALIAS_START      = 67, /* Uses ACPI_IVRS_DEVICE8A */
758     ACPI_IVRS_TYPE_EXT_SELECT       = 70, /* Uses ACPI_IVRS_DEVICE8B */
759     ACPI_IVRS_TYPE_EXT_START        = 71, /* Uses ACPI_IVRS_DEVICE8B */
760     ACPI_IVRS_TYPE_SPECIAL          = 72  /* Uses ACPI_IVRS_DEVICE8C */
761 };
762 
763 /* Values for Data field above */
764 
765 #define ACPI_IVHD_INIT_PASS         (1)
766 #define ACPI_IVHD_EINT_PASS         (1<<1)
767 #define ACPI_IVHD_NMI_PASS          (1<<2)
768 #define ACPI_IVHD_SYSTEM_MGMT       (3<<4)
769 #define ACPI_IVHD_LINT0_PASS        (1<<6)
770 #define ACPI_IVHD_LINT1_PASS        (1<<7)
771 
772 
773 /* Types 0-4: 4-byte device entry */
774 
775 typedef struct acpi_ivrs_device4
776 {
777     ACPI_IVRS_DE_HEADER     Header;
778 
779 } ACPI_IVRS_DEVICE4;
780 
781 /* Types 66-67: 8-byte device entry */
782 
783 typedef struct acpi_ivrs_device8a
784 {
785     ACPI_IVRS_DE_HEADER     Header;
786     UINT8                   Reserved1;
787     UINT16                  UsedId;
788     UINT8                   Reserved2;
789 
790 } ACPI_IVRS_DEVICE8A;
791 
792 /* Types 70-71: 8-byte device entry */
793 
794 typedef struct acpi_ivrs_device8b
795 {
796     ACPI_IVRS_DE_HEADER     Header;
797     UINT32                  ExtendedData;
798 
799 } ACPI_IVRS_DEVICE8B;
800 
801 /* Values for ExtendedData above */
802 
803 #define ACPI_IVHD_ATS_DISABLED      (1<<31)
804 
805 /* Type 72: 8-byte device entry */
806 
807 typedef struct acpi_ivrs_device8c
808 {
809     ACPI_IVRS_DE_HEADER     Header;
810     UINT8                   Handle;
811     UINT16                  UsedId;
812     UINT8                   Variety;
813 
814 } ACPI_IVRS_DEVICE8C;
815 
816 /* Values for Variety field above */
817 
818 #define ACPI_IVHD_IOAPIC            1
819 #define ACPI_IVHD_HPET              2
820 
821 
822 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
823 
824 typedef struct acpi_ivrs_memory
825 {
826     ACPI_IVRS_HEADER        Header;
827     UINT16                  AuxData;
828     UINT64                  Reserved;
829     UINT64                  StartAddress;
830     UINT64                  MemoryLength;
831 
832 } ACPI_IVRS_MEMORY;
833 
834 
835 /*******************************************************************************
836  *
837  * MCFG - PCI Memory Mapped Configuration table and sub-table
838  *        Version 1
839  *
840  * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
841  *
842  ******************************************************************************/
843 
844 typedef struct acpi_table_mcfg
845 {
846     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
847     UINT8                   Reserved[8];
848 
849 } ACPI_TABLE_MCFG;
850 
851 
852 /* Subtable */
853 
854 typedef struct acpi_mcfg_allocation
855 {
856     UINT64                  Address;            /* Base address, processor-relative */
857     UINT16                  PciSegment;         /* PCI segment group number */
858     UINT8                   StartBusNumber;     /* Starting PCI Bus number */
859     UINT8                   EndBusNumber;       /* Final PCI Bus number */
860     UINT32                  Reserved;
861 
862 } ACPI_MCFG_ALLOCATION;
863 
864 
865 /*******************************************************************************
866  *
867  * SPCR - Serial Port Console Redirection table
868  *        Version 1
869  *
870  * Conforms to "Serial Port Console Redirection Table",
871  * Version 1.00, January 11, 2002
872  *
873  ******************************************************************************/
874 
875 typedef struct acpi_table_spcr
876 {
877     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
878     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
879     UINT8                   Reserved[3];
880     ACPI_GENERIC_ADDRESS    SerialPort;
881     UINT8                   InterruptType;
882     UINT8                   PcInterrupt;
883     UINT32                  Interrupt;
884     UINT8                   BaudRate;
885     UINT8                   Parity;
886     UINT8                   StopBits;
887     UINT8                   FlowControl;
888     UINT8                   TerminalType;
889     UINT8                   Reserved1;
890     UINT16                  PciDeviceId;
891     UINT16                  PciVendorId;
892     UINT8                   PciBus;
893     UINT8                   PciDevice;
894     UINT8                   PciFunction;
895     UINT32                  PciFlags;
896     UINT8                   PciSegment;
897     UINT32                  Reserved2;
898 
899 } ACPI_TABLE_SPCR;
900 
901 /* Masks for PciFlags field above */
902 
903 #define ACPI_SPCR_DO_NOT_DISABLE    (1)
904 
905 
906 /*******************************************************************************
907  *
908  * SPMI - Server Platform Management Interface table
909  *        Version 5
910  *
911  * Conforms to "Intelligent Platform Management Interface Specification
912  * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
913  * June 12, 2009 markup.
914  *
915  ******************************************************************************/
916 
917 typedef struct acpi_table_spmi
918 {
919     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
920     UINT8                   InterfaceType;
921     UINT8                   Reserved;           /* Must be 1 */
922     UINT16                  SpecRevision;       /* Version of IPMI */
923     UINT8                   InterruptType;
924     UINT8                   GpeNumber;          /* GPE assigned */
925     UINT8                   Reserved1;
926     UINT8                   PciDeviceFlag;
927     UINT32                  Interrupt;
928     ACPI_GENERIC_ADDRESS    IpmiRegister;
929     UINT8                   PciSegment;
930     UINT8                   PciBus;
931     UINT8                   PciDevice;
932     UINT8                   PciFunction;
933     UINT8                   Reserved2;
934 
935 } ACPI_TABLE_SPMI;
936 
937 /* Values for InterfaceType above */
938 
939 enum AcpiSpmiInterfaceTypes
940 {
941     ACPI_SPMI_NOT_USED              = 0,
942     ACPI_SPMI_KEYBOARD              = 1,
943     ACPI_SPMI_SMI                   = 2,
944     ACPI_SPMI_BLOCK_TRANSFER        = 3,
945     ACPI_SPMI_SMBUS                 = 4,
946     ACPI_SPMI_RESERVED              = 5         /* 5 and above are reserved */
947 };
948 
949 
950 /*******************************************************************************
951  *
952  * TCPA - Trusted Computing Platform Alliance table
953  *        Version 1
954  *
955  * Conforms to "TCG PC Specific Implementation Specification",
956  * Version 1.1, August 18, 2003
957  *
958  ******************************************************************************/
959 
960 typedef struct acpi_table_tcpa
961 {
962     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
963     UINT16                  Reserved;
964     UINT32                  MaxLogLength;       /* Maximum length for the event log area */
965     UINT64                  LogAddress;         /* Address of the event log area */
966 
967 } ACPI_TABLE_TCPA;
968 
969 
970 /*******************************************************************************
971  *
972  * UEFI - UEFI Boot optimization Table
973  *        Version 1
974  *
975  * Conforms to "Unified Extensible Firmware Interface Specification",
976  * Version 2.3, May 8, 2009
977  *
978  ******************************************************************************/
979 
980 typedef struct acpi_table_uefi
981 {
982     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
983     UINT8                   Identifier[16];     /* UUID identifier */
984     UINT16                  DataOffset;         /* Offset of remaining data in table */
985 
986 } ACPI_TABLE_UEFI;
987 
988 
989 /*******************************************************************************
990  *
991  * WAET - Windows ACPI Emulated devices Table
992  *        Version 1
993  *
994  * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
995  *
996  ******************************************************************************/
997 
998 typedef struct acpi_table_waet
999 {
1000     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1001     UINT32                  Flags;
1002 
1003 } ACPI_TABLE_WAET;
1004 
1005 /* Masks for Flags field above */
1006 
1007 #define ACPI_WAET_RTC_NO_ACK        (1)         /* RTC requires no int acknowledge */
1008 #define ACPI_WAET_TIMER_ONE_READ    (1<<1)      /* PM timer requires only one read */
1009 
1010 
1011 /*******************************************************************************
1012  *
1013  * WDAT - Watchdog Action Table
1014  *        Version 1
1015  *
1016  * Conforms to "Hardware Watchdog Timers Design Specification",
1017  * Copyright 2006 Microsoft Corporation.
1018  *
1019  ******************************************************************************/
1020 
1021 typedef struct acpi_table_wdat
1022 {
1023     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1024     UINT32                  HeaderLength;       /* Watchdog Header Length */
1025     UINT16                  PciSegment;         /* PCI Segment number */
1026     UINT8                   PciBus;             /* PCI Bus number */
1027     UINT8                   PciDevice;          /* PCI Device number */
1028     UINT8                   PciFunction;        /* PCI Function number */
1029     UINT8                   Reserved[3];
1030     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
1031     UINT32                  MaxCount;           /* Maximum counter value supported */
1032     UINT32                  MinCount;           /* Minimum counter value */
1033     UINT8                   Flags;
1034     UINT8                   Reserved2[3];
1035     UINT32                  Entries;            /* Number of watchdog entries that follow */
1036 
1037 } ACPI_TABLE_WDAT;
1038 
1039 /* Masks for Flags field above */
1040 
1041 #define ACPI_WDAT_ENABLED           (1)
1042 #define ACPI_WDAT_STOPPED           0x80
1043 
1044 
1045 /* WDAT Instruction Entries (actions) */
1046 
1047 typedef struct acpi_wdat_entry
1048 {
1049     UINT8                   Action;
1050     UINT8                   Instruction;
1051     UINT16                  Reserved;
1052     ACPI_GENERIC_ADDRESS    RegisterRegion;
1053     UINT32                  Value;              /* Value used with Read/Write register */
1054     UINT32                  Mask;               /* Bitmask required for this register instruction */
1055 
1056 } ACPI_WDAT_ENTRY;
1057 
1058 /* Values for Action field above */
1059 
1060 enum AcpiWdatActions
1061 {
1062     ACPI_WDAT_RESET                 = 1,
1063     ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1064     ACPI_WDAT_GET_COUNTDOWN         = 5,
1065     ACPI_WDAT_SET_COUNTDOWN         = 6,
1066     ACPI_WDAT_GET_RUNNING_STATE     = 8,
1067     ACPI_WDAT_SET_RUNNING_STATE     = 9,
1068     ACPI_WDAT_GET_STOPPED_STATE     = 10,
1069     ACPI_WDAT_SET_STOPPED_STATE     = 11,
1070     ACPI_WDAT_GET_REBOOT            = 16,
1071     ACPI_WDAT_SET_REBOOT            = 17,
1072     ACPI_WDAT_GET_SHUTDOWN          = 18,
1073     ACPI_WDAT_SET_SHUTDOWN          = 19,
1074     ACPI_WDAT_GET_STATUS            = 32,
1075     ACPI_WDAT_SET_STATUS            = 33,
1076     ACPI_WDAT_ACTION_RESERVED       = 34    /* 34 and greater are reserved */
1077 };
1078 
1079 /* Values for Instruction field above */
1080 
1081 enum AcpiWdatInstructions
1082 {
1083     ACPI_WDAT_READ_VALUE            = 0,
1084     ACPI_WDAT_READ_COUNTDOWN        = 1,
1085     ACPI_WDAT_WRITE_VALUE           = 2,
1086     ACPI_WDAT_WRITE_COUNTDOWN       = 3,
1087     ACPI_WDAT_INSTRUCTION_RESERVED  = 4,    /* 4 and greater are reserved */
1088     ACPI_WDAT_PRESERVE_REGISTER     = 0x80  /* Except for this value */
1089 };
1090 
1091 
1092 /*******************************************************************************
1093  *
1094  * WDRT - Watchdog Resource Table
1095  *        Version 1
1096  *
1097  * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
1098  * Version 1.01, August 28, 2006
1099  *
1100  ******************************************************************************/
1101 
1102 typedef struct acpi_table_wdrt
1103 {
1104     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1105     ACPI_GENERIC_ADDRESS    ControlRegister;
1106     ACPI_GENERIC_ADDRESS    CountRegister;
1107     UINT16                  PciDeviceId;
1108     UINT16                  PciVendorId;
1109     UINT8                   PciBus;             /* PCI Bus number */
1110     UINT8                   PciDevice;          /* PCI Device number */
1111     UINT8                   PciFunction;        /* PCI Function number */
1112     UINT8                   PciSegment;         /* PCI Segment number */
1113     UINT16                  MaxCount;           /* Maximum counter value supported */
1114     UINT8                   Units;
1115 
1116 } ACPI_TABLE_WDRT;
1117 
1118 
1119 /* Reset to default packing */
1120 
1121 #pragma pack()
1122 
1123 #endif /* __ACTBL2_H__ */
1124 
1125