Sync ACPICA with Intel's version 20180508 (from previously 20170831).
[dragonfly.git] / sys / contrib / dev / acpica / source / include / actbl1.h
blob4f03ab05a01d3b6e2d362ab6b674bff8d2e69c23
1 /******************************************************************************
3 * Name: actbl1.h - Additional ACPI table definitions
5 *****************************************************************************/
7 /******************************************************************************
9 * 1. Copyright Notice
11 * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp.
12 * All rights reserved.
14 * 2. License
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.
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
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;
37 * The above copyright and patent license is granted only if the following
38 * conditions are met:
40 * 3. Conditions
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.
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.
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.
72 * 3.4. Intel retains all right, title, and interest in and to the Original
73 * Intel Code.
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.
80 * 4. Disclaimer and Export Compliance
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.
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.
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.
114 *****************************************************************************
116 * Alternatively, you may choose to be licensed under the terms of the
117 * following license:
119 * Redistribution and use in source and binary forms, with or without
120 * modification, are permitted provided that the following conditions
121 * are met:
122 * 1. Redistributions of source code must retain the above copyright
123 * notice, this list of conditions, and the following disclaimer,
124 * without modification.
125 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126 * substantially similar to the "NO WARRANTY" disclaimer below
127 * ("Disclaimer") and any redistribution must be conditioned upon
128 * including a substantially similar Disclaimer requirement for further
129 * binary redistribution.
130 * 3. Neither the names of the above-listed copyright holders nor the names
131 * of any contributors may be used to endorse or promote products derived
132 * from this software without specific prior written permission.
134 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146 * Alternatively, you may choose to be licensed under the terms of the
147 * GNU General Public License ("GPL") version 2 as published by the Free
148 * Software Foundation.
150 *****************************************************************************/
152 #ifndef __ACTBL1_H__
153 #define __ACTBL1_H__
156 /*******************************************************************************
158 * Additional ACPI Tables
160 * These tables are not consumed directly by the ACPICA subsystem, but are
161 * included here to support device drivers and the AML disassembler.
163 ******************************************************************************/
167 * Values for description table header signatures for tables defined in this
168 * file. Useful because they make it more difficult to inadvertently type in
169 * the wrong signature.
171 #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
172 #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
173 #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
174 #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
175 #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
176 #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
177 #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
178 #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
179 #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
180 #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
181 #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
182 #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
183 #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
184 #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
185 #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
186 #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
187 #define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */
188 #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
189 #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
191 #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
192 #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
195 /* Reserved table signatures */
197 #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
198 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
201 * These tables have been seen in the field, but no definition has been found
203 #ifdef ACPI_UNDEFINED_TABLES
204 #define ACPI_SIG_ATKG "ATKG"
205 #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
206 #define ACPI_SIG_IEIT "IEIT"
207 #endif
210 * All tables must be byte-packed to match the ACPI specification, since
211 * the tables are provided by the system BIOS.
213 #pragma pack(1)
216 * Note: C bitfields are not used for this reason:
218 * "Bitfields are great and easy to read, but unfortunately the C language
219 * does not specify the layout of bitfields in memory, which means they are
220 * essentially useless for dealing with packed data in on-disk formats or
221 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
222 * this decision was a design error in C. Ritchie could have picked an order
223 * and stuck with it." Norman Ramsey.
224 * See http://stackoverflow.com/a/1053662/41661
228 /*******************************************************************************
230 * Common subtable headers
232 ******************************************************************************/
234 /* Generic subtable header (used in MADT, SRAT, etc.) */
236 typedef struct acpi_subtable_header
238 UINT8 Type;
239 UINT8 Length;
241 } ACPI_SUBTABLE_HEADER;
244 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
246 typedef struct acpi_whea_header
248 UINT8 Action;
249 UINT8 Instruction;
250 UINT8 Flags;
251 UINT8 Reserved;
252 ACPI_GENERIC_ADDRESS RegisterRegion;
253 UINT64 Value; /* Value used with Read/Write register */
254 UINT64 Mask; /* Bitmask required for this register instruction */
256 } ACPI_WHEA_HEADER;
259 /*******************************************************************************
261 * ASF - Alert Standard Format table (Signature "ASF!")
262 * Revision 0x10
264 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
266 ******************************************************************************/
268 typedef struct acpi_table_asf
270 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
272 } ACPI_TABLE_ASF;
275 /* ASF subtable header */
277 typedef struct acpi_asf_header
279 UINT8 Type;
280 UINT8 Reserved;
281 UINT16 Length;
283 } ACPI_ASF_HEADER;
286 /* Values for Type field above */
288 enum AcpiAsfType
290 ACPI_ASF_TYPE_INFO = 0,
291 ACPI_ASF_TYPE_ALERT = 1,
292 ACPI_ASF_TYPE_CONTROL = 2,
293 ACPI_ASF_TYPE_BOOT = 3,
294 ACPI_ASF_TYPE_ADDRESS = 4,
295 ACPI_ASF_TYPE_RESERVED = 5
299 * ASF subtables
302 /* 0: ASF Information */
304 typedef struct acpi_asf_info
306 ACPI_ASF_HEADER Header;
307 UINT8 MinResetValue;
308 UINT8 MinPollInterval;
309 UINT16 SystemId;
310 UINT32 MfgId;
311 UINT8 Flags;
312 UINT8 Reserved2[3];
314 } ACPI_ASF_INFO;
316 /* Masks for Flags field above */
318 #define ACPI_ASF_SMBUS_PROTOCOLS (1)
321 /* 1: ASF Alerts */
323 typedef struct acpi_asf_alert
325 ACPI_ASF_HEADER Header;
326 UINT8 AssertMask;
327 UINT8 DeassertMask;
328 UINT8 Alerts;
329 UINT8 DataLength;
331 } ACPI_ASF_ALERT;
333 typedef struct acpi_asf_alert_data
335 UINT8 Address;
336 UINT8 Command;
337 UINT8 Mask;
338 UINT8 Value;
339 UINT8 SensorType;
340 UINT8 Type;
341 UINT8 Offset;
342 UINT8 SourceType;
343 UINT8 Severity;
344 UINT8 SensorNumber;
345 UINT8 Entity;
346 UINT8 Instance;
348 } ACPI_ASF_ALERT_DATA;
351 /* 2: ASF Remote Control */
353 typedef struct acpi_asf_remote
355 ACPI_ASF_HEADER Header;
356 UINT8 Controls;
357 UINT8 DataLength;
358 UINT16 Reserved2;
360 } ACPI_ASF_REMOTE;
362 typedef struct acpi_asf_control_data
364 UINT8 Function;
365 UINT8 Address;
366 UINT8 Command;
367 UINT8 Value;
369 } ACPI_ASF_CONTROL_DATA;
372 /* 3: ASF RMCP Boot Options */
374 typedef struct acpi_asf_rmcp
376 ACPI_ASF_HEADER Header;
377 UINT8 Capabilities[7];
378 UINT8 CompletionCode;
379 UINT32 EnterpriseId;
380 UINT8 Command;
381 UINT16 Parameter;
382 UINT16 BootOptions;
383 UINT16 OemParameters;
385 } ACPI_ASF_RMCP;
388 /* 4: ASF Address */
390 typedef struct acpi_asf_address
392 ACPI_ASF_HEADER Header;
393 UINT8 EpromAddress;
394 UINT8 Devices;
396 } ACPI_ASF_ADDRESS;
399 /*******************************************************************************
401 * BERT - Boot Error Record Table (ACPI 4.0)
402 * Version 1
404 ******************************************************************************/
406 typedef struct acpi_table_bert
408 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
409 UINT32 RegionLength; /* Length of the boot error region */
410 UINT64 Address; /* Physical address of the error region */
412 } ACPI_TABLE_BERT;
415 /* Boot Error Region (not a subtable, pointed to by Address field above) */
417 typedef struct acpi_bert_region
419 UINT32 BlockStatus; /* Type of error information */
420 UINT32 RawDataOffset; /* Offset to raw error data */
421 UINT32 RawDataLength; /* Length of raw error data */
422 UINT32 DataLength; /* Length of generic error data */
423 UINT32 ErrorSeverity; /* Severity code */
425 } ACPI_BERT_REGION;
427 /* Values for BlockStatus flags above */
429 #define ACPI_BERT_UNCORRECTABLE (1)
430 #define ACPI_BERT_CORRECTABLE (1<<1)
431 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
432 #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
433 #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
435 /* Values for ErrorSeverity above */
437 enum AcpiBertErrorSeverity
439 ACPI_BERT_ERROR_CORRECTABLE = 0,
440 ACPI_BERT_ERROR_FATAL = 1,
441 ACPI_BERT_ERROR_CORRECTED = 2,
442 ACPI_BERT_ERROR_NONE = 3,
443 ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */
447 * Note: The generic error data that follows the ErrorSeverity field above
448 * uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below
452 /*******************************************************************************
454 * BGRT - Boot Graphics Resource Table (ACPI 5.0)
455 * Version 1
457 ******************************************************************************/
459 typedef struct acpi_table_bgrt
461 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
462 UINT16 Version;
463 UINT8 Status;
464 UINT8 ImageType;
465 UINT64 ImageAddress;
466 UINT32 ImageOffsetX;
467 UINT32 ImageOffsetY;
469 } ACPI_TABLE_BGRT;
471 /* Flags for Status field above */
473 #define ACPI_BGRT_DISPLAYED (1)
474 #define ACPI_BGRT_ORIENTATION_OFFSET (3 << 1)
477 /*******************************************************************************
479 * BOOT - Simple Boot Flag Table
480 * Version 1
482 * Conforms to the "Simple Boot Flag Specification", Version 2.1
484 ******************************************************************************/
486 typedef struct acpi_table_boot
488 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
489 UINT8 CmosIndex; /* Index in CMOS RAM for the boot register */
490 UINT8 Reserved[3];
492 } ACPI_TABLE_BOOT;
495 /*******************************************************************************
497 * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
498 * Version 1
500 ******************************************************************************/
502 typedef struct acpi_table_cpep
504 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
505 UINT64 Reserved;
507 } ACPI_TABLE_CPEP;
510 /* Subtable */
512 typedef struct acpi_cpep_polling
514 ACPI_SUBTABLE_HEADER Header;
515 UINT8 Id; /* Processor ID */
516 UINT8 Eid; /* Processor EID */
517 UINT32 Interval; /* Polling interval (msec) */
519 } ACPI_CPEP_POLLING;
522 /*******************************************************************************
524 * CSRT - Core System Resource Table
525 * Version 0
527 * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
529 ******************************************************************************/
531 typedef struct acpi_table_csrt
533 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
535 } ACPI_TABLE_CSRT;
538 /* Resource Group subtable */
540 typedef struct acpi_csrt_group
542 UINT32 Length;
543 UINT32 VendorId;
544 UINT32 SubvendorId;
545 UINT16 DeviceId;
546 UINT16 SubdeviceId;
547 UINT16 Revision;
548 UINT16 Reserved;
549 UINT32 SharedInfoLength;
551 /* Shared data immediately follows (Length = SharedInfoLength) */
553 } ACPI_CSRT_GROUP;
555 /* Shared Info subtable */
557 typedef struct acpi_csrt_shared_info
559 UINT16 MajorVersion;
560 UINT16 MinorVersion;
561 UINT32 MmioBaseLow;
562 UINT32 MmioBaseHigh;
563 UINT32 GsiInterrupt;
564 UINT8 InterruptPolarity;
565 UINT8 InterruptMode;
566 UINT8 NumChannels;
567 UINT8 DmaAddressWidth;
568 UINT16 BaseRequestLine;
569 UINT16 NumHandshakeSignals;
570 UINT32 MaxBlockSize;
572 /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
574 } ACPI_CSRT_SHARED_INFO;
576 /* Resource Descriptor subtable */
578 typedef struct acpi_csrt_descriptor
580 UINT32 Length;
581 UINT16 Type;
582 UINT16 Subtype;
583 UINT32 Uid;
585 /* Resource-specific information immediately follows */
587 } ACPI_CSRT_DESCRIPTOR;
590 /* Resource Types */
592 #define ACPI_CSRT_TYPE_INTERRUPT 0x0001
593 #define ACPI_CSRT_TYPE_TIMER 0x0002
594 #define ACPI_CSRT_TYPE_DMA 0x0003
596 /* Resource Subtypes */
598 #define ACPI_CSRT_XRUPT_LINE 0x0000
599 #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
600 #define ACPI_CSRT_TIMER 0x0000
601 #define ACPI_CSRT_DMA_CHANNEL 0x0000
602 #define ACPI_CSRT_DMA_CONTROLLER 0x0001
605 /*******************************************************************************
607 * DBG2 - Debug Port Table 2
608 * Version 0 (Both main table and subtables)
610 * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
612 ******************************************************************************/
614 typedef struct acpi_table_dbg2
616 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
617 UINT32 InfoOffset;
618 UINT32 InfoCount;
620 } ACPI_TABLE_DBG2;
623 typedef struct acpi_dbg2_header
625 UINT32 InfoOffset;
626 UINT32 InfoCount;
628 } ACPI_DBG2_HEADER;
631 /* Debug Device Information Subtable */
633 typedef struct acpi_dbg2_device
635 UINT8 Revision;
636 UINT16 Length;
637 UINT8 RegisterCount; /* Number of BaseAddress registers */
638 UINT16 NamepathLength;
639 UINT16 NamepathOffset;
640 UINT16 OemDataLength;
641 UINT16 OemDataOffset;
642 UINT16 PortType;
643 UINT16 PortSubtype;
644 UINT16 Reserved;
645 UINT16 BaseAddressOffset;
646 UINT16 AddressSizeOffset;
648 * Data that follows:
649 * BaseAddress (required) - Each in 12-byte Generic Address Structure format.
650 * AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.
651 * Namepath (required) - Null terminated string. Single dot if not supported.
652 * OemData (optional) - Length is OemDataLength.
654 } ACPI_DBG2_DEVICE;
656 /* Types for PortType field above */
658 #define ACPI_DBG2_SERIAL_PORT 0x8000
659 #define ACPI_DBG2_1394_PORT 0x8001
660 #define ACPI_DBG2_USB_PORT 0x8002
661 #define ACPI_DBG2_NET_PORT 0x8003
663 /* Subtypes for PortSubtype field above */
665 #define ACPI_DBG2_16550_COMPATIBLE 0x0000
666 #define ACPI_DBG2_16550_SUBSET 0x0001
667 #define ACPI_DBG2_ARM_PL011 0x0003
668 #define ACPI_DBG2_ARM_SBSA_32BIT 0x000D
669 #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
670 #define ACPI_DBG2_ARM_DCC 0x000F
671 #define ACPI_DBG2_BCM2835 0x0010
673 #define ACPI_DBG2_1394_STANDARD 0x0000
675 #define ACPI_DBG2_USB_XHCI 0x0000
676 #define ACPI_DBG2_USB_EHCI 0x0001
679 /*******************************************************************************
681 * DBGP - Debug Port table
682 * Version 1
684 * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
686 ******************************************************************************/
688 typedef struct acpi_table_dbgp
690 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
691 UINT8 Type; /* 0=full 16550, 1=subset of 16550 */
692 UINT8 Reserved[3];
693 ACPI_GENERIC_ADDRESS DebugPort;
695 } ACPI_TABLE_DBGP;
698 /*******************************************************************************
700 * DMAR - DMA Remapping table
701 * Version 1
703 * Conforms to "Intel Virtualization Technology for Directed I/O",
704 * Version 2.3, October 2014
706 ******************************************************************************/
708 typedef struct acpi_table_dmar
710 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
711 UINT8 Width; /* Host Address Width */
712 UINT8 Flags;
713 UINT8 Reserved[10];
715 } ACPI_TABLE_DMAR;
717 /* Masks for Flags field above */
719 #define ACPI_DMAR_INTR_REMAP (1)
720 #define ACPI_DMAR_X2APIC_OPT_OUT (1<<1)
721 #define ACPI_DMAR_X2APIC_MODE (1<<2)
724 /* DMAR subtable header */
726 typedef struct acpi_dmar_header
728 UINT16 Type;
729 UINT16 Length;
731 } ACPI_DMAR_HEADER;
733 /* Values for subtable type in ACPI_DMAR_HEADER */
735 enum AcpiDmarType
737 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
738 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
739 ACPI_DMAR_TYPE_ROOT_ATS = 2,
740 ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
741 ACPI_DMAR_TYPE_NAMESPACE = 4,
742 ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */
746 /* DMAR Device Scope structure */
748 typedef struct acpi_dmar_device_scope
750 UINT8 EntryType;
751 UINT8 Length;
752 UINT16 Reserved;
753 UINT8 EnumerationId;
754 UINT8 Bus;
756 } ACPI_DMAR_DEVICE_SCOPE;
758 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */
760 enum AcpiDmarScopeType
762 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
763 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
764 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
765 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
766 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
767 ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
768 ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
771 typedef struct acpi_dmar_pci_path
773 UINT8 Device;
774 UINT8 Function;
776 } ACPI_DMAR_PCI_PATH;
780 * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
783 /* 0: Hardware Unit Definition */
785 typedef struct acpi_dmar_hardware_unit
787 ACPI_DMAR_HEADER Header;
788 UINT8 Flags;
789 UINT8 Reserved;
790 UINT16 Segment;
791 UINT64 Address; /* Register Base Address */
793 } ACPI_DMAR_HARDWARE_UNIT;
795 /* Masks for Flags field above */
797 #define ACPI_DMAR_INCLUDE_ALL (1)
800 /* 1: Reserved Memory Defininition */
802 typedef struct acpi_dmar_reserved_memory
804 ACPI_DMAR_HEADER Header;
805 UINT16 Reserved;
806 UINT16 Segment;
807 UINT64 BaseAddress; /* 4K aligned base address */
808 UINT64 EndAddress; /* 4K aligned limit address */
810 } ACPI_DMAR_RESERVED_MEMORY;
812 /* Masks for Flags field above */
814 #define ACPI_DMAR_ALLOW_ALL (1)
817 /* 2: Root Port ATS Capability Reporting Structure */
819 typedef struct acpi_dmar_atsr
821 ACPI_DMAR_HEADER Header;
822 UINT8 Flags;
823 UINT8 Reserved;
824 UINT16 Segment;
826 } ACPI_DMAR_ATSR;
828 /* Masks for Flags field above */
830 #define ACPI_DMAR_ALL_PORTS (1)
833 /* 3: Remapping Hardware Static Affinity Structure */
835 typedef struct acpi_dmar_rhsa
837 ACPI_DMAR_HEADER Header;
838 UINT32 Reserved;
839 UINT64 BaseAddress;
840 UINT32 ProximityDomain;
842 } ACPI_DMAR_RHSA;
845 /* 4: ACPI Namespace Device Declaration Structure */
847 typedef struct acpi_dmar_andd
849 ACPI_DMAR_HEADER Header;
850 UINT8 Reserved[3];
851 UINT8 DeviceNumber;
852 char DeviceName[1];
854 } ACPI_DMAR_ANDD;
857 /*******************************************************************************
859 * DRTM - Dynamic Root of Trust for Measurement table
860 * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
861 * Table version 1
863 ******************************************************************************/
865 typedef struct acpi_table_drtm
867 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
868 UINT64 EntryBaseAddress;
869 UINT64 EntryLength;
870 UINT32 EntryAddress32;
871 UINT64 EntryAddress64;
872 UINT64 ExitAddress;
873 UINT64 LogAreaAddress;
874 UINT32 LogAreaLength;
875 UINT64 ArchDependentAddress;
876 UINT32 Flags;
878 } ACPI_TABLE_DRTM;
880 /* Flag Definitions for above */
882 #define ACPI_DRTM_ACCESS_ALLOWED (1)
883 #define ACPI_DRTM_ENABLE_GAP_CODE (1<<1)
884 #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2)
885 #define ACPI_DRTM_AUTHORITY_ORDER (1<<3)
888 /* 1) Validated Tables List (64-bit addresses) */
890 typedef struct acpi_drtm_vtable_list
892 UINT32 ValidatedTableCount;
893 UINT64 ValidatedTables[1];
895 } ACPI_DRTM_VTABLE_LIST;
897 /* 2) Resources List (of Resource Descriptors) */
899 /* Resource Descriptor */
901 typedef struct acpi_drtm_resource
903 UINT8 Size[7];
904 UINT8 Type;
905 UINT64 Address;
907 } ACPI_DRTM_RESOURCE;
909 typedef struct acpi_drtm_resource_list
911 UINT32 ResourceCount;
912 ACPI_DRTM_RESOURCE Resources[1];
914 } ACPI_DRTM_RESOURCE_LIST;
916 /* 3) Platform-specific Identifiers List */
918 typedef struct acpi_drtm_dps_id
920 UINT32 DpsIdLength;
921 UINT8 DpsId[16];
923 } ACPI_DRTM_DPS_ID;
926 /*******************************************************************************
928 * ECDT - Embedded Controller Boot Resources Table
929 * Version 1
931 ******************************************************************************/
933 typedef struct acpi_table_ecdt
935 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
936 ACPI_GENERIC_ADDRESS Control; /* Address of EC command/status register */
937 ACPI_GENERIC_ADDRESS Data; /* Address of EC data register */
938 UINT32 Uid; /* Unique ID - must be same as the EC _UID method */
939 UINT8 Gpe; /* The GPE for the EC */
940 UINT8 Id[1]; /* Full namepath of the EC in the ACPI namespace */
942 } ACPI_TABLE_ECDT;
945 /*******************************************************************************
947 * EINJ - Error Injection Table (ACPI 4.0)
948 * Version 1
950 ******************************************************************************/
952 typedef struct acpi_table_einj
954 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
955 UINT32 HeaderLength;
956 UINT8 Flags;
957 UINT8 Reserved[3];
958 UINT32 Entries;
960 } ACPI_TABLE_EINJ;
963 /* EINJ Injection Instruction Entries (actions) */
965 typedef struct acpi_einj_entry
967 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
969 } ACPI_EINJ_ENTRY;
971 /* Masks for Flags field above */
973 #define ACPI_EINJ_PRESERVE (1)
975 /* Values for Action field above */
977 enum AcpiEinjActions
979 ACPI_EINJ_BEGIN_OPERATION = 0,
980 ACPI_EINJ_GET_TRIGGER_TABLE = 1,
981 ACPI_EINJ_SET_ERROR_TYPE = 2,
982 ACPI_EINJ_GET_ERROR_TYPE = 3,
983 ACPI_EINJ_END_OPERATION = 4,
984 ACPI_EINJ_EXECUTE_OPERATION = 5,
985 ACPI_EINJ_CHECK_BUSY_STATUS = 6,
986 ACPI_EINJ_GET_COMMAND_STATUS = 7,
987 ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
988 ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
989 ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */
990 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
993 /* Values for Instruction field above */
995 enum AcpiEinjInstructions
997 ACPI_EINJ_READ_REGISTER = 0,
998 ACPI_EINJ_READ_REGISTER_VALUE = 1,
999 ACPI_EINJ_WRITE_REGISTER = 2,
1000 ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
1001 ACPI_EINJ_NOOP = 4,
1002 ACPI_EINJ_FLUSH_CACHELINE = 5,
1003 ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */
1006 typedef struct acpi_einj_error_type_with_addr
1008 UINT32 ErrorType;
1009 UINT32 VendorStructOffset;
1010 UINT32 Flags;
1011 UINT32 ApicId;
1012 UINT64 Address;
1013 UINT64 Range;
1014 UINT32 PcieId;
1016 } ACPI_EINJ_ERROR_TYPE_WITH_ADDR;
1018 typedef struct acpi_einj_vendor
1020 UINT32 Length;
1021 UINT32 PcieId;
1022 UINT16 VendorId;
1023 UINT16 DeviceId;
1024 UINT8 RevisionId;
1025 UINT8 Reserved[3];
1027 } ACPI_EINJ_VENDOR;
1030 /* EINJ Trigger Error Action Table */
1032 typedef struct acpi_einj_trigger
1034 UINT32 HeaderSize;
1035 UINT32 Revision;
1036 UINT32 TableSize;
1037 UINT32 EntryCount;
1039 } ACPI_EINJ_TRIGGER;
1041 /* Command status return values */
1043 enum AcpiEinjCommandStatus
1045 ACPI_EINJ_SUCCESS = 0,
1046 ACPI_EINJ_FAILURE = 1,
1047 ACPI_EINJ_INVALID_ACCESS = 2,
1048 ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */
1052 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
1054 #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
1055 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
1056 #define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
1057 #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
1058 #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
1059 #define ACPI_EINJ_MEMORY_FATAL (1<<5)
1060 #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
1061 #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
1062 #define ACPI_EINJ_PCIX_FATAL (1<<8)
1063 #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
1064 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
1065 #define ACPI_EINJ_PLATFORM_FATAL (1<<11)
1066 #define ACPI_EINJ_VENDOR_DEFINED (1<<31)
1069 /*******************************************************************************
1071 * ERST - Error Record Serialization Table (ACPI 4.0)
1072 * Version 1
1074 ******************************************************************************/
1076 typedef struct acpi_table_erst
1078 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1079 UINT32 HeaderLength;
1080 UINT32 Reserved;
1081 UINT32 Entries;
1083 } ACPI_TABLE_ERST;
1086 /* ERST Serialization Entries (actions) */
1088 typedef struct acpi_erst_entry
1090 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
1092 } ACPI_ERST_ENTRY;
1094 /* Masks for Flags field above */
1096 #define ACPI_ERST_PRESERVE (1)
1098 /* Values for Action field above */
1100 enum AcpiErstActions
1102 ACPI_ERST_BEGIN_WRITE = 0,
1103 ACPI_ERST_BEGIN_READ = 1,
1104 ACPI_ERST_BEGIN_CLEAR = 2,
1105 ACPI_ERST_END = 3,
1106 ACPI_ERST_SET_RECORD_OFFSET = 4,
1107 ACPI_ERST_EXECUTE_OPERATION = 5,
1108 ACPI_ERST_CHECK_BUSY_STATUS = 6,
1109 ACPI_ERST_GET_COMMAND_STATUS = 7,
1110 ACPI_ERST_GET_RECORD_ID = 8,
1111 ACPI_ERST_SET_RECORD_ID = 9,
1112 ACPI_ERST_GET_RECORD_COUNT = 10,
1113 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
1114 ACPI_ERST_NOT_USED = 12,
1115 ACPI_ERST_GET_ERROR_RANGE = 13,
1116 ACPI_ERST_GET_ERROR_LENGTH = 14,
1117 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
1118 ACPI_ERST_EXECUTE_TIMINGS = 16,
1119 ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */
1122 /* Values for Instruction field above */
1124 enum AcpiErstInstructions
1126 ACPI_ERST_READ_REGISTER = 0,
1127 ACPI_ERST_READ_REGISTER_VALUE = 1,
1128 ACPI_ERST_WRITE_REGISTER = 2,
1129 ACPI_ERST_WRITE_REGISTER_VALUE = 3,
1130 ACPI_ERST_NOOP = 4,
1131 ACPI_ERST_LOAD_VAR1 = 5,
1132 ACPI_ERST_LOAD_VAR2 = 6,
1133 ACPI_ERST_STORE_VAR1 = 7,
1134 ACPI_ERST_ADD = 8,
1135 ACPI_ERST_SUBTRACT = 9,
1136 ACPI_ERST_ADD_VALUE = 10,
1137 ACPI_ERST_SUBTRACT_VALUE = 11,
1138 ACPI_ERST_STALL = 12,
1139 ACPI_ERST_STALL_WHILE_TRUE = 13,
1140 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
1141 ACPI_ERST_GOTO = 15,
1142 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
1143 ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
1144 ACPI_ERST_MOVE_DATA = 18,
1145 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
1148 /* Command status return values */
1150 enum AcpiErstCommandStatus
1152 ACPI_ERST_SUCESS = 0,
1153 ACPI_ERST_NO_SPACE = 1,
1154 ACPI_ERST_NOT_AVAILABLE = 2,
1155 ACPI_ERST_FAILURE = 3,
1156 ACPI_ERST_RECORD_EMPTY = 4,
1157 ACPI_ERST_NOT_FOUND = 5,
1158 ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */
1162 /* Error Record Serialization Information */
1164 typedef struct acpi_erst_info
1166 UINT16 Signature; /* Should be "ER" */
1167 UINT8 Data[48];
1169 } ACPI_ERST_INFO;
1172 /*******************************************************************************
1174 * FPDT - Firmware Performance Data Table (ACPI 5.0)
1175 * Version 1
1177 ******************************************************************************/
1179 typedef struct acpi_table_fpdt
1181 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1183 } ACPI_TABLE_FPDT;
1186 /* FPDT subtable header (Performance Record Structure) */
1188 typedef struct acpi_fpdt_header
1190 UINT16 Type;
1191 UINT8 Length;
1192 UINT8 Revision;
1194 } ACPI_FPDT_HEADER;
1196 /* Values for Type field above */
1198 enum AcpiFpdtType
1200 ACPI_FPDT_TYPE_BOOT = 0,
1201 ACPI_FPDT_TYPE_S3PERF = 1
1206 * FPDT subtables
1209 /* 0: Firmware Basic Boot Performance Record */
1211 typedef struct acpi_fpdt_boot_pointer
1213 ACPI_FPDT_HEADER Header;
1214 UINT8 Reserved[4];
1215 UINT64 Address;
1217 } ACPI_FPDT_BOOT_POINTER;
1220 /* 1: S3 Performance Table Pointer Record */
1222 typedef struct acpi_fpdt_s3pt_pointer
1224 ACPI_FPDT_HEADER Header;
1225 UINT8 Reserved[4];
1226 UINT64 Address;
1228 } ACPI_FPDT_S3PT_POINTER;
1232 * S3PT - S3 Performance Table. This table is pointed to by the
1233 * S3 Pointer Record above.
1235 typedef struct acpi_table_s3pt
1237 UINT8 Signature[4]; /* "S3PT" */
1238 UINT32 Length;
1240 } ACPI_TABLE_S3PT;
1244 * S3PT Subtables (Not part of the actual FPDT)
1247 /* Values for Type field in S3PT header */
1249 enum AcpiS3ptType
1251 ACPI_S3PT_TYPE_RESUME = 0,
1252 ACPI_S3PT_TYPE_SUSPEND = 1,
1253 ACPI_FPDT_BOOT_PERFORMANCE = 2
1256 typedef struct acpi_s3pt_resume
1258 ACPI_FPDT_HEADER Header;
1259 UINT32 ResumeCount;
1260 UINT64 FullResume;
1261 UINT64 AverageResume;
1263 } ACPI_S3PT_RESUME;
1265 typedef struct acpi_s3pt_suspend
1267 ACPI_FPDT_HEADER Header;
1268 UINT64 SuspendStart;
1269 UINT64 SuspendEnd;
1271 } ACPI_S3PT_SUSPEND;
1275 * FPDT Boot Performance Record (Not part of the actual FPDT)
1277 typedef struct acpi_fpdt_boot
1279 ACPI_FPDT_HEADER Header;
1280 UINT8 Reserved[4];
1281 UINT64 ResetEnd;
1282 UINT64 LoadStart;
1283 UINT64 StartupStart;
1284 UINT64 ExitServicesEntry;
1285 UINT64 ExitServicesExit;
1287 } ACPI_FPDT_BOOT;
1290 /*******************************************************************************
1292 * GTDT - Generic Timer Description Table (ACPI 5.1)
1293 * Version 2
1295 ******************************************************************************/
1297 typedef struct acpi_table_gtdt
1299 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1300 UINT64 CounterBlockAddresss;
1301 UINT32 Reserved;
1302 UINT32 SecureEl1Interrupt;
1303 UINT32 SecureEl1Flags;
1304 UINT32 NonSecureEl1Interrupt;
1305 UINT32 NonSecureEl1Flags;
1306 UINT32 VirtualTimerInterrupt;
1307 UINT32 VirtualTimerFlags;
1308 UINT32 NonSecureEl2Interrupt;
1309 UINT32 NonSecureEl2Flags;
1310 UINT64 CounterReadBlockAddress;
1311 UINT32 PlatformTimerCount;
1312 UINT32 PlatformTimerOffset;
1314 } ACPI_TABLE_GTDT;
1316 /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
1318 #define ACPI_GTDT_INTERRUPT_MODE (1)
1319 #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)
1320 #define ACPI_GTDT_ALWAYS_ON (1<<2)
1323 /* Common GTDT subtable header */
1325 typedef struct acpi_gtdt_header
1327 UINT8 Type;
1328 UINT16 Length;
1330 } ACPI_GTDT_HEADER;
1332 /* Values for GTDT subtable type above */
1334 enum AcpiGtdtType
1336 ACPI_GTDT_TYPE_TIMER_BLOCK = 0,
1337 ACPI_GTDT_TYPE_WATCHDOG = 1,
1338 ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
1342 /* GTDT Subtables, correspond to Type in acpi_gtdt_header */
1344 /* 0: Generic Timer Block */
1346 typedef struct acpi_gtdt_timer_block
1348 ACPI_GTDT_HEADER Header;
1349 UINT8 Reserved;
1350 UINT64 BlockAddress;
1351 UINT32 TimerCount;
1352 UINT32 TimerOffset;
1354 } ACPI_GTDT_TIMER_BLOCK;
1356 /* Timer Sub-Structure, one per timer */
1358 typedef struct acpi_gtdt_timer_entry
1360 UINT8 FrameNumber;
1361 UINT8 Reserved[3];
1362 UINT64 BaseAddress;
1363 UINT64 El0BaseAddress;
1364 UINT32 TimerInterrupt;
1365 UINT32 TimerFlags;
1366 UINT32 VirtualTimerInterrupt;
1367 UINT32 VirtualTimerFlags;
1368 UINT32 CommonFlags;
1370 } ACPI_GTDT_TIMER_ENTRY;
1372 /* Flag Definitions: TimerFlags and VirtualTimerFlags above */
1374 #define ACPI_GTDT_GT_IRQ_MODE (1)
1375 #define ACPI_GTDT_GT_IRQ_POLARITY (1<<1)
1377 /* Flag Definitions: CommonFlags above */
1379 #define ACPI_GTDT_GT_IS_SECURE_TIMER (1)
1380 #define ACPI_GTDT_GT_ALWAYS_ON (1<<1)
1383 /* 1: SBSA Generic Watchdog Structure */
1385 typedef struct acpi_gtdt_watchdog
1387 ACPI_GTDT_HEADER Header;
1388 UINT8 Reserved;
1389 UINT64 RefreshFrameAddress;
1390 UINT64 ControlFrameAddress;
1391 UINT32 TimerInterrupt;
1392 UINT32 TimerFlags;
1394 } ACPI_GTDT_WATCHDOG;
1396 /* Flag Definitions: TimerFlags above */
1398 #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1)
1399 #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1)
1400 #define ACPI_GTDT_WATCHDOG_SECURE (1<<2)
1403 /*******************************************************************************
1405 * HEST - Hardware Error Source Table (ACPI 4.0)
1406 * Version 1
1408 ******************************************************************************/
1410 typedef struct acpi_table_hest
1412 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1413 UINT32 ErrorSourceCount;
1415 } ACPI_TABLE_HEST;
1418 /* HEST subtable header */
1420 typedef struct acpi_hest_header
1422 UINT16 Type;
1423 UINT16 SourceId;
1425 } ACPI_HEST_HEADER;
1428 /* Values for Type field above for subtables */
1430 enum AcpiHestTypes
1432 ACPI_HEST_TYPE_IA32_CHECK = 0,
1433 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
1434 ACPI_HEST_TYPE_IA32_NMI = 2,
1435 ACPI_HEST_TYPE_NOT_USED3 = 3,
1436 ACPI_HEST_TYPE_NOT_USED4 = 4,
1437 ACPI_HEST_TYPE_NOT_USED5 = 5,
1438 ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
1439 ACPI_HEST_TYPE_AER_ENDPOINT = 7,
1440 ACPI_HEST_TYPE_AER_BRIDGE = 8,
1441 ACPI_HEST_TYPE_GENERIC_ERROR = 9,
1442 ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
1443 ACPI_HEST_TYPE_IA32_DEFERRED_CHECK = 11,
1444 ACPI_HEST_TYPE_RESERVED = 12 /* 12 and greater are reserved */
1449 * HEST substructures contained in subtables
1453 * IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and
1454 * ACPI_HEST_IA_CORRECTED structures.
1456 typedef struct acpi_hest_ia_error_bank
1458 UINT8 BankNumber;
1459 UINT8 ClearStatusOnInit;
1460 UINT8 StatusFormat;
1461 UINT8 Reserved;
1462 UINT32 ControlRegister;
1463 UINT64 ControlData;
1464 UINT32 StatusRegister;
1465 UINT32 AddressRegister;
1466 UINT32 MiscRegister;
1468 } ACPI_HEST_IA_ERROR_BANK;
1471 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
1473 typedef struct acpi_hest_aer_common
1475 UINT16 Reserved1;
1476 UINT8 Flags;
1477 UINT8 Enabled;
1478 UINT32 RecordsToPreallocate;
1479 UINT32 MaxSectionsPerRecord;
1480 UINT32 Bus; /* Bus and Segment numbers */
1481 UINT16 Device;
1482 UINT16 Function;
1483 UINT16 DeviceControl;
1484 UINT16 Reserved2;
1485 UINT32 UncorrectableMask;
1486 UINT32 UncorrectableSeverity;
1487 UINT32 CorrectableMask;
1488 UINT32 AdvancedCapabilities;
1490 } ACPI_HEST_AER_COMMON;
1492 /* Masks for HEST Flags fields */
1494 #define ACPI_HEST_FIRMWARE_FIRST (1)
1495 #define ACPI_HEST_GLOBAL (1<<1)
1496 #define ACPI_HEST_GHES_ASSIST (1<<2)
1499 * Macros to access the bus/segment numbers in Bus field above:
1500 * Bus number is encoded in bits 7:0
1501 * Segment number is encoded in bits 23:8
1503 #define ACPI_HEST_BUS(Bus) ((Bus) & 0xFF)
1504 #define ACPI_HEST_SEGMENT(Bus) (((Bus) >> 8) & 0xFFFF)
1507 /* Hardware Error Notification */
1509 typedef struct acpi_hest_notify
1511 UINT8 Type;
1512 UINT8 Length;
1513 UINT16 ConfigWriteEnable;
1514 UINT32 PollInterval;
1515 UINT32 Vector;
1516 UINT32 PollingThresholdValue;
1517 UINT32 PollingThresholdWindow;
1518 UINT32 ErrorThresholdValue;
1519 UINT32 ErrorThresholdWindow;
1521 } ACPI_HEST_NOTIFY;
1523 /* Values for Notify Type field above */
1525 enum AcpiHestNotifyTypes
1527 ACPI_HEST_NOTIFY_POLLED = 0,
1528 ACPI_HEST_NOTIFY_EXTERNAL = 1,
1529 ACPI_HEST_NOTIFY_LOCAL = 2,
1530 ACPI_HEST_NOTIFY_SCI = 3,
1531 ACPI_HEST_NOTIFY_NMI = 4,
1532 ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */
1533 ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */
1534 ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */
1535 ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */
1536 ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */
1537 ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */
1538 ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11, /* ACPI 6.2 */
1539 ACPI_HEST_NOTIFY_RESERVED = 12 /* 12 and greater are reserved */
1542 /* Values for ConfigWriteEnable bitfield above */
1544 #define ACPI_HEST_TYPE (1)
1545 #define ACPI_HEST_POLL_INTERVAL (1<<1)
1546 #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
1547 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
1548 #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
1549 #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
1553 * HEST subtables
1556 /* 0: IA32 Machine Check Exception */
1558 typedef struct acpi_hest_ia_machine_check
1560 ACPI_HEST_HEADER Header;
1561 UINT16 Reserved1;
1562 UINT8 Flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
1563 UINT8 Enabled;
1564 UINT32 RecordsToPreallocate;
1565 UINT32 MaxSectionsPerRecord;
1566 UINT64 GlobalCapabilityData;
1567 UINT64 GlobalControlData;
1568 UINT8 NumHardwareBanks;
1569 UINT8 Reserved3[7];
1571 } ACPI_HEST_IA_MACHINE_CHECK;
1574 /* 1: IA32 Corrected Machine Check */
1576 typedef struct acpi_hest_ia_corrected
1578 ACPI_HEST_HEADER Header;
1579 UINT16 Reserved1;
1580 UINT8 Flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
1581 UINT8 Enabled;
1582 UINT32 RecordsToPreallocate;
1583 UINT32 MaxSectionsPerRecord;
1584 ACPI_HEST_NOTIFY Notify;
1585 UINT8 NumHardwareBanks;
1586 UINT8 Reserved2[3];
1588 } ACPI_HEST_IA_CORRECTED;
1591 /* 2: IA32 Non-Maskable Interrupt */
1593 typedef struct acpi_hest_ia_nmi
1595 ACPI_HEST_HEADER Header;
1596 UINT32 Reserved;
1597 UINT32 RecordsToPreallocate;
1598 UINT32 MaxSectionsPerRecord;
1599 UINT32 MaxRawDataLength;
1601 } ACPI_HEST_IA_NMI;
1604 /* 3,4,5: Not used */
1606 /* 6: PCI Express Root Port AER */
1608 typedef struct acpi_hest_aer_root
1610 ACPI_HEST_HEADER Header;
1611 ACPI_HEST_AER_COMMON Aer;
1612 UINT32 RootErrorCommand;
1614 } ACPI_HEST_AER_ROOT;
1617 /* 7: PCI Express AER (AER Endpoint) */
1619 typedef struct acpi_hest_aer
1621 ACPI_HEST_HEADER Header;
1622 ACPI_HEST_AER_COMMON Aer;
1624 } ACPI_HEST_AER;
1627 /* 8: PCI Express/PCI-X Bridge AER */
1629 typedef struct acpi_hest_aer_bridge
1631 ACPI_HEST_HEADER Header;
1632 ACPI_HEST_AER_COMMON Aer;
1633 UINT32 UncorrectableMask2;
1634 UINT32 UncorrectableSeverity2;
1635 UINT32 AdvancedCapabilities2;
1637 } ACPI_HEST_AER_BRIDGE;
1640 /* 9: Generic Hardware Error Source */
1642 typedef struct acpi_hest_generic
1644 ACPI_HEST_HEADER Header;
1645 UINT16 RelatedSourceId;
1646 UINT8 Reserved;
1647 UINT8 Enabled;
1648 UINT32 RecordsToPreallocate;
1649 UINT32 MaxSectionsPerRecord;
1650 UINT32 MaxRawDataLength;
1651 ACPI_GENERIC_ADDRESS ErrorStatusAddress;
1652 ACPI_HEST_NOTIFY Notify;
1653 UINT32 ErrorBlockLength;
1655 } ACPI_HEST_GENERIC;
1658 /* 10: Generic Hardware Error Source, version 2 */
1660 typedef struct acpi_hest_generic_v2
1662 ACPI_HEST_HEADER Header;
1663 UINT16 RelatedSourceId;
1664 UINT8 Reserved;
1665 UINT8 Enabled;
1666 UINT32 RecordsToPreallocate;
1667 UINT32 MaxSectionsPerRecord;
1668 UINT32 MaxRawDataLength;
1669 ACPI_GENERIC_ADDRESS ErrorStatusAddress;
1670 ACPI_HEST_NOTIFY Notify;
1671 UINT32 ErrorBlockLength;
1672 ACPI_GENERIC_ADDRESS ReadAckRegister;
1673 UINT64 ReadAckPreserve;
1674 UINT64 ReadAckWrite;
1676 } ACPI_HEST_GENERIC_V2;
1679 /* Generic Error Status block */
1681 typedef struct acpi_hest_generic_status
1683 UINT32 BlockStatus;
1684 UINT32 RawDataOffset;
1685 UINT32 RawDataLength;
1686 UINT32 DataLength;
1687 UINT32 ErrorSeverity;
1689 } ACPI_HEST_GENERIC_STATUS;
1691 /* Values for BlockStatus flags above */
1693 #define ACPI_HEST_UNCORRECTABLE (1)
1694 #define ACPI_HEST_CORRECTABLE (1<<1)
1695 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
1696 #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
1697 #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
1700 /* Generic Error Data entry */
1702 typedef struct acpi_hest_generic_data
1704 UINT8 SectionType[16];
1705 UINT32 ErrorSeverity;
1706 UINT16 Revision;
1707 UINT8 ValidationBits;
1708 UINT8 Flags;
1709 UINT32 ErrorDataLength;
1710 UINT8 FruId[16];
1711 UINT8 FruText[20];
1713 } ACPI_HEST_GENERIC_DATA;
1715 /* Extension for revision 0x0300 */
1717 typedef struct acpi_hest_generic_data_v300
1719 UINT8 SectionType[16];
1720 UINT32 ErrorSeverity;
1721 UINT16 Revision;
1722 UINT8 ValidationBits;
1723 UINT8 Flags;
1724 UINT32 ErrorDataLength;
1725 UINT8 FruId[16];
1726 UINT8 FruText[20];
1727 UINT64 TimeStamp;
1729 } ACPI_HEST_GENERIC_DATA_V300;
1731 /* Values for ErrorSeverity above */
1733 #define ACPI_HEST_GEN_ERROR_RECOVERABLE 0
1734 #define ACPI_HEST_GEN_ERROR_FATAL 1
1735 #define ACPI_HEST_GEN_ERROR_CORRECTED 2
1736 #define ACPI_HEST_GEN_ERROR_NONE 3
1738 /* Flags for ValidationBits above */
1740 #define ACPI_HEST_GEN_VALID_FRU_ID (1)
1741 #define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1)
1742 #define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2)
1745 /* 11: IA32 Deferred Machine Check Exception (ACPI 6.2) */
1747 typedef struct acpi_hest_ia_deferred_check
1749 ACPI_HEST_HEADER Header;
1750 UINT16 Reserved1;
1751 UINT8 Flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
1752 UINT8 Enabled;
1753 UINT32 RecordsToPreallocate;
1754 UINT32 MaxSectionsPerRecord;
1755 ACPI_HEST_NOTIFY Notify;
1756 UINT8 NumHardwareBanks;
1757 UINT8 Reserved2[3];
1759 } ACPI_HEST_IA_DEFERRED_CHECK;
1762 /*******************************************************************************
1764 * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2)
1765 * Version 1
1767 ******************************************************************************/
1769 typedef struct acpi_table_hmat
1771 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1772 UINT32 Reserved;
1774 } ACPI_TABLE_HMAT;
1777 /* Values for HMAT structure types */
1779 enum AcpiHmatType
1781 ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subystem address range */
1782 ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */
1783 ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */
1784 ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
1787 typedef struct acpi_hmat_structure
1789 UINT16 Type;
1790 UINT16 Reserved;
1791 UINT32 Length;
1793 } ACPI_HMAT_STRUCTURE;
1797 * HMAT Structures, correspond to Type in ACPI_HMAT_STRUCTURE
1800 /* 0: Memory subystem address range */
1802 typedef struct acpi_hmat_address_range
1804 ACPI_HMAT_STRUCTURE Header;
1805 UINT16 Flags;
1806 UINT16 Reserved1;
1807 UINT32 ProcessorPD; /* Processor proximity domain */
1808 UINT32 MemoryPD; /* Memory proximity domain */
1809 UINT32 Reserved2;
1810 UINT64 PhysicalAddressBase; /* Physical address range base */
1811 UINT64 PhysicalAddressLength; /* Physical address range length */
1813 } ACPI_HMAT_ADDRESS_RANGE;
1815 /* Masks for Flags field above */
1817 #define ACPI_HMAT_PROCESSOR_PD_VALID (1) /* 1: ProcessorPD field is valid */
1818 #define ACPI_HMAT_MEMORY_PD_VALID (1<<1) /* 1: MemoryPD field is valid */
1819 #define ACPI_HMAT_RESERVATION_HINT (1<<2) /* 1: Reservation hint */
1822 /* 1: System locality latency and bandwidth information */
1824 typedef struct acpi_hmat_locality
1826 ACPI_HMAT_STRUCTURE Header;
1827 UINT8 Flags;
1828 UINT8 DataType;
1829 UINT16 Reserved1;
1830 UINT32 NumberOfInitiatorPDs;
1831 UINT32 NumberOfTargetPDs;
1832 UINT32 Reserved2;
1833 UINT64 EntryBaseUnit;
1835 } ACPI_HMAT_LOCALITY;
1837 /* Masks for Flags field above */
1839 #define ACPI_HMAT_MEMORY_HIERARCHY (0x0F)
1841 /* Values for Memory Hierarchy flag */
1843 #define ACPI_HMAT_MEMORY 0
1844 #define ACPI_HMAT_LAST_LEVEL_CACHE 1
1845 #define ACPI_HMAT_1ST_LEVEL_CACHE 2
1846 #define ACPI_HMAT_2ND_LEVEL_CACHE 3
1847 #define ACPI_HMAT_3RD_LEVEL_CACHE 4
1849 /* Values for DataType field above */
1851 #define ACPI_HMAT_ACCESS_LATENCY 0
1852 #define ACPI_HMAT_READ_LATENCY 1
1853 #define ACPI_HMAT_WRITE_LATENCY 2
1854 #define ACPI_HMAT_ACCESS_BANDWIDTH 3
1855 #define ACPI_HMAT_READ_BANDWIDTH 4
1856 #define ACPI_HMAT_WRITE_BANDWIDTH 5
1859 /* 2: Memory side cache information */
1861 typedef struct acpi_hmat_cache
1863 ACPI_HMAT_STRUCTURE Header;
1864 UINT32 MemoryPD;
1865 UINT32 Reserved1;
1866 UINT64 CacheSize;
1867 UINT32 CacheAttributes;
1868 UINT16 Reserved2;
1869 UINT16 NumberOfSMBIOSHandles;
1871 } ACPI_HMAT_CACHE;
1873 /* Masks for CacheAttributes field above */
1875 #define ACPI_HMAT_TOTAL_CACHE_LEVEL (0x0000000F)
1876 #define ACPI_HMAT_CACHE_LEVEL (0x000000F0)
1877 #define ACPI_HMAT_CACHE_ASSOCIATIVITY (0x00000F00)
1878 #define ACPI_HMAT_WRITE_POLICY (0x0000F000)
1879 #define ACPI_HMAT_CACHE_LINE_SIZE (0xFFFF0000)
1881 /* Values for cache associativity flag */
1883 #define ACPI_HMAT_CA_NONE (0)
1884 #define ACPI_HMAT_CA_DIRECT_MAPPED (1)
1885 #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING (2)
1887 /* Values for write policy flag */
1889 #define ACPI_HMAT_CP_NONE (0)
1890 #define ACPI_HMAT_CP_WB (1)
1891 #define ACPI_HMAT_CP_WT (2)
1894 /*******************************************************************************
1896 * HPET - High Precision Event Timer table
1897 * Version 1
1899 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
1900 * Version 1.0a, October 2004
1902 ******************************************************************************/
1904 typedef struct acpi_table_hpet
1906 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1907 UINT32 Id; /* Hardware ID of event timer block */
1908 ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */
1909 UINT8 Sequence; /* HPET sequence number */
1910 UINT16 MinimumTick; /* Main counter min tick, periodic mode */
1911 UINT8 Flags;
1913 } ACPI_TABLE_HPET;
1915 /* Masks for Flags field above */
1917 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
1919 /* Values for Page Protect flags */
1921 enum AcpiHpetPageProtect
1923 ACPI_HPET_NO_PAGE_PROTECT = 0,
1924 ACPI_HPET_PAGE_PROTECT4 = 1,
1925 ACPI_HPET_PAGE_PROTECT64 = 2
1929 /*******************************************************************************
1931 * IBFT - Boot Firmware Table
1932 * Version 1
1934 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
1935 * Specification", Version 1.01, March 1, 2007
1937 * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
1938 * Therefore, it is not currently supported by the disassembler.
1940 ******************************************************************************/
1942 typedef struct acpi_table_ibft
1944 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1945 UINT8 Reserved[12];
1947 } ACPI_TABLE_IBFT;
1950 /* IBFT common subtable header */
1952 typedef struct acpi_ibft_header
1954 UINT8 Type;
1955 UINT8 Version;
1956 UINT16 Length;
1957 UINT8 Index;
1958 UINT8 Flags;
1960 } ACPI_IBFT_HEADER;
1962 /* Values for Type field above */
1964 enum AcpiIbftType
1966 ACPI_IBFT_TYPE_NOT_USED = 0,
1967 ACPI_IBFT_TYPE_CONTROL = 1,
1968 ACPI_IBFT_TYPE_INITIATOR = 2,
1969 ACPI_IBFT_TYPE_NIC = 3,
1970 ACPI_IBFT_TYPE_TARGET = 4,
1971 ACPI_IBFT_TYPE_EXTENSIONS = 5,
1972 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
1976 /* IBFT subtables */
1978 typedef struct acpi_ibft_control
1980 ACPI_IBFT_HEADER Header;
1981 UINT16 Extensions;
1982 UINT16 InitiatorOffset;
1983 UINT16 Nic0Offset;
1984 UINT16 Target0Offset;
1985 UINT16 Nic1Offset;
1986 UINT16 Target1Offset;
1988 } ACPI_IBFT_CONTROL;
1990 typedef struct acpi_ibft_initiator
1992 ACPI_IBFT_HEADER Header;
1993 UINT8 SnsServer[16];
1994 UINT8 SlpServer[16];
1995 UINT8 PrimaryServer[16];
1996 UINT8 SecondaryServer[16];
1997 UINT16 NameLength;
1998 UINT16 NameOffset;
2000 } ACPI_IBFT_INITIATOR;
2002 typedef struct acpi_ibft_nic
2004 ACPI_IBFT_HEADER Header;
2005 UINT8 IpAddress[16];
2006 UINT8 SubnetMaskPrefix;
2007 UINT8 Origin;
2008 UINT8 Gateway[16];
2009 UINT8 PrimaryDns[16];
2010 UINT8 SecondaryDns[16];
2011 UINT8 Dhcp[16];
2012 UINT16 Vlan;
2013 UINT8 MacAddress[6];
2014 UINT16 PciAddress;
2015 UINT16 NameLength;
2016 UINT16 NameOffset;
2018 } ACPI_IBFT_NIC;
2020 typedef struct acpi_ibft_target
2022 ACPI_IBFT_HEADER Header;
2023 UINT8 TargetIpAddress[16];
2024 UINT16 TargetIpSocket;
2025 UINT8 TargetBootLun[8];
2026 UINT8 ChapType;
2027 UINT8 NicAssociation;
2028 UINT16 TargetNameLength;
2029 UINT16 TargetNameOffset;
2030 UINT16 ChapNameLength;
2031 UINT16 ChapNameOffset;
2032 UINT16 ChapSecretLength;
2033 UINT16 ChapSecretOffset;
2034 UINT16 ReverseChapNameLength;
2035 UINT16 ReverseChapNameOffset;
2036 UINT16 ReverseChapSecretLength;
2037 UINT16 ReverseChapSecretOffset;
2039 } ACPI_IBFT_TARGET;
2042 /* Reset to default packing */
2044 #pragma pack()
2046 #endif /* __ACTBL1_H__ */