acpica.library: Initial import of Intel ACPICA, v20131115
[AROS.git] / arch / all-pc / acpica / source / include / actbl2.h
blob327a8105e6cb1a63d2fa4373f6c577e89d739fdb
1 /******************************************************************************
3 * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
5 *****************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2013, Intel Corp.
9 * All rights reserved.
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.
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.
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.
44 #ifndef __ACTBL2_H__
45 #define __ACTBL2_H__
48 /*******************************************************************************
50 * Additional ACPI Tables (2)
52 * These tables are not consumed directly by the ACPICA subsystem, but are
53 * included here to support device drivers and the AML disassembler.
55 * The tables in this file are defined by third-party specifications, and are
56 * not defined directly by the ACPI specification itself.
58 ******************************************************************************/
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.
66 #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
67 #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
68 #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
69 #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
70 #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
71 #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
72 #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
73 #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
74 #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
75 #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
76 #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
77 #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
78 #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
79 #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
80 #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
81 #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
82 #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
83 #define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */
84 #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
85 #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
86 #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
87 #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
89 #ifdef ACPI_UNDEFINED_TABLES
91 * These tables have been seen in the field, but no definition has been found
93 #define ACPI_SIG_ATKG "ATKG"
94 #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
95 #define ACPI_SIG_IEIT "IEIT"
96 #endif
99 * All tables must be byte-packed to match the ACPI specification, since
100 * the tables are provided by the system BIOS.
102 #pragma pack(1)
105 * Note: C bitfields are not used for this reason:
107 * "Bitfields are great and easy to read, but unfortunately the C language
108 * does not specify the layout of bitfields in memory, which means they are
109 * essentially useless for dealing with packed data in on-disk formats or
110 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
111 * this decision was a design error in C. Ritchie could have picked an order
112 * and stuck with it." Norman Ramsey.
113 * See http://stackoverflow.com/a/1053662/41661
117 /*******************************************************************************
119 * ASF - Alert Standard Format table (Signature "ASF!")
120 * Revision 0x10
122 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
124 ******************************************************************************/
126 typedef struct acpi_table_asf
128 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
130 } ACPI_TABLE_ASF;
133 /* ASF subtable header */
135 typedef struct acpi_asf_header
137 UINT8 Type;
138 UINT8 Reserved;
139 UINT16 Length;
141 } ACPI_ASF_HEADER;
144 /* Values for Type field above */
146 enum AcpiAsfType
148 ACPI_ASF_TYPE_INFO = 0,
149 ACPI_ASF_TYPE_ALERT = 1,
150 ACPI_ASF_TYPE_CONTROL = 2,
151 ACPI_ASF_TYPE_BOOT = 3,
152 ACPI_ASF_TYPE_ADDRESS = 4,
153 ACPI_ASF_TYPE_RESERVED = 5
157 * ASF subtables
160 /* 0: ASF Information */
162 typedef struct acpi_asf_info
164 ACPI_ASF_HEADER Header;
165 UINT8 MinResetValue;
166 UINT8 MinPollInterval;
167 UINT16 SystemId;
168 UINT32 MfgId;
169 UINT8 Flags;
170 UINT8 Reserved2[3];
172 } ACPI_ASF_INFO;
174 /* Masks for Flags field above */
176 #define ACPI_ASF_SMBUS_PROTOCOLS (1)
179 /* 1: ASF Alerts */
181 typedef struct acpi_asf_alert
183 ACPI_ASF_HEADER Header;
184 UINT8 AssertMask;
185 UINT8 DeassertMask;
186 UINT8 Alerts;
187 UINT8 DataLength;
189 } ACPI_ASF_ALERT;
191 typedef struct acpi_asf_alert_data
193 UINT8 Address;
194 UINT8 Command;
195 UINT8 Mask;
196 UINT8 Value;
197 UINT8 SensorType;
198 UINT8 Type;
199 UINT8 Offset;
200 UINT8 SourceType;
201 UINT8 Severity;
202 UINT8 SensorNumber;
203 UINT8 Entity;
204 UINT8 Instance;
206 } ACPI_ASF_ALERT_DATA;
209 /* 2: ASF Remote Control */
211 typedef struct acpi_asf_remote
213 ACPI_ASF_HEADER Header;
214 UINT8 Controls;
215 UINT8 DataLength;
216 UINT16 Reserved2;
218 } ACPI_ASF_REMOTE;
220 typedef struct acpi_asf_control_data
222 UINT8 Function;
223 UINT8 Address;
224 UINT8 Command;
225 UINT8 Value;
227 } ACPI_ASF_CONTROL_DATA;
230 /* 3: ASF RMCP Boot Options */
232 typedef struct acpi_asf_rmcp
234 ACPI_ASF_HEADER Header;
235 UINT8 Capabilities[7];
236 UINT8 CompletionCode;
237 UINT32 EnterpriseId;
238 UINT8 Command;
239 UINT16 Parameter;
240 UINT16 BootOptions;
241 UINT16 OemParameters;
243 } ACPI_ASF_RMCP;
246 /* 4: ASF Address */
248 typedef struct acpi_asf_address
250 ACPI_ASF_HEADER Header;
251 UINT8 EpromAddress;
252 UINT8 Devices;
254 } ACPI_ASF_ADDRESS;
257 /*******************************************************************************
259 * BOOT - Simple Boot Flag Table
260 * Version 1
262 * Conforms to the "Simple Boot Flag Specification", Version 2.1
264 ******************************************************************************/
266 typedef struct acpi_table_boot
268 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
269 UINT8 CmosIndex; /* Index in CMOS RAM for the boot register */
270 UINT8 Reserved[3];
272 } ACPI_TABLE_BOOT;
275 /*******************************************************************************
277 * CSRT - Core System Resource Table
278 * Version 0
280 * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
282 ******************************************************************************/
284 typedef struct acpi_table_csrt
286 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
288 } ACPI_TABLE_CSRT;
291 /* Resource Group subtable */
293 typedef struct acpi_csrt_group
295 UINT32 Length;
296 UINT32 VendorId;
297 UINT32 SubvendorId;
298 UINT16 DeviceId;
299 UINT16 SubdeviceId;
300 UINT16 Revision;
301 UINT16 Reserved;
302 UINT32 SharedInfoLength;
304 /* Shared data immediately follows (Length = SharedInfoLength) */
306 } ACPI_CSRT_GROUP;
308 /* Shared Info subtable */
310 typedef struct acpi_csrt_shared_info
312 UINT16 MajorVersion;
313 UINT16 MinorVersion;
314 UINT32 MmioBaseLow;
315 UINT32 MmioBaseHigh;
316 UINT32 GsiInterrupt;
317 UINT8 InterruptPolarity;
318 UINT8 InterruptMode;
319 UINT8 NumChannels;
320 UINT8 DmaAddressWidth;
321 UINT16 BaseRequestLine;
322 UINT16 NumHandshakeSignals;
323 UINT32 MaxBlockSize;
325 /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
327 } ACPI_CSRT_SHARED_INFO;
329 /* Resource Descriptor subtable */
331 typedef struct acpi_csrt_descriptor
333 UINT32 Length;
334 UINT16 Type;
335 UINT16 Subtype;
336 UINT32 Uid;
338 /* Resource-specific information immediately follows */
340 } ACPI_CSRT_DESCRIPTOR;
343 /* Resource Types */
345 #define ACPI_CSRT_TYPE_INTERRUPT 0x0001
346 #define ACPI_CSRT_TYPE_TIMER 0x0002
347 #define ACPI_CSRT_TYPE_DMA 0x0003
349 /* Resource Subtypes */
351 #define ACPI_CSRT_XRUPT_LINE 0x0000
352 #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
353 #define ACPI_CSRT_TIMER 0x0000
354 #define ACPI_CSRT_DMA_CHANNEL 0x0000
355 #define ACPI_CSRT_DMA_CONTROLLER 0x0001
358 /*******************************************************************************
360 * DBG2 - Debug Port Table 2
361 * Version 0 (Both main table and subtables)
363 * Conforms to "Microsoft Debug Port Table 2 (DBG2)", May 22 2012.
365 ******************************************************************************/
367 typedef struct acpi_table_dbg2
369 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
370 UINT32 InfoOffset;
371 UINT32 InfoCount;
373 } ACPI_TABLE_DBG2;
376 /* Debug Device Information Subtable */
378 typedef struct acpi_dbg2_device
380 UINT8 Revision;
381 UINT16 Length;
382 UINT8 RegisterCount; /* Number of BaseAddress registers */
383 UINT16 NamepathLength;
384 UINT16 NamepathOffset;
385 UINT16 OemDataLength;
386 UINT16 OemDataOffset;
387 UINT16 PortType;
388 UINT16 PortSubtype;
389 UINT16 Reserved;
390 UINT16 BaseAddressOffset;
391 UINT16 AddressSizeOffset;
393 * Data that follows:
394 * BaseAddress (required) - Each in 12-byte Generic Address Structure format.
395 * AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.
396 * Namepath (required) - Null terminated string. Single dot if not supported.
397 * OemData (optional) - Length is OemDataLength.
399 } ACPI_DBG2_DEVICE;
401 /* Types for PortType field above */
403 #define ACPI_DBG2_SERIAL_PORT 0x8000
404 #define ACPI_DBG2_1394_PORT 0x8001
405 #define ACPI_DBG2_USB_PORT 0x8002
406 #define ACPI_DBG2_NET_PORT 0x8003
408 /* Subtypes for PortSubtype field above */
410 #define ACPI_DBG2_16550_COMPATIBLE 0x0000
411 #define ACPI_DBG2_16550_SUBSET 0x0001
413 #define ACPI_DBG2_1394_STANDARD 0x0000
415 #define ACPI_DBG2_USB_XHCI 0x0000
416 #define ACPI_DBG2_USB_EHCI 0x0001
419 /*******************************************************************************
421 * DBGP - Debug Port table
422 * Version 1
424 * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
426 ******************************************************************************/
428 typedef struct acpi_table_dbgp
430 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
431 UINT8 Type; /* 0=full 16550, 1=subset of 16550 */
432 UINT8 Reserved[3];
433 ACPI_GENERIC_ADDRESS DebugPort;
435 } ACPI_TABLE_DBGP;
438 /*******************************************************************************
440 * DMAR - DMA Remapping table
441 * Version 1
443 * Conforms to "Intel Virtualization Technology for Directed I/O",
444 * Version 1.2, Sept. 2008
446 ******************************************************************************/
448 typedef struct acpi_table_dmar
450 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
451 UINT8 Width; /* Host Address Width */
452 UINT8 Flags;
453 UINT8 Reserved[10];
455 } ACPI_TABLE_DMAR;
457 /* Masks for Flags field above */
459 #define ACPI_DMAR_INTR_REMAP (1)
462 /* DMAR subtable header */
464 typedef struct acpi_dmar_header
466 UINT16 Type;
467 UINT16 Length;
469 } ACPI_DMAR_HEADER;
471 /* Values for subtable type in ACPI_DMAR_HEADER */
473 enum AcpiDmarType
475 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
476 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
477 ACPI_DMAR_TYPE_ATSR = 2,
478 ACPI_DMAR_HARDWARE_AFFINITY = 3,
479 ACPI_DMAR_TYPE_RESERVED = 4 /* 4 and greater are reserved */
483 /* DMAR Device Scope structure */
485 typedef struct acpi_dmar_device_scope
487 UINT8 EntryType;
488 UINT8 Length;
489 UINT16 Reserved;
490 UINT8 EnumerationId;
491 UINT8 Bus;
493 } ACPI_DMAR_DEVICE_SCOPE;
495 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE */
497 enum AcpiDmarScopeType
499 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
500 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
501 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
502 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
503 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
504 ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */
507 typedef struct acpi_dmar_pci_path
509 UINT8 Device;
510 UINT8 Function;
512 } ACPI_DMAR_PCI_PATH;
516 * DMAR Sub-tables, correspond to Type in ACPI_DMAR_HEADER
519 /* 0: Hardware Unit Definition */
521 typedef struct acpi_dmar_hardware_unit
523 ACPI_DMAR_HEADER Header;
524 UINT8 Flags;
525 UINT8 Reserved;
526 UINT16 Segment;
527 UINT64 Address; /* Register Base Address */
529 } ACPI_DMAR_HARDWARE_UNIT;
531 /* Masks for Flags field above */
533 #define ACPI_DMAR_INCLUDE_ALL (1)
536 /* 1: Reserved Memory Defininition */
538 typedef struct acpi_dmar_reserved_memory
540 ACPI_DMAR_HEADER Header;
541 UINT16 Reserved;
542 UINT16 Segment;
543 UINT64 BaseAddress; /* 4K aligned base address */
544 UINT64 EndAddress; /* 4K aligned limit address */
546 } ACPI_DMAR_RESERVED_MEMORY;
548 /* Masks for Flags field above */
550 #define ACPI_DMAR_ALLOW_ALL (1)
553 /* 2: Root Port ATS Capability Reporting Structure */
555 typedef struct acpi_dmar_atsr
557 ACPI_DMAR_HEADER Header;
558 UINT8 Flags;
559 UINT8 Reserved;
560 UINT16 Segment;
562 } ACPI_DMAR_ATSR;
564 /* Masks for Flags field above */
566 #define ACPI_DMAR_ALL_PORTS (1)
569 /* 3: Remapping Hardware Static Affinity Structure */
571 typedef struct acpi_dmar_rhsa
573 ACPI_DMAR_HEADER Header;
574 UINT32 Reserved;
575 UINT64 BaseAddress;
576 UINT32 ProximityDomain;
578 } ACPI_DMAR_RHSA;
581 /*******************************************************************************
583 * HPET - High Precision Event Timer table
584 * Version 1
586 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
587 * Version 1.0a, October 2004
589 ******************************************************************************/
591 typedef struct acpi_table_hpet
593 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
594 UINT32 Id; /* Hardware ID of event timer block */
595 ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */
596 UINT8 Sequence; /* HPET sequence number */
597 UINT16 MinimumTick; /* Main counter min tick, periodic mode */
598 UINT8 Flags;
600 } ACPI_TABLE_HPET;
602 /* Masks for Flags field above */
604 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
606 /* Values for Page Protect flags */
608 enum AcpiHpetPageProtect
610 ACPI_HPET_NO_PAGE_PROTECT = 0,
611 ACPI_HPET_PAGE_PROTECT4 = 1,
612 ACPI_HPET_PAGE_PROTECT64 = 2
616 /*******************************************************************************
618 * IBFT - Boot Firmware Table
619 * Version 1
621 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
622 * Specification", Version 1.01, March 1, 2007
624 * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
625 * Therefore, it is not currently supported by the disassembler.
627 ******************************************************************************/
629 typedef struct acpi_table_ibft
631 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
632 UINT8 Reserved[12];
634 } ACPI_TABLE_IBFT;
637 /* IBFT common subtable header */
639 typedef struct acpi_ibft_header
641 UINT8 Type;
642 UINT8 Version;
643 UINT16 Length;
644 UINT8 Index;
645 UINT8 Flags;
647 } ACPI_IBFT_HEADER;
649 /* Values for Type field above */
651 enum AcpiIbftType
653 ACPI_IBFT_TYPE_NOT_USED = 0,
654 ACPI_IBFT_TYPE_CONTROL = 1,
655 ACPI_IBFT_TYPE_INITIATOR = 2,
656 ACPI_IBFT_TYPE_NIC = 3,
657 ACPI_IBFT_TYPE_TARGET = 4,
658 ACPI_IBFT_TYPE_EXTENSIONS = 5,
659 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
663 /* IBFT subtables */
665 typedef struct acpi_ibft_control
667 ACPI_IBFT_HEADER Header;
668 UINT16 Extensions;
669 UINT16 InitiatorOffset;
670 UINT16 Nic0Offset;
671 UINT16 Target0Offset;
672 UINT16 Nic1Offset;
673 UINT16 Target1Offset;
675 } ACPI_IBFT_CONTROL;
677 typedef struct acpi_ibft_initiator
679 ACPI_IBFT_HEADER Header;
680 UINT8 SnsServer[16];
681 UINT8 SlpServer[16];
682 UINT8 PrimaryServer[16];
683 UINT8 SecondaryServer[16];
684 UINT16 NameLength;
685 UINT16 NameOffset;
687 } ACPI_IBFT_INITIATOR;
689 typedef struct acpi_ibft_nic
691 ACPI_IBFT_HEADER Header;
692 UINT8 IpAddress[16];
693 UINT8 SubnetMaskPrefix;
694 UINT8 Origin;
695 UINT8 Gateway[16];
696 UINT8 PrimaryDns[16];
697 UINT8 SecondaryDns[16];
698 UINT8 Dhcp[16];
699 UINT16 Vlan;
700 UINT8 MacAddress[6];
701 UINT16 PciAddress;
702 UINT16 NameLength;
703 UINT16 NameOffset;
705 } ACPI_IBFT_NIC;
707 typedef struct acpi_ibft_target
709 ACPI_IBFT_HEADER Header;
710 UINT8 TargetIpAddress[16];
711 UINT16 TargetIpSocket;
712 UINT8 TargetBootLun[8];
713 UINT8 ChapType;
714 UINT8 NicAssociation;
715 UINT16 TargetNameLength;
716 UINT16 TargetNameOffset;
717 UINT16 ChapNameLength;
718 UINT16 ChapNameOffset;
719 UINT16 ChapSecretLength;
720 UINT16 ChapSecretOffset;
721 UINT16 ReverseChapNameLength;
722 UINT16 ReverseChapNameOffset;
723 UINT16 ReverseChapSecretLength;
724 UINT16 ReverseChapSecretOffset;
726 } ACPI_IBFT_TARGET;
729 /*******************************************************************************
731 * IVRS - I/O Virtualization Reporting Structure
732 * Version 1
734 * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
735 * Revision 1.26, February 2009.
737 ******************************************************************************/
739 typedef struct acpi_table_ivrs
741 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
742 UINT32 Info; /* Common virtualization info */
743 UINT64 Reserved;
745 } ACPI_TABLE_IVRS;
747 /* Values for Info field above */
749 #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
750 #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
751 #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
754 /* IVRS subtable header */
756 typedef struct acpi_ivrs_header
758 UINT8 Type; /* Subtable type */
759 UINT8 Flags;
760 UINT16 Length; /* Subtable length */
761 UINT16 DeviceId; /* ID of IOMMU */
763 } ACPI_IVRS_HEADER;
765 /* Values for subtable Type above */
767 enum AcpiIvrsType
769 ACPI_IVRS_TYPE_HARDWARE = 0x10,
770 ACPI_IVRS_TYPE_MEMORY1 = 0x20,
771 ACPI_IVRS_TYPE_MEMORY2 = 0x21,
772 ACPI_IVRS_TYPE_MEMORY3 = 0x22
775 /* Masks for Flags field above for IVHD subtable */
777 #define ACPI_IVHD_TT_ENABLE (1)
778 #define ACPI_IVHD_PASS_PW (1<<1)
779 #define ACPI_IVHD_RES_PASS_PW (1<<2)
780 #define ACPI_IVHD_ISOC (1<<3)
781 #define ACPI_IVHD_IOTLB (1<<4)
783 /* Masks for Flags field above for IVMD subtable */
785 #define ACPI_IVMD_UNITY (1)
786 #define ACPI_IVMD_READ (1<<1)
787 #define ACPI_IVMD_WRITE (1<<2)
788 #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
792 * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
795 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
797 typedef struct acpi_ivrs_hardware
799 ACPI_IVRS_HEADER Header;
800 UINT16 CapabilityOffset; /* Offset for IOMMU control fields */
801 UINT64 BaseAddress; /* IOMMU control registers */
802 UINT16 PciSegmentGroup;
803 UINT16 Info; /* MSI number and unit ID */
804 UINT32 Reserved;
806 } ACPI_IVRS_HARDWARE;
808 /* Masks for Info field above */
810 #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
811 #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, UnitID */
815 * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
816 * Upper two bits of the Type field are the (encoded) length of the structure.
817 * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
818 * are reserved for future use but not defined.
820 typedef struct acpi_ivrs_de_header
822 UINT8 Type;
823 UINT16 Id;
824 UINT8 DataSetting;
826 } ACPI_IVRS_DE_HEADER;
828 /* Length of device entry is in the top two bits of Type field above */
830 #define ACPI_IVHD_ENTRY_LENGTH 0xC0
832 /* Values for device entry Type field above */
834 enum AcpiIvrsDeviceEntryType
836 /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
838 ACPI_IVRS_TYPE_PAD4 = 0,
839 ACPI_IVRS_TYPE_ALL = 1,
840 ACPI_IVRS_TYPE_SELECT = 2,
841 ACPI_IVRS_TYPE_START = 3,
842 ACPI_IVRS_TYPE_END = 4,
844 /* 8-byte device entries */
846 ACPI_IVRS_TYPE_PAD8 = 64,
847 ACPI_IVRS_TYPE_NOT_USED = 65,
848 ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses ACPI_IVRS_DEVICE8A */
849 ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses ACPI_IVRS_DEVICE8A */
850 ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses ACPI_IVRS_DEVICE8B */
851 ACPI_IVRS_TYPE_EXT_START = 71, /* Uses ACPI_IVRS_DEVICE8B */
852 ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses ACPI_IVRS_DEVICE8C */
855 /* Values for Data field above */
857 #define ACPI_IVHD_INIT_PASS (1)
858 #define ACPI_IVHD_EINT_PASS (1<<1)
859 #define ACPI_IVHD_NMI_PASS (1<<2)
860 #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
861 #define ACPI_IVHD_LINT0_PASS (1<<6)
862 #define ACPI_IVHD_LINT1_PASS (1<<7)
865 /* Types 0-4: 4-byte device entry */
867 typedef struct acpi_ivrs_device4
869 ACPI_IVRS_DE_HEADER Header;
871 } ACPI_IVRS_DEVICE4;
873 /* Types 66-67: 8-byte device entry */
875 typedef struct acpi_ivrs_device8a
877 ACPI_IVRS_DE_HEADER Header;
878 UINT8 Reserved1;
879 UINT16 UsedId;
880 UINT8 Reserved2;
882 } ACPI_IVRS_DEVICE8A;
884 /* Types 70-71: 8-byte device entry */
886 typedef struct acpi_ivrs_device8b
888 ACPI_IVRS_DE_HEADER Header;
889 UINT32 ExtendedData;
891 } ACPI_IVRS_DEVICE8B;
893 /* Values for ExtendedData above */
895 #define ACPI_IVHD_ATS_DISABLED (1<<31)
897 /* Type 72: 8-byte device entry */
899 typedef struct acpi_ivrs_device8c
901 ACPI_IVRS_DE_HEADER Header;
902 UINT8 Handle;
903 UINT16 UsedId;
904 UINT8 Variety;
906 } ACPI_IVRS_DEVICE8C;
908 /* Values for Variety field above */
910 #define ACPI_IVHD_IOAPIC 1
911 #define ACPI_IVHD_HPET 2
914 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
916 typedef struct acpi_ivrs_memory
918 ACPI_IVRS_HEADER Header;
919 UINT16 AuxData;
920 UINT64 Reserved;
921 UINT64 StartAddress;
922 UINT64 MemoryLength;
924 } ACPI_IVRS_MEMORY;
927 /*******************************************************************************
929 * MCFG - PCI Memory Mapped Configuration table and sub-table
930 * Version 1
932 * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
934 ******************************************************************************/
936 typedef struct acpi_table_mcfg
938 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
939 UINT8 Reserved[8];
941 } ACPI_TABLE_MCFG;
944 /* Subtable */
946 typedef struct acpi_mcfg_allocation
948 UINT64 Address; /* Base address, processor-relative */
949 UINT16 PciSegment; /* PCI segment group number */
950 UINT8 StartBusNumber; /* Starting PCI Bus number */
951 UINT8 EndBusNumber; /* Final PCI Bus number */
952 UINT32 Reserved;
954 } ACPI_MCFG_ALLOCATION;
957 /*******************************************************************************
959 * MCHI - Management Controller Host Interface Table
960 * Version 1
962 * Conforms to "Management Component Transport Protocol (MCTP) Host
963 * Interface Specification", Revision 1.0.0a, October 13, 2009
965 ******************************************************************************/
967 typedef struct acpi_table_mchi
969 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
970 UINT8 InterfaceType;
971 UINT8 Protocol;
972 UINT64 ProtocolData;
973 UINT8 InterruptType;
974 UINT8 Gpe;
975 UINT8 PciDeviceFlag;
976 UINT32 GlobalInterrupt;
977 ACPI_GENERIC_ADDRESS ControlRegister;
978 UINT8 PciSegment;
979 UINT8 PciBus;
980 UINT8 PciDevice;
981 UINT8 PciFunction;
983 } ACPI_TABLE_MCHI;
986 /*******************************************************************************
988 * MTMR - MID Timer Table
989 * Version 1
991 * Conforms to "Simple Firmware Interface Specification",
992 * Draft 0.8.2, Oct 19, 2010
993 * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
995 ******************************************************************************/
997 typedef struct acpi_table_mtmr
999 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1001 } ACPI_TABLE_MTMR;
1003 /* MTMR entry */
1005 typedef struct acpi_mtmr_entry
1007 ACPI_GENERIC_ADDRESS PhysicalAddress;
1008 UINT32 Frequency;
1009 UINT32 Irq;
1011 } ACPI_MTMR_ENTRY;
1014 /*******************************************************************************
1016 * SLIC - Software Licensing Description Table
1017 * Version 1
1019 * Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems",
1020 * Copyright 2006
1022 ******************************************************************************/
1024 /* Basic SLIC table is only the common ACPI header */
1026 typedef struct acpi_table_slic
1028 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1030 } ACPI_TABLE_SLIC;
1033 /* Common SLIC subtable header */
1035 typedef struct acpi_slic_header
1037 UINT32 Type;
1038 UINT32 Length;
1040 } ACPI_SLIC_HEADER;
1042 /* Values for Type field above */
1044 enum AcpiSlicType
1046 ACPI_SLIC_TYPE_PUBLIC_KEY = 0,
1047 ACPI_SLIC_TYPE_WINDOWS_MARKER = 1,
1048 ACPI_SLIC_TYPE_RESERVED = 2 /* 2 and greater are reserved */
1053 * SLIC Sub-tables, correspond to Type in ACPI_SLIC_HEADER
1056 /* 0: Public Key Structure */
1058 typedef struct acpi_slic_key
1060 ACPI_SLIC_HEADER Header;
1061 UINT8 KeyType;
1062 UINT8 Version;
1063 UINT16 Reserved;
1064 UINT32 Algorithm;
1065 char Magic[4];
1066 UINT32 BitLength;
1067 UINT32 Exponent;
1068 UINT8 Modulus[128];
1070 } ACPI_SLIC_KEY;
1073 /* 1: Windows Marker Structure */
1075 typedef struct acpi_slic_marker
1077 ACPI_SLIC_HEADER Header;
1078 UINT32 Version;
1079 char OemId[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */
1080 char OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
1081 char WindowsFlag[8];
1082 UINT32 SlicVersion;
1083 UINT8 Reserved[16];
1084 UINT8 Signature[128];
1086 } ACPI_SLIC_MARKER;
1089 /*******************************************************************************
1091 * SPCR - Serial Port Console Redirection table
1092 * Version 1
1094 * Conforms to "Serial Port Console Redirection Table",
1095 * Version 1.00, January 11, 2002
1097 ******************************************************************************/
1099 typedef struct acpi_table_spcr
1101 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1102 UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */
1103 UINT8 Reserved[3];
1104 ACPI_GENERIC_ADDRESS SerialPort;
1105 UINT8 InterruptType;
1106 UINT8 PcInterrupt;
1107 UINT32 Interrupt;
1108 UINT8 BaudRate;
1109 UINT8 Parity;
1110 UINT8 StopBits;
1111 UINT8 FlowControl;
1112 UINT8 TerminalType;
1113 UINT8 Reserved1;
1114 UINT16 PciDeviceId;
1115 UINT16 PciVendorId;
1116 UINT8 PciBus;
1117 UINT8 PciDevice;
1118 UINT8 PciFunction;
1119 UINT32 PciFlags;
1120 UINT8 PciSegment;
1121 UINT32 Reserved2;
1123 } ACPI_TABLE_SPCR;
1125 /* Masks for PciFlags field above */
1127 #define ACPI_SPCR_DO_NOT_DISABLE (1)
1130 /*******************************************************************************
1132 * SPMI - Server Platform Management Interface table
1133 * Version 5
1135 * Conforms to "Intelligent Platform Management Interface Specification
1136 * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
1137 * June 12, 2009 markup.
1139 ******************************************************************************/
1141 typedef struct acpi_table_spmi
1143 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1144 UINT8 InterfaceType;
1145 UINT8 Reserved; /* Must be 1 */
1146 UINT16 SpecRevision; /* Version of IPMI */
1147 UINT8 InterruptType;
1148 UINT8 GpeNumber; /* GPE assigned */
1149 UINT8 Reserved1;
1150 UINT8 PciDeviceFlag;
1151 UINT32 Interrupt;
1152 ACPI_GENERIC_ADDRESS IpmiRegister;
1153 UINT8 PciSegment;
1154 UINT8 PciBus;
1155 UINT8 PciDevice;
1156 UINT8 PciFunction;
1157 UINT8 Reserved2;
1159 } ACPI_TABLE_SPMI;
1161 /* Values for InterfaceType above */
1163 enum AcpiSpmiInterfaceTypes
1165 ACPI_SPMI_NOT_USED = 0,
1166 ACPI_SPMI_KEYBOARD = 1,
1167 ACPI_SPMI_SMI = 2,
1168 ACPI_SPMI_BLOCK_TRANSFER = 3,
1169 ACPI_SPMI_SMBUS = 4,
1170 ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
1174 /*******************************************************************************
1176 * TCPA - Trusted Computing Platform Alliance table
1177 * Version 1
1179 * Conforms to "TCG PC Specific Implementation Specification",
1180 * Version 1.1, August 18, 2003
1182 ******************************************************************************/
1184 typedef struct acpi_table_tcpa
1186 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1187 UINT16 Reserved;
1188 UINT32 MaxLogLength; /* Maximum length for the event log area */
1189 UINT64 LogAddress; /* Address of the event log area */
1191 } ACPI_TABLE_TCPA;
1194 /*******************************************************************************
1196 * UEFI - UEFI Boot optimization Table
1197 * Version 1
1199 * Conforms to "Unified Extensible Firmware Interface Specification",
1200 * Version 2.3, May 8, 2009
1202 ******************************************************************************/
1204 typedef struct acpi_table_uefi
1206 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1207 UINT8 Identifier[16]; /* UUID identifier */
1208 UINT16 DataOffset; /* Offset of remaining data in table */
1210 } ACPI_TABLE_UEFI;
1213 /*******************************************************************************
1215 * VRTC - Virtual Real Time Clock Table
1216 * Version 1
1218 * Conforms to "Simple Firmware Interface Specification",
1219 * Draft 0.8.2, Oct 19, 2010
1220 * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
1222 ******************************************************************************/
1224 typedef struct acpi_table_vrtc
1226 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1228 } ACPI_TABLE_VRTC;
1230 /* VRTC entry */
1232 typedef struct acpi_vrtc_entry
1234 ACPI_GENERIC_ADDRESS PhysicalAddress;
1235 UINT32 Irq;
1237 } ACPI_VRTC_ENTRY;
1240 /*******************************************************************************
1242 * WAET - Windows ACPI Emulated devices Table
1243 * Version 1
1245 * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
1247 ******************************************************************************/
1249 typedef struct acpi_table_waet
1251 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1252 UINT32 Flags;
1254 } ACPI_TABLE_WAET;
1256 /* Masks for Flags field above */
1258 #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
1259 #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
1262 /*******************************************************************************
1264 * WDAT - Watchdog Action Table
1265 * Version 1
1267 * Conforms to "Hardware Watchdog Timers Design Specification",
1268 * Copyright 2006 Microsoft Corporation.
1270 ******************************************************************************/
1272 typedef struct acpi_table_wdat
1274 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1275 UINT32 HeaderLength; /* Watchdog Header Length */
1276 UINT16 PciSegment; /* PCI Segment number */
1277 UINT8 PciBus; /* PCI Bus number */
1278 UINT8 PciDevice; /* PCI Device number */
1279 UINT8 PciFunction; /* PCI Function number */
1280 UINT8 Reserved[3];
1281 UINT32 TimerPeriod; /* Period of one timer count (msec) */
1282 UINT32 MaxCount; /* Maximum counter value supported */
1283 UINT32 MinCount; /* Minimum counter value */
1284 UINT8 Flags;
1285 UINT8 Reserved2[3];
1286 UINT32 Entries; /* Number of watchdog entries that follow */
1288 } ACPI_TABLE_WDAT;
1290 /* Masks for Flags field above */
1292 #define ACPI_WDAT_ENABLED (1)
1293 #define ACPI_WDAT_STOPPED 0x80
1296 /* WDAT Instruction Entries (actions) */
1298 typedef struct acpi_wdat_entry
1300 UINT8 Action;
1301 UINT8 Instruction;
1302 UINT16 Reserved;
1303 ACPI_GENERIC_ADDRESS RegisterRegion;
1304 UINT32 Value; /* Value used with Read/Write register */
1305 UINT32 Mask; /* Bitmask required for this register instruction */
1307 } ACPI_WDAT_ENTRY;
1309 /* Values for Action field above */
1311 enum AcpiWdatActions
1313 ACPI_WDAT_RESET = 1,
1314 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1315 ACPI_WDAT_GET_COUNTDOWN = 5,
1316 ACPI_WDAT_SET_COUNTDOWN = 6,
1317 ACPI_WDAT_GET_RUNNING_STATE = 8,
1318 ACPI_WDAT_SET_RUNNING_STATE = 9,
1319 ACPI_WDAT_GET_STOPPED_STATE = 10,
1320 ACPI_WDAT_SET_STOPPED_STATE = 11,
1321 ACPI_WDAT_GET_REBOOT = 16,
1322 ACPI_WDAT_SET_REBOOT = 17,
1323 ACPI_WDAT_GET_SHUTDOWN = 18,
1324 ACPI_WDAT_SET_SHUTDOWN = 19,
1325 ACPI_WDAT_GET_STATUS = 32,
1326 ACPI_WDAT_SET_STATUS = 33,
1327 ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
1330 /* Values for Instruction field above */
1332 enum AcpiWdatInstructions
1334 ACPI_WDAT_READ_VALUE = 0,
1335 ACPI_WDAT_READ_COUNTDOWN = 1,
1336 ACPI_WDAT_WRITE_VALUE = 2,
1337 ACPI_WDAT_WRITE_COUNTDOWN = 3,
1338 ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
1339 ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
1343 /*******************************************************************************
1345 * WDDT - Watchdog Descriptor Table
1346 * Version 1
1348 * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
1349 * Version 001, September 2002
1351 ******************************************************************************/
1353 typedef struct acpi_table_wddt
1355 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1356 UINT16 SpecVersion;
1357 UINT16 TableVersion;
1358 UINT16 PciVendorId;
1359 ACPI_GENERIC_ADDRESS Address;
1360 UINT16 MaxCount; /* Maximum counter value supported */
1361 UINT16 MinCount; /* Minimum counter value supported */
1362 UINT16 Period;
1363 UINT16 Status;
1364 UINT16 Capability;
1366 } ACPI_TABLE_WDDT;
1368 /* Flags for Status field above */
1370 #define ACPI_WDDT_AVAILABLE (1)
1371 #define ACPI_WDDT_ACTIVE (1<<1)
1372 #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
1373 #define ACPI_WDDT_USER_RESET (1<<11)
1374 #define ACPI_WDDT_WDT_RESET (1<<12)
1375 #define ACPI_WDDT_POWER_FAIL (1<<13)
1376 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
1378 /* Flags for Capability field above */
1380 #define ACPI_WDDT_AUTO_RESET (1)
1381 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
1384 /*******************************************************************************
1386 * WDRT - Watchdog Resource Table
1387 * Version 1
1389 * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
1390 * Version 1.01, August 28, 2006
1392 ******************************************************************************/
1394 typedef struct acpi_table_wdrt
1396 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1397 ACPI_GENERIC_ADDRESS ControlRegister;
1398 ACPI_GENERIC_ADDRESS CountRegister;
1399 UINT16 PciDeviceId;
1400 UINT16 PciVendorId;
1401 UINT8 PciBus; /* PCI Bus number */
1402 UINT8 PciDevice; /* PCI Device number */
1403 UINT8 PciFunction; /* PCI Function number */
1404 UINT8 PciSegment; /* PCI Segment number */
1405 UINT16 MaxCount; /* Maximum counter value supported */
1406 UINT8 Units;
1408 } ACPI_TABLE_WDRT;
1411 /* Reset to default packing */
1413 #pragma pack()
1415 #endif /* __ACTBL2_H__ */