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