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