1 /******************************************************************************
2  *
3  * Name: actbl1.h - Additional ACPI table definitions
4  *
5  *****************************************************************************/
6 
7 /******************************************************************************
8  *
9  * 1. Copyright Notice
10  *
11  * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
12  * All rights reserved.
13  *
14  * 2. License
15  *
16  * 2.1. This is your license from Intel Corp. under its intellectual property
17  * rights. You may have additional license terms from the party that provided
18  * you this software, covering your right to use that party's intellectual
19  * property rights.
20  *
21  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22  * copy of the source code appearing in this file ("Covered Code") an
23  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24  * base code distributed originally by Intel ("Original Intel Code") to copy,
25  * make derivatives, distribute, use and display any portion of the Covered
26  * Code in any form, with the right to sublicense such rights; and
27  *
28  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29  * license (with the right to sublicense), under only those claims of Intel
30  * patents that are infringed by the Original Intel Code, to make, use, sell,
31  * offer to sell, and import the Covered Code and derivative works thereof
32  * solely to the minimum extent necessary to exercise the above copyright
33  * license, and in no event shall the patent license extend to any additions
34  * to or modifications of the Original Intel Code. No other license or right
35  * is granted directly or by implication, estoppel or otherwise;
36  *
37  * The above copyright and patent license is granted only if the following
38  * conditions are met:
39  *
40  * 3. Conditions
41  *
42  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43  * Redistribution of source code of any substantial portion of the Covered
44  * Code or modification with rights to further distribute source must include
45  * the above Copyright Notice, the above License, this list of Conditions,
46  * and the following Disclaimer and Export Compliance provision. In addition,
47  * Licensee must cause all Covered Code to which Licensee contributes to
48  * contain a file documenting the changes Licensee made to create that Covered
49  * Code and the date of any change. Licensee must include in that file the
50  * documentation of any changes made by any predecessor Licensee. Licensee
51  * must include a prominent statement that the modification is derived,
52  * directly or indirectly, from Original Intel Code.
53  *
54  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55  * Redistribution of source code of any substantial portion of the Covered
56  * Code or modification without rights to further distribute source must
57  * include the following Disclaimer and Export Compliance provision in the
58  * documentation and/or other materials provided with distribution. In
59  * addition, Licensee may not authorize further sublicense of source of any
60  * portion of the Covered Code, and must include terms to the effect that the
61  * license from Licensee to its licensee is limited to the intellectual
62  * property embodied in the software Licensee provides to its licensee, and
63  * not to intellectual property embodied in modifications its licensee may
64  * make.
65  *
66  * 3.3. Redistribution of Executable. Redistribution in executable form of any
67  * substantial portion of the Covered Code or modification must reproduce the
68  * above Copyright Notice, and the following Disclaimer and Export Compliance
69  * provision in the documentation and/or other materials provided with the
70  * distribution.
71  *
72  * 3.4. Intel retains all right, title, and interest in and to the Original
73  * Intel Code.
74  *
75  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76  * Intel shall be used in advertising or otherwise to promote the sale, use or
77  * other dealings in products derived from or relating to the Covered Code
78  * without prior written authorization from Intel.
79  *
80  * 4. Disclaimer and Export Compliance
81  *
82  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88  * PARTICULAR PURPOSE.
89  *
90  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97  * LIMITED REMEDY.
98  *
99  * 4.3. Licensee shall not export, either directly or indirectly, any of this
100  * software or system incorporating such software without first obtaining any
101  * required license or other approval from the U. S. Department of Commerce or
102  * any other agency or department of the United States Government. In the
103  * event Licensee exports any such software from the United States or
104  * re-exports any such software from a foreign destination, Licensee shall
105  * ensure that the distribution and export/re-export of the software is in
106  * compliance with all laws, regulations, orders, or other restrictions of the
107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108  * any of its subsidiaries will export/re-export any technical data, process,
109  * software, or service, directly or indirectly, to any country for which the
110  * United States government or any agency thereof requires an export license,
111  * other governmental approval, or letter of assurance, without first obtaining
112  * such license, approval or letter.
113  *
114  *****************************************************************************
115  *
116  * Alternatively, you may choose to be licensed under the terms of the
117  * following license:
118  *
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.
133  *
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.
145  *
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.
149  *
150  *****************************************************************************/
151 
152 #ifndef __ACTBL1_H__
153 #define __ACTBL1_H__
154 
155 
156 /*******************************************************************************
157  *
158  * Additional ACPI Tables
159  *
160  * These tables are not consumed directly by the ACPICA subsystem, but are
161  * included here to support device drivers and the AML disassembler.
162  *
163  ******************************************************************************/
164 
165 
166 /*
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.
170  */
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_CEDT           "CEDT"      /* CXL Early Discovery Table */
176 #define ACPI_SIG_CPEP           "CPEP"      /* Corrected Platform Error Polling table */
177 #define ACPI_SIG_CSRT           "CSRT"      /* Core System Resource Table */
178 #define ACPI_SIG_DBG2           "DBG2"      /* Debug Port table type 2 */
179 #define ACPI_SIG_DBGP           "DBGP"      /* Debug Port table */
180 #define ACPI_SIG_DMAR           "DMAR"      /* DMA Remapping table */
181 #define ACPI_SIG_DRTM           "DRTM"      /* Dynamic Root of Trust for Measurement table */
182 #define ACPI_SIG_ECDT           "ECDT"      /* Embedded Controller Boot Resources Table */
183 #define ACPI_SIG_EINJ           "EINJ"      /* Error Injection table */
184 #define ACPI_SIG_ERST           "ERST"      /* Error Record Serialization Table */
185 #define ACPI_SIG_FPDT           "FPDT"      /* Firmware Performance Data Table */
186 #define ACPI_SIG_GTDT           "GTDT"      /* Generic Timer Description Table */
187 #define ACPI_SIG_HEST           "HEST"      /* Hardware Error Source Table */
188 #define ACPI_SIG_HMAT           "HMAT"      /* Heterogeneous Memory Attributes Table */
189 #define ACPI_SIG_HPET           "HPET"      /* High Precision Event Timer table */
190 #define ACPI_SIG_IBFT           "IBFT"      /* iSCSI Boot Firmware Table */
191 
192 #define ACPI_SIG_S3PT           "S3PT"      /* S3 Performance (sub)Table */
193 #define ACPI_SIG_PCCS           "PCC"       /* PCC Shared Memory Region */
194 
195 
196 /* Reserved table signatures */
197 
198 #define ACPI_SIG_MATR           "MATR"      /* Memory Address Translation Table */
199 #define ACPI_SIG_MSDM           "MSDM"      /* Microsoft Data Management Table */
200 
201 /*
202  * These tables have been seen in the field, but no definition has been found
203  */
204 #ifdef ACPI_UNDEFINED_TABLES
205 #define ACPI_SIG_ATKG           "ATKG"
206 #define ACPI_SIG_GSCI           "GSCI"      /* GMCH SCI table */
207 #define ACPI_SIG_IEIT           "IEIT"
208 #endif
209 
210 /*
211  * All tables must be byte-packed to match the ACPI specification, since
212  * the tables are provided by the system BIOS.
213  */
214 #pragma pack(1)
215 
216 /*
217  * Note: C bitfields are not used for this reason:
218  *
219  * "Bitfields are great and easy to read, but unfortunately the C language
220  * does not specify the layout of bitfields in memory, which means they are
221  * essentially useless for dealing with packed data in on-disk formats or
222  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
223  * this decision was a design error in C. Ritchie could have picked an order
224  * and stuck with it." Norman Ramsey.
225  * See http://stackoverflow.com/a/1053662/41661
226  */
227 
228 
229 /*******************************************************************************
230  *
231  * Common subtable headers
232  *
233  ******************************************************************************/
234 
235 /* Generic subtable header (used in MADT, SRAT, etc.) */
236 
237 typedef struct acpi_subtable_header
238 {
239     UINT8                   Type;
240     UINT8                   Length;
241 
242 } ACPI_SUBTABLE_HEADER;
243 
244 
245 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
246 
247 typedef struct acpi_whea_header
248 {
249     UINT8                   Action;
250     UINT8                   Instruction;
251     UINT8                   Flags;
252     UINT8                   Reserved;
253     ACPI_GENERIC_ADDRESS    RegisterRegion;
254     UINT64                  Value;              /* Value used with Read/Write register */
255     UINT64                  Mask;               /* Bitmask required for this register instruction */
256 
257 } ACPI_WHEA_HEADER;
258 
259 
260 /*******************************************************************************
261  *
262  * ASF - Alert Standard Format table (Signature "ASF!")
263  *       Revision 0x10
264  *
265  * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
266  *
267  ******************************************************************************/
268 
269 typedef struct acpi_table_asf
270 {
271     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
272 
273 } ACPI_TABLE_ASF;
274 
275 
276 /* ASF subtable header */
277 
278 typedef struct acpi_asf_header
279 {
280     UINT8                   Type;
281     UINT8                   Reserved;
282     UINT16                  Length;
283 
284 } ACPI_ASF_HEADER;
285 
286 
287 /* Values for Type field above */
288 
289 enum AcpiAsfType
290 {
291     ACPI_ASF_TYPE_INFO          = 0,
292     ACPI_ASF_TYPE_ALERT         = 1,
293     ACPI_ASF_TYPE_CONTROL       = 2,
294     ACPI_ASF_TYPE_BOOT          = 3,
295     ACPI_ASF_TYPE_ADDRESS       = 4,
296     ACPI_ASF_TYPE_RESERVED      = 5
297 };
298 
299 /*
300  * ASF subtables
301  */
302 
303 /* 0: ASF Information */
304 
305 typedef struct acpi_asf_info
306 {
307     ACPI_ASF_HEADER         Header;
308     UINT8                   MinResetValue;
309     UINT8                   MinPollInterval;
310     UINT16                  SystemId;
311     UINT32                  MfgId;
312     UINT8                   Flags;
313     UINT8                   Reserved2[3];
314 
315 } ACPI_ASF_INFO;
316 
317 /* Masks for Flags field above */
318 
319 #define ACPI_ASF_SMBUS_PROTOCOLS    (1)
320 
321 
322 /* 1: ASF Alerts */
323 
324 typedef struct acpi_asf_alert
325 {
326     ACPI_ASF_HEADER         Header;
327     UINT8                   AssertMask;
328     UINT8                   DeassertMask;
329     UINT8                   Alerts;
330     UINT8                   DataLength;
331 
332 } ACPI_ASF_ALERT;
333 
334 typedef struct acpi_asf_alert_data
335 {
336     UINT8                   Address;
337     UINT8                   Command;
338     UINT8                   Mask;
339     UINT8                   Value;
340     UINT8                   SensorType;
341     UINT8                   Type;
342     UINT8                   Offset;
343     UINT8                   SourceType;
344     UINT8                   Severity;
345     UINT8                   SensorNumber;
346     UINT8                   Entity;
347     UINT8                   Instance;
348 
349 } ACPI_ASF_ALERT_DATA;
350 
351 
352 /* 2: ASF Remote Control */
353 
354 typedef struct acpi_asf_remote
355 {
356     ACPI_ASF_HEADER         Header;
357     UINT8                   Controls;
358     UINT8                   DataLength;
359     UINT16                  Reserved2;
360 
361 } ACPI_ASF_REMOTE;
362 
363 typedef struct acpi_asf_control_data
364 {
365     UINT8                   Function;
366     UINT8                   Address;
367     UINT8                   Command;
368     UINT8                   Value;
369 
370 } ACPI_ASF_CONTROL_DATA;
371 
372 
373 /* 3: ASF RMCP Boot Options */
374 
375 typedef struct acpi_asf_rmcp
376 {
377     ACPI_ASF_HEADER         Header;
378     UINT8                   Capabilities[7];
379     UINT8                   CompletionCode;
380     UINT32                  EnterpriseId;
381     UINT8                   Command;
382     UINT16                  Parameter;
383     UINT16                  BootOptions;
384     UINT16                  OemParameters;
385 
386 } ACPI_ASF_RMCP;
387 
388 
389 /* 4: ASF Address */
390 
391 typedef struct acpi_asf_address
392 {
393     ACPI_ASF_HEADER         Header;
394     UINT8                   EpromAddress;
395     UINT8                   Devices;
396 
397 } ACPI_ASF_ADDRESS;
398 
399 
400 /*******************************************************************************
401  *
402  * BERT - Boot Error Record Table (ACPI 4.0)
403  *        Version 1
404  *
405  ******************************************************************************/
406 
407 typedef struct acpi_table_bert
408 {
409     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
410     UINT32                  RegionLength;       /* Length of the boot error region */
411     UINT64                  Address;            /* Physical address of the error region */
412 
413 } ACPI_TABLE_BERT;
414 
415 
416 /* Boot Error Region (not a subtable, pointed to by Address field above) */
417 
418 typedef struct acpi_bert_region
419 {
420     UINT32                  BlockStatus;        /* Type of error information */
421     UINT32                  RawDataOffset;      /* Offset to raw error data */
422     UINT32                  RawDataLength;      /* Length of raw error data */
423     UINT32                  DataLength;         /* Length of generic error data */
424     UINT32                  ErrorSeverity;      /* Severity code */
425 
426 } ACPI_BERT_REGION;
427 
428 /* Values for BlockStatus flags above */
429 
430 #define ACPI_BERT_UNCORRECTABLE             (1)
431 #define ACPI_BERT_CORRECTABLE               (1<<1)
432 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE    (1<<2)
433 #define ACPI_BERT_MULTIPLE_CORRECTABLE      (1<<3)
434 #define ACPI_BERT_ERROR_ENTRY_COUNT         (0xFF<<4) /* 8 bits, error count */
435 
436 /* Values for ErrorSeverity above */
437 
438 enum AcpiBertErrorSeverity
439 {
440     ACPI_BERT_ERROR_CORRECTABLE     = 0,
441     ACPI_BERT_ERROR_FATAL           = 1,
442     ACPI_BERT_ERROR_CORRECTED       = 2,
443     ACPI_BERT_ERROR_NONE            = 3,
444     ACPI_BERT_ERROR_RESERVED        = 4     /* 4 and greater are reserved */
445 };
446 
447 /*
448  * Note: The generic error data that follows the ErrorSeverity field above
449  * uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below
450  */
451 
452 
453 /*******************************************************************************
454  *
455  * BGRT - Boot Graphics Resource Table (ACPI 5.0)
456  *        Version 1
457  *
458  ******************************************************************************/
459 
460 typedef struct acpi_table_bgrt
461 {
462     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
463     UINT16                  Version;
464     UINT8                   Status;
465     UINT8                   ImageType;
466     UINT64                  ImageAddress;
467     UINT32                  ImageOffsetX;
468     UINT32                  ImageOffsetY;
469 
470 } ACPI_TABLE_BGRT;
471 
472 /* Flags for Status field above */
473 
474 #define ACPI_BGRT_DISPLAYED                 (1)
475 #define ACPI_BGRT_ORIENTATION_OFFSET        (3 << 1)
476 
477 
478 /*******************************************************************************
479  *
480  * BOOT - Simple Boot Flag Table
481  *        Version 1
482  *
483  * Conforms to the "Simple Boot Flag Specification", Version 2.1
484  *
485  ******************************************************************************/
486 
487 typedef struct acpi_table_boot
488 {
489     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
490     UINT8                   CmosIndex;          /* Index in CMOS RAM for the boot register */
491     UINT8                   Reserved[3];
492 
493 } ACPI_TABLE_BOOT;
494 
495 
496 /*******************************************************************************
497  *
498  * CEDT - CXL Early Discovery Table
499  *        Version 1
500  *
501  * Conforms to the "CXL Early Discovery Table" (CXL 2.0)
502  *
503  ******************************************************************************/
504 
505 typedef struct acpi_table_cedt
506 {
507     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
508 
509 } ACPI_TABLE_CEDT;
510 
511 /* CEDT subtable header (Performance Record Structure) */
512 
513 typedef struct acpi_cedt_header
514 {
515     UINT8                   Type;
516     UINT8                   Reserved;
517     UINT16                  Length;
518 
519 } ACPI_CEDT_HEADER;
520 
521 /* Values for Type field above */
522 
523 enum AcpiCedtType
524 {
525     ACPI_CEDT_TYPE_CHBS                 = 0,
526     ACPI_CEDT_TYPE_RESERVED             = 1
527 };
528 
529 
530 /*
531  * CEDT subtables
532  */
533 
534 /* 0: CXL Host Bridge Structure */
535 
536 typedef struct acpi_cedt_chbs
537 {
538     ACPI_CEDT_HEADER        Header;
539     UINT32                  Uid;
540     UINT32                  CxlVersion;
541     UINT32                  Reserved;
542     UINT64                  Base;
543     UINT64                  Length;
544 
545 } ACPI_CEDT_CHBS;
546 
547 
548 /*******************************************************************************
549  *
550  * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
551  *        Version 1
552  *
553  ******************************************************************************/
554 
555 typedef struct acpi_table_cpep
556 {
557     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
558     UINT64                  Reserved;
559 
560 } ACPI_TABLE_CPEP;
561 
562 
563 /* Subtable */
564 
565 typedef struct acpi_cpep_polling
566 {
567     ACPI_SUBTABLE_HEADER    Header;
568     UINT8                   Id;                 /* Processor ID */
569     UINT8                   Eid;                /* Processor EID */
570     UINT32                  Interval;           /* Polling interval (msec) */
571 
572 } ACPI_CPEP_POLLING;
573 
574 
575 /*******************************************************************************
576  *
577  * CSRT - Core System Resource Table
578  *        Version 0
579  *
580  * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
581  *
582  ******************************************************************************/
583 
584 typedef struct acpi_table_csrt
585 {
586     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
587 
588 } ACPI_TABLE_CSRT;
589 
590 
591 /* Resource Group subtable */
592 
593 typedef struct acpi_csrt_group
594 {
595     UINT32                  Length;
596     UINT32                  VendorId;
597     UINT32                  SubvendorId;
598     UINT16                  DeviceId;
599     UINT16                  SubdeviceId;
600     UINT16                  Revision;
601     UINT16                  Reserved;
602     UINT32                  SharedInfoLength;
603 
604     /* Shared data immediately follows (Length = SharedInfoLength) */
605 
606 } ACPI_CSRT_GROUP;
607 
608 /* Shared Info subtable */
609 
610 typedef struct acpi_csrt_shared_info
611 {
612     UINT16                  MajorVersion;
613     UINT16                  MinorVersion;
614     UINT32                  MmioBaseLow;
615     UINT32                  MmioBaseHigh;
616     UINT32                  GsiInterrupt;
617     UINT8                   InterruptPolarity;
618     UINT8                   InterruptMode;
619     UINT8                   NumChannels;
620     UINT8                   DmaAddressWidth;
621     UINT16                  BaseRequestLine;
622     UINT16                  NumHandshakeSignals;
623     UINT32                  MaxBlockSize;
624 
625     /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
626 
627 } ACPI_CSRT_SHARED_INFO;
628 
629 /* Resource Descriptor subtable */
630 
631 typedef struct acpi_csrt_descriptor
632 {
633     UINT32                  Length;
634     UINT16                  Type;
635     UINT16                  Subtype;
636     UINT32                  Uid;
637 
638     /* Resource-specific information immediately follows */
639 
640 } ACPI_CSRT_DESCRIPTOR;
641 
642 
643 /* Resource Types */
644 
645 #define ACPI_CSRT_TYPE_INTERRUPT    0x0001
646 #define ACPI_CSRT_TYPE_TIMER        0x0002
647 #define ACPI_CSRT_TYPE_DMA          0x0003
648 
649 /* Resource Subtypes */
650 
651 #define ACPI_CSRT_XRUPT_LINE        0x0000
652 #define ACPI_CSRT_XRUPT_CONTROLLER  0x0001
653 #define ACPI_CSRT_TIMER             0x0000
654 #define ACPI_CSRT_DMA_CHANNEL       0x0000
655 #define ACPI_CSRT_DMA_CONTROLLER    0x0001
656 
657 
658 /*******************************************************************************
659  *
660  * DBG2 - Debug Port Table 2
661  *        Version 0 (Both main table and subtables)
662  *
663  * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
664  *
665  ******************************************************************************/
666 
667 typedef struct acpi_table_dbg2
668 {
669     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
670     UINT32                  InfoOffset;
671     UINT32                  InfoCount;
672 
673 } ACPI_TABLE_DBG2;
674 
675 
676 typedef struct acpi_dbg2_header
677 {
678     UINT32                  InfoOffset;
679     UINT32                  InfoCount;
680 
681 } ACPI_DBG2_HEADER;
682 
683 
684 /* Debug Device Information Subtable */
685 
686 typedef struct acpi_dbg2_device
687 {
688     UINT8                   Revision;
689     UINT16                  Length;
690     UINT8                   RegisterCount;      /* Number of BaseAddress registers */
691     UINT16                  NamepathLength;
692     UINT16                  NamepathOffset;
693     UINT16                  OemDataLength;
694     UINT16                  OemDataOffset;
695     UINT16                  PortType;
696     UINT16                  PortSubtype;
697     UINT16                  Reserved;
698     UINT16                  BaseAddressOffset;
699     UINT16                  AddressSizeOffset;
700     /*
701      * Data that follows:
702      *    BaseAddress (required) - Each in 12-byte Generic Address Structure format.
703      *    AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.
704      *    Namepath    (required) - Null terminated string. Single dot if not supported.
705      *    OemData     (optional) - Length is OemDataLength.
706      */
707 } ACPI_DBG2_DEVICE;
708 
709 /* Types for PortType field above */
710 
711 #define ACPI_DBG2_SERIAL_PORT       0x8000
712 #define ACPI_DBG2_1394_PORT         0x8001
713 #define ACPI_DBG2_USB_PORT          0x8002
714 #define ACPI_DBG2_NET_PORT          0x8003
715 
716 /* Subtypes for PortSubtype field above */
717 
718 #define ACPI_DBG2_16550_COMPATIBLE  0x0000
719 #define ACPI_DBG2_16550_SUBSET      0x0001
720 #define ACPI_DBG2_ARM_PL011         0x0003
721 #define ACPI_DBG2_ARM_SBSA_32BIT    0x000D
722 #define ACPI_DBG2_ARM_SBSA_GENERIC  0x000E
723 #define ACPI_DBG2_ARM_DCC           0x000F
724 #define ACPI_DBG2_BCM2835           0x0010
725 
726 #define ACPI_DBG2_1394_STANDARD     0x0000
727 
728 #define ACPI_DBG2_USB_XHCI          0x0000
729 #define ACPI_DBG2_USB_EHCI          0x0001
730 
731 
732 /*******************************************************************************
733  *
734  * DBGP - Debug Port table
735  *        Version 1
736  *
737  * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
738  *
739  ******************************************************************************/
740 
741 typedef struct acpi_table_dbgp
742 {
743     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
744     UINT8                   Type;               /* 0=full 16550, 1=subset of 16550 */
745     UINT8                   Reserved[3];
746     ACPI_GENERIC_ADDRESS    DebugPort;
747 
748 } ACPI_TABLE_DBGP;
749 
750 
751 /*******************************************************************************
752  *
753  * DMAR - DMA Remapping table
754  *        Version 1
755  *
756  * Conforms to "Intel Virtualization Technology for Directed I/O",
757  * Version 2.3, October 2014
758  *
759  ******************************************************************************/
760 
761 typedef struct acpi_table_dmar
762 {
763     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
764     UINT8                   Width;              /* Host Address Width */
765     UINT8                   Flags;
766     UINT8                   Reserved[10];
767 
768 } ACPI_TABLE_DMAR;
769 
770 /* Masks for Flags field above */
771 
772 #define ACPI_DMAR_INTR_REMAP        (1)
773 #define ACPI_DMAR_X2APIC_OPT_OUT    (1<<1)
774 #define ACPI_DMAR_X2APIC_MODE       (1<<2)
775 
776 
777 /* DMAR subtable header */
778 
779 typedef struct acpi_dmar_header
780 {
781     UINT16                  Type;
782     UINT16                  Length;
783 
784 } ACPI_DMAR_HEADER;
785 
786 /* Values for subtable type in ACPI_DMAR_HEADER */
787 
788 enum AcpiDmarType
789 {
790     ACPI_DMAR_TYPE_HARDWARE_UNIT        = 0,
791     ACPI_DMAR_TYPE_RESERVED_MEMORY      = 1,
792     ACPI_DMAR_TYPE_ROOT_ATS             = 2,
793     ACPI_DMAR_TYPE_HARDWARE_AFFINITY    = 3,
794     ACPI_DMAR_TYPE_NAMESPACE            = 4,
795     ACPI_DMAR_TYPE_RESERVED             = 5     /* 5 and greater are reserved */
796 };
797 
798 
799 /* DMAR Device Scope structure */
800 
801 typedef struct acpi_dmar_device_scope
802 {
803     UINT8                   EntryType;
804     UINT8                   Length;
805     UINT16                  Reserved;
806     UINT8                   EnumerationId;
807     UINT8                   Bus;
808 
809 } ACPI_DMAR_DEVICE_SCOPE;
810 
811 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */
812 
813 enum AcpiDmarScopeType
814 {
815     ACPI_DMAR_SCOPE_TYPE_NOT_USED       = 0,
816     ACPI_DMAR_SCOPE_TYPE_ENDPOINT       = 1,
817     ACPI_DMAR_SCOPE_TYPE_BRIDGE         = 2,
818     ACPI_DMAR_SCOPE_TYPE_IOAPIC         = 3,
819     ACPI_DMAR_SCOPE_TYPE_HPET           = 4,
820     ACPI_DMAR_SCOPE_TYPE_NAMESPACE      = 5,
821     ACPI_DMAR_SCOPE_TYPE_RESERVED       = 6     /* 6 and greater are reserved */
822 };
823 
824 typedef struct acpi_dmar_pci_path
825 {
826     UINT8                   Device;
827     UINT8                   Function;
828 
829 } ACPI_DMAR_PCI_PATH;
830 
831 
832 /*
833  * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
834  */
835 
836 /* 0: Hardware Unit Definition */
837 
838 typedef struct acpi_dmar_hardware_unit
839 {
840     ACPI_DMAR_HEADER        Header;
841     UINT8                   Flags;
842     UINT8                   Reserved;
843     UINT16                  Segment;
844     UINT64                  Address;            /* Register Base Address */
845 
846 } ACPI_DMAR_HARDWARE_UNIT;
847 
848 /* Masks for Flags field above */
849 
850 #define ACPI_DMAR_INCLUDE_ALL       (1)
851 
852 
853 /* 1: Reserved Memory Definition */
854 
855 typedef struct acpi_dmar_reserved_memory
856 {
857     ACPI_DMAR_HEADER        Header;
858     UINT16                  Reserved;
859     UINT16                  Segment;
860     UINT64                  BaseAddress;        /* 4K aligned base address */
861     UINT64                  EndAddress;         /* 4K aligned limit address */
862 
863 } ACPI_DMAR_RESERVED_MEMORY;
864 
865 /* Masks for Flags field above */
866 
867 #define ACPI_DMAR_ALLOW_ALL         (1)
868 
869 
870 /* 2: Root Port ATS Capability Reporting Structure */
871 
872 typedef struct acpi_dmar_atsr
873 {
874     ACPI_DMAR_HEADER        Header;
875     UINT8                   Flags;
876     UINT8                   Reserved;
877     UINT16                  Segment;
878 
879 } ACPI_DMAR_ATSR;
880 
881 /* Masks for Flags field above */
882 
883 #define ACPI_DMAR_ALL_PORTS         (1)
884 
885 
886 /* 3: Remapping Hardware Static Affinity Structure */
887 
888 typedef struct acpi_dmar_rhsa
889 {
890     ACPI_DMAR_HEADER        Header;
891     UINT32                  Reserved;
892     UINT64                  BaseAddress;
893     UINT32                  ProximityDomain;
894 
895 } ACPI_DMAR_RHSA;
896 
897 
898 /* 4: ACPI Namespace Device Declaration Structure */
899 
900 typedef struct acpi_dmar_andd
901 {
902     ACPI_DMAR_HEADER        Header;
903     UINT8                   Reserved[3];
904     UINT8                   DeviceNumber;
905     char                    DeviceName[1];
906 
907 } ACPI_DMAR_ANDD;
908 
909 
910 /*******************************************************************************
911  *
912  * DRTM - Dynamic Root of Trust for Measurement table
913  * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
914  * Table version 1
915  *
916  ******************************************************************************/
917 
918 typedef struct acpi_table_drtm
919 {
920     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
921     UINT64                  EntryBaseAddress;
922     UINT64                  EntryLength;
923     UINT32                  EntryAddress32;
924     UINT64                  EntryAddress64;
925     UINT64                  ExitAddress;
926     UINT64                  LogAreaAddress;
927     UINT32                  LogAreaLength;
928     UINT64                  ArchDependentAddress;
929     UINT32                  Flags;
930 
931 } ACPI_TABLE_DRTM;
932 
933 /* Flag Definitions for above */
934 
935 #define ACPI_DRTM_ACCESS_ALLOWED            (1)
936 #define ACPI_DRTM_ENABLE_GAP_CODE           (1<<1)
937 #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS   (1<<2)
938 #define ACPI_DRTM_AUTHORITY_ORDER           (1<<3)
939 
940 
941 /* 1) Validated Tables List (64-bit addresses) */
942 
943 typedef struct acpi_drtm_vtable_list
944 {
945     UINT32                  ValidatedTableCount;
946     UINT64                  ValidatedTables[1];
947 
948 } ACPI_DRTM_VTABLE_LIST;
949 
950 /* 2) Resources List (of Resource Descriptors) */
951 
952 /* Resource Descriptor */
953 
954 typedef struct acpi_drtm_resource
955 {
956     UINT8                   Size[7];
957     UINT8                   Type;
958     UINT64                  Address;
959 
960 } ACPI_DRTM_RESOURCE;
961 
962 typedef struct acpi_drtm_resource_list
963 {
964     UINT32                  ResourceCount;
965     ACPI_DRTM_RESOURCE      Resources[1];
966 
967 } ACPI_DRTM_RESOURCE_LIST;
968 
969 /* 3) Platform-specific Identifiers List */
970 
971 typedef struct acpi_drtm_dps_id
972 {
973     UINT32                  DpsIdLength;
974     UINT8                   DpsId[16];
975 
976 } ACPI_DRTM_DPS_ID;
977 
978 
979 /*******************************************************************************
980  *
981  * ECDT - Embedded Controller Boot Resources Table
982  *        Version 1
983  *
984  ******************************************************************************/
985 
986 typedef struct acpi_table_ecdt
987 {
988     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
989     ACPI_GENERIC_ADDRESS    Control;            /* Address of EC command/status register */
990     ACPI_GENERIC_ADDRESS    Data;               /* Address of EC data register */
991     UINT32                  Uid;                /* Unique ID - must be same as the EC _UID method */
992     UINT8                   Gpe;                /* The GPE for the EC */
993     UINT8                   Id[1];              /* Full namepath of the EC in the ACPI namespace */
994 
995 } ACPI_TABLE_ECDT;
996 
997 
998 /*******************************************************************************
999  *
1000  * EINJ - Error Injection Table (ACPI 4.0)
1001  *        Version 1
1002  *
1003  ******************************************************************************/
1004 
1005 typedef struct acpi_table_einj
1006 {
1007     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1008     UINT32                  HeaderLength;
1009     UINT8                   Flags;
1010     UINT8                   Reserved[3];
1011     UINT32                  Entries;
1012 
1013 } ACPI_TABLE_EINJ;
1014 
1015 
1016 /* EINJ Injection Instruction Entries (actions) */
1017 
1018 typedef struct acpi_einj_entry
1019 {
1020     ACPI_WHEA_HEADER        WheaHeader;         /* Common header for WHEA tables */
1021 
1022 } ACPI_EINJ_ENTRY;
1023 
1024 /* Masks for Flags field above */
1025 
1026 #define ACPI_EINJ_PRESERVE          (1)
1027 
1028 /* Values for Action field above */
1029 
1030 enum AcpiEinjActions
1031 {
1032     ACPI_EINJ_BEGIN_OPERATION               = 0,
1033     ACPI_EINJ_GET_TRIGGER_TABLE             = 1,
1034     ACPI_EINJ_SET_ERROR_TYPE                = 2,
1035     ACPI_EINJ_GET_ERROR_TYPE                = 3,
1036     ACPI_EINJ_END_OPERATION                 = 4,
1037     ACPI_EINJ_EXECUTE_OPERATION             = 5,
1038     ACPI_EINJ_CHECK_BUSY_STATUS             = 6,
1039     ACPI_EINJ_GET_COMMAND_STATUS            = 7,
1040     ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS   = 8,
1041     ACPI_EINJ_GET_EXECUTE_TIMINGS           = 9,
1042     ACPI_EINJ_ACTION_RESERVED               = 10,    /* 10 and greater are reserved */
1043     ACPI_EINJ_TRIGGER_ERROR                 = 0xFF   /* Except for this value */
1044 };
1045 
1046 /* Values for Instruction field above */
1047 
1048 enum AcpiEinjInstructions
1049 {
1050     ACPI_EINJ_READ_REGISTER         = 0,
1051     ACPI_EINJ_READ_REGISTER_VALUE   = 1,
1052     ACPI_EINJ_WRITE_REGISTER        = 2,
1053     ACPI_EINJ_WRITE_REGISTER_VALUE  = 3,
1054     ACPI_EINJ_NOOP                  = 4,
1055     ACPI_EINJ_FLUSH_CACHELINE       = 5,
1056     ACPI_EINJ_INSTRUCTION_RESERVED  = 6     /* 6 and greater are reserved */
1057 };
1058 
1059 typedef struct acpi_einj_error_type_with_addr
1060 {
1061     UINT32                  ErrorType;
1062     UINT32                  VendorStructOffset;
1063     UINT32                  Flags;
1064     UINT32                  ApicId;
1065     UINT64                  Address;
1066     UINT64                  Range;
1067     UINT32                  PcieId;
1068 
1069 } ACPI_EINJ_ERROR_TYPE_WITH_ADDR;
1070 
1071 typedef struct acpi_einj_vendor
1072 {
1073     UINT32                  Length;
1074     UINT32                  PcieId;
1075     UINT16                  VendorId;
1076     UINT16                  DeviceId;
1077     UINT8                   RevisionId;
1078     UINT8                   Reserved[3];
1079 
1080 } ACPI_EINJ_VENDOR;
1081 
1082 
1083 /* EINJ Trigger Error Action Table */
1084 
1085 typedef struct acpi_einj_trigger
1086 {
1087     UINT32                  HeaderSize;
1088     UINT32                  Revision;
1089     UINT32                  TableSize;
1090     UINT32                  EntryCount;
1091 
1092 } ACPI_EINJ_TRIGGER;
1093 
1094 /* Command status return values */
1095 
1096 enum AcpiEinjCommandStatus
1097 {
1098     ACPI_EINJ_SUCCESS               = 0,
1099     ACPI_EINJ_FAILURE               = 1,
1100     ACPI_EINJ_INVALID_ACCESS        = 2,
1101     ACPI_EINJ_STATUS_RESERVED       = 3     /* 3 and greater are reserved */
1102 };
1103 
1104 
1105 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
1106 
1107 #define ACPI_EINJ_PROCESSOR_CORRECTABLE     (1)
1108 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE   (1<<1)
1109 #define ACPI_EINJ_PROCESSOR_FATAL           (1<<2)
1110 #define ACPI_EINJ_MEMORY_CORRECTABLE        (1<<3)
1111 #define ACPI_EINJ_MEMORY_UNCORRECTABLE      (1<<4)
1112 #define ACPI_EINJ_MEMORY_FATAL              (1<<5)
1113 #define ACPI_EINJ_PCIX_CORRECTABLE          (1<<6)
1114 #define ACPI_EINJ_PCIX_UNCORRECTABLE        (1<<7)
1115 #define ACPI_EINJ_PCIX_FATAL                (1<<8)
1116 #define ACPI_EINJ_PLATFORM_CORRECTABLE      (1<<9)
1117 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE    (1<<10)
1118 #define ACPI_EINJ_PLATFORM_FATAL            (1<<11)
1119 #define ACPI_EINJ_VENDOR_DEFINED            (1<<31)
1120 
1121 
1122 /*******************************************************************************
1123  *
1124  * ERST - Error Record Serialization Table (ACPI 4.0)
1125  *        Version 1
1126  *
1127  ******************************************************************************/
1128 
1129 typedef struct acpi_table_erst
1130 {
1131     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1132     UINT32                  HeaderLength;
1133     UINT32                  Reserved;
1134     UINT32                  Entries;
1135 
1136 } ACPI_TABLE_ERST;
1137 
1138 
1139 /* ERST Serialization Entries (actions) */
1140 
1141 typedef struct acpi_erst_entry
1142 {
1143     ACPI_WHEA_HEADER        WheaHeader;         /* Common header for WHEA tables */
1144 
1145 } ACPI_ERST_ENTRY;
1146 
1147 /* Masks for Flags field above */
1148 
1149 #define ACPI_ERST_PRESERVE          (1)
1150 
1151 /* Values for Action field above */
1152 
1153 enum AcpiErstActions
1154 {
1155     ACPI_ERST_BEGIN_WRITE           = 0,
1156     ACPI_ERST_BEGIN_READ            = 1,
1157     ACPI_ERST_BEGIN_CLEAR           = 2,
1158     ACPI_ERST_END                   = 3,
1159     ACPI_ERST_SET_RECORD_OFFSET     = 4,
1160     ACPI_ERST_EXECUTE_OPERATION     = 5,
1161     ACPI_ERST_CHECK_BUSY_STATUS     = 6,
1162     ACPI_ERST_GET_COMMAND_STATUS    = 7,
1163     ACPI_ERST_GET_RECORD_ID         = 8,
1164     ACPI_ERST_SET_RECORD_ID         = 9,
1165     ACPI_ERST_GET_RECORD_COUNT      = 10,
1166     ACPI_ERST_BEGIN_DUMMY_WRIITE    = 11,
1167     ACPI_ERST_NOT_USED              = 12,
1168     ACPI_ERST_GET_ERROR_RANGE       = 13,
1169     ACPI_ERST_GET_ERROR_LENGTH      = 14,
1170     ACPI_ERST_GET_ERROR_ATTRIBUTES  = 15,
1171     ACPI_ERST_EXECUTE_TIMINGS       = 16,
1172     ACPI_ERST_ACTION_RESERVED       = 17    /* 17 and greater are reserved */
1173 };
1174 
1175 /* Values for Instruction field above */
1176 
1177 enum AcpiErstInstructions
1178 {
1179     ACPI_ERST_READ_REGISTER         = 0,
1180     ACPI_ERST_READ_REGISTER_VALUE   = 1,
1181     ACPI_ERST_WRITE_REGISTER        = 2,
1182     ACPI_ERST_WRITE_REGISTER_VALUE  = 3,
1183     ACPI_ERST_NOOP                  = 4,
1184     ACPI_ERST_LOAD_VAR1             = 5,
1185     ACPI_ERST_LOAD_VAR2             = 6,
1186     ACPI_ERST_STORE_VAR1            = 7,
1187     ACPI_ERST_ADD                   = 8,
1188     ACPI_ERST_SUBTRACT              = 9,
1189     ACPI_ERST_ADD_VALUE             = 10,
1190     ACPI_ERST_SUBTRACT_VALUE        = 11,
1191     ACPI_ERST_STALL                 = 12,
1192     ACPI_ERST_STALL_WHILE_TRUE      = 13,
1193     ACPI_ERST_SKIP_NEXT_IF_TRUE     = 14,
1194     ACPI_ERST_GOTO                  = 15,
1195     ACPI_ERST_SET_SRC_ADDRESS_BASE  = 16,
1196     ACPI_ERST_SET_DST_ADDRESS_BASE  = 17,
1197     ACPI_ERST_MOVE_DATA             = 18,
1198     ACPI_ERST_INSTRUCTION_RESERVED  = 19    /* 19 and greater are reserved */
1199 };
1200 
1201 /* Command status return values */
1202 
1203 enum AcpiErstCommandStatus
1204 {
1205     ACPI_ERST_SUCCESS                = 0,
1206     ACPI_ERST_NO_SPACE              = 1,
1207     ACPI_ERST_NOT_AVAILABLE         = 2,
1208     ACPI_ERST_FAILURE               = 3,
1209     ACPI_ERST_RECORD_EMPTY          = 4,
1210     ACPI_ERST_NOT_FOUND             = 5,
1211     ACPI_ERST_STATUS_RESERVED       = 6     /* 6 and greater are reserved */
1212 };
1213 
1214 
1215 /* Error Record Serialization Information */
1216 
1217 typedef struct acpi_erst_info
1218 {
1219     UINT16                  Signature;          /* Should be "ER" */
1220     UINT8                   Data[48];
1221 
1222 } ACPI_ERST_INFO;
1223 
1224 
1225 /*******************************************************************************
1226  *
1227  * FPDT - Firmware Performance Data Table (ACPI 5.0)
1228  *        Version 1
1229  *
1230  ******************************************************************************/
1231 
1232 typedef struct acpi_table_fpdt
1233 {
1234     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1235 
1236 } ACPI_TABLE_FPDT;
1237 
1238 
1239 /* FPDT subtable header (Performance Record Structure) */
1240 
1241 typedef struct acpi_fpdt_header
1242 {
1243     UINT16                  Type;
1244     UINT8                   Length;
1245     UINT8                   Revision;
1246 
1247 } ACPI_FPDT_HEADER;
1248 
1249 /* Values for Type field above */
1250 
1251 enum AcpiFpdtType
1252 {
1253     ACPI_FPDT_TYPE_BOOT                 = 0,
1254     ACPI_FPDT_TYPE_S3PERF               = 1
1255 };
1256 
1257 
1258 /*
1259  * FPDT subtables
1260  */
1261 
1262 /* 0: Firmware Basic Boot Performance Record */
1263 
1264 typedef struct acpi_fpdt_boot_pointer
1265 {
1266     ACPI_FPDT_HEADER        Header;
1267     UINT8                   Reserved[4];
1268     UINT64                  Address;
1269 
1270 } ACPI_FPDT_BOOT_POINTER;
1271 
1272 
1273 /* 1: S3 Performance Table Pointer Record */
1274 
1275 typedef struct acpi_fpdt_s3pt_pointer
1276 {
1277     ACPI_FPDT_HEADER        Header;
1278     UINT8                   Reserved[4];
1279     UINT64                  Address;
1280 
1281 } ACPI_FPDT_S3PT_POINTER;
1282 
1283 
1284 /*
1285  * S3PT - S3 Performance Table. This table is pointed to by the
1286  * S3 Pointer Record above.
1287  */
1288 typedef struct acpi_table_s3pt
1289 {
1290     UINT8                   Signature[4]; /* "S3PT" */
1291     UINT32                  Length;
1292 
1293 } ACPI_TABLE_S3PT;
1294 
1295 
1296 /*
1297  * S3PT Subtables (Not part of the actual FPDT)
1298  */
1299 
1300 /* Values for Type field in S3PT header */
1301 
1302 enum AcpiS3ptType
1303 {
1304     ACPI_S3PT_TYPE_RESUME               = 0,
1305     ACPI_S3PT_TYPE_SUSPEND              = 1,
1306     ACPI_FPDT_BOOT_PERFORMANCE          = 2
1307 };
1308 
1309 typedef struct acpi_s3pt_resume
1310 {
1311     ACPI_FPDT_HEADER        Header;
1312     UINT32                  ResumeCount;
1313     UINT64                  FullResume;
1314     UINT64                  AverageResume;
1315 
1316 } ACPI_S3PT_RESUME;
1317 
1318 typedef struct acpi_s3pt_suspend
1319 {
1320     ACPI_FPDT_HEADER        Header;
1321     UINT64                  SuspendStart;
1322     UINT64                  SuspendEnd;
1323 
1324 } ACPI_S3PT_SUSPEND;
1325 
1326 
1327 /*
1328  * FPDT Boot Performance Record (Not part of the actual FPDT)
1329  */
1330 typedef struct acpi_fpdt_boot
1331 {
1332     ACPI_FPDT_HEADER        Header;
1333     UINT8                   Reserved[4];
1334     UINT64                  ResetEnd;
1335     UINT64                  LoadStart;
1336     UINT64                  StartupStart;
1337     UINT64                  ExitServicesEntry;
1338     UINT64                  ExitServicesExit;
1339 
1340 } ACPI_FPDT_BOOT;
1341 
1342 
1343 /*******************************************************************************
1344  *
1345  * GTDT - Generic Timer Description Table (ACPI 5.1)
1346  *        Version 2
1347  *
1348  ******************************************************************************/
1349 
1350 typedef struct acpi_table_gtdt
1351 {
1352     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1353     UINT64                  CounterBlockAddresss;
1354     UINT32                  Reserved;
1355     UINT32                  SecureEl1Interrupt;
1356     UINT32                  SecureEl1Flags;
1357     UINT32                  NonSecureEl1Interrupt;
1358     UINT32                  NonSecureEl1Flags;
1359     UINT32                  VirtualTimerInterrupt;
1360     UINT32                  VirtualTimerFlags;
1361     UINT32                  NonSecureEl2Interrupt;
1362     UINT32                  NonSecureEl2Flags;
1363     UINT64                  CounterReadBlockAddress;
1364     UINT32                  PlatformTimerCount;
1365     UINT32                  PlatformTimerOffset;
1366 
1367 } ACPI_TABLE_GTDT;
1368 
1369 /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
1370 
1371 #define ACPI_GTDT_INTERRUPT_MODE        (1)
1372 #define ACPI_GTDT_INTERRUPT_POLARITY    (1<<1)
1373 #define ACPI_GTDT_ALWAYS_ON             (1<<2)
1374 
1375 typedef struct acpi_gtdt_el2
1376 {
1377     UINT32                  VirtualEL2TimerGsiv;
1378     UINT32                  VirtualEL2TimerFlags;
1379 } ACPI_GTDT_EL2;
1380 
1381 
1382 /* Common GTDT subtable header */
1383 
1384 typedef struct acpi_gtdt_header
1385 {
1386     UINT8                   Type;
1387     UINT16                  Length;
1388 
1389 } ACPI_GTDT_HEADER;
1390 
1391 /* Values for GTDT subtable type above */
1392 
1393 enum AcpiGtdtType
1394 {
1395     ACPI_GTDT_TYPE_TIMER_BLOCK      = 0,
1396     ACPI_GTDT_TYPE_WATCHDOG         = 1,
1397     ACPI_GTDT_TYPE_RESERVED         = 2    /* 2 and greater are reserved */
1398 };
1399 
1400 
1401 /* GTDT Subtables, correspond to Type in acpi_gtdt_header */
1402 
1403 /* 0: Generic Timer Block */
1404 
1405 typedef struct acpi_gtdt_timer_block
1406 {
1407     ACPI_GTDT_HEADER        Header;
1408     UINT8                   Reserved;
1409     UINT64                  BlockAddress;
1410     UINT32                  TimerCount;
1411     UINT32                  TimerOffset;
1412 
1413 } ACPI_GTDT_TIMER_BLOCK;
1414 
1415 /* Timer Sub-Structure, one per timer */
1416 
1417 typedef struct acpi_gtdt_timer_entry
1418 {
1419     UINT8                   FrameNumber;
1420     UINT8                   Reserved[3];
1421     UINT64                  BaseAddress;
1422     UINT64                  El0BaseAddress;
1423     UINT32                  TimerInterrupt;
1424     UINT32                  TimerFlags;
1425     UINT32                  VirtualTimerInterrupt;
1426     UINT32                  VirtualTimerFlags;
1427     UINT32                  CommonFlags;
1428 
1429 } ACPI_GTDT_TIMER_ENTRY;
1430 
1431 /* Flag Definitions: TimerFlags and VirtualTimerFlags above */
1432 
1433 #define ACPI_GTDT_GT_IRQ_MODE               (1)
1434 #define ACPI_GTDT_GT_IRQ_POLARITY           (1<<1)
1435 
1436 /* Flag Definitions: CommonFlags above */
1437 
1438 #define ACPI_GTDT_GT_IS_SECURE_TIMER        (1)
1439 #define ACPI_GTDT_GT_ALWAYS_ON              (1<<1)
1440 
1441 
1442 /* 1: SBSA Generic Watchdog Structure */
1443 
1444 typedef struct acpi_gtdt_watchdog
1445 {
1446     ACPI_GTDT_HEADER        Header;
1447     UINT8                   Reserved;
1448     UINT64                  RefreshFrameAddress;
1449     UINT64                  ControlFrameAddress;
1450     UINT32                  TimerInterrupt;
1451     UINT32                  TimerFlags;
1452 
1453 } ACPI_GTDT_WATCHDOG;
1454 
1455 /* Flag Definitions: TimerFlags above */
1456 
1457 #define ACPI_GTDT_WATCHDOG_IRQ_MODE         (1)
1458 #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY     (1<<1)
1459 #define ACPI_GTDT_WATCHDOG_SECURE           (1<<2)
1460 
1461 
1462 /*******************************************************************************
1463  *
1464  * HEST - Hardware Error Source Table (ACPI 4.0)
1465  *        Version 1
1466  *
1467  ******************************************************************************/
1468 
1469 typedef struct acpi_table_hest
1470 {
1471     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1472     UINT32                  ErrorSourceCount;
1473 
1474 } ACPI_TABLE_HEST;
1475 
1476 
1477 /* HEST subtable header */
1478 
1479 typedef struct acpi_hest_header
1480 {
1481     UINT16                  Type;
1482     UINT16                  SourceId;
1483 
1484 } ACPI_HEST_HEADER;
1485 
1486 
1487 /* Values for Type field above for subtables */
1488 
1489 enum AcpiHestTypes
1490 {
1491     ACPI_HEST_TYPE_IA32_CHECK           = 0,
1492     ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
1493     ACPI_HEST_TYPE_IA32_NMI             = 2,
1494     ACPI_HEST_TYPE_NOT_USED3            = 3,
1495     ACPI_HEST_TYPE_NOT_USED4            = 4,
1496     ACPI_HEST_TYPE_NOT_USED5            = 5,
1497     ACPI_HEST_TYPE_AER_ROOT_PORT        = 6,
1498     ACPI_HEST_TYPE_AER_ENDPOINT         = 7,
1499     ACPI_HEST_TYPE_AER_BRIDGE           = 8,
1500     ACPI_HEST_TYPE_GENERIC_ERROR        = 9,
1501     ACPI_HEST_TYPE_GENERIC_ERROR_V2     = 10,
1502     ACPI_HEST_TYPE_IA32_DEFERRED_CHECK  = 11,
1503     ACPI_HEST_TYPE_RESERVED             = 12    /* 12 and greater are reserved */
1504 };
1505 
1506 
1507 /*
1508  * HEST substructures contained in subtables
1509  */
1510 
1511 /*
1512  * IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and
1513  * ACPI_HEST_IA_CORRECTED structures.
1514  */
1515 typedef struct acpi_hest_ia_error_bank
1516 {
1517     UINT8                   BankNumber;
1518     UINT8                   ClearStatusOnInit;
1519     UINT8                   StatusFormat;
1520     UINT8                   Reserved;
1521     UINT32                  ControlRegister;
1522     UINT64                  ControlData;
1523     UINT32                  StatusRegister;
1524     UINT32                  AddressRegister;
1525     UINT32                  MiscRegister;
1526 
1527 } ACPI_HEST_IA_ERROR_BANK;
1528 
1529 
1530 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
1531 
1532 typedef struct acpi_hest_aer_common
1533 {
1534     UINT16                  Reserved1;
1535     UINT8                   Flags;
1536     UINT8                   Enabled;
1537     UINT32                  RecordsToPreallocate;
1538     UINT32                  MaxSectionsPerRecord;
1539     UINT32                  Bus;                    /* Bus and Segment numbers */
1540     UINT16                  Device;
1541     UINT16                  Function;
1542     UINT16                  DeviceControl;
1543     UINT16                  Reserved2;
1544     UINT32                  UncorrectableMask;
1545     UINT32                  UncorrectableSeverity;
1546     UINT32                  CorrectableMask;
1547     UINT32                  AdvancedCapabilities;
1548 
1549 } ACPI_HEST_AER_COMMON;
1550 
1551 /* Masks for HEST Flags fields */
1552 
1553 #define ACPI_HEST_FIRMWARE_FIRST        (1)
1554 #define ACPI_HEST_GLOBAL                (1<<1)
1555 #define ACPI_HEST_GHES_ASSIST           (1<<2)
1556 
1557 /*
1558  * Macros to access the bus/segment numbers in Bus field above:
1559  *  Bus number is encoded in bits 7:0
1560  *  Segment number is encoded in bits 23:8
1561  */
1562 #define ACPI_HEST_BUS(Bus)              ((Bus) & 0xFF)
1563 #define ACPI_HEST_SEGMENT(Bus)          (((Bus) >> 8) & 0xFFFF)
1564 
1565 
1566 /* Hardware Error Notification */
1567 
1568 typedef struct acpi_hest_notify
1569 {
1570     UINT8                   Type;
1571     UINT8                   Length;
1572     UINT16                  ConfigWriteEnable;
1573     UINT32                  PollInterval;
1574     UINT32                  Vector;
1575     UINT32                  PollingThresholdValue;
1576     UINT32                  PollingThresholdWindow;
1577     UINT32                  ErrorThresholdValue;
1578     UINT32                  ErrorThresholdWindow;
1579 
1580 } ACPI_HEST_NOTIFY;
1581 
1582 /* Values for Notify Type field above */
1583 
1584 enum AcpiHestNotifyTypes
1585 {
1586     ACPI_HEST_NOTIFY_POLLED             = 0,
1587     ACPI_HEST_NOTIFY_EXTERNAL           = 1,
1588     ACPI_HEST_NOTIFY_LOCAL              = 2,
1589     ACPI_HEST_NOTIFY_SCI                = 3,
1590     ACPI_HEST_NOTIFY_NMI                = 4,
1591     ACPI_HEST_NOTIFY_CMCI               = 5,    /* ACPI 5.0 */
1592     ACPI_HEST_NOTIFY_MCE                = 6,    /* ACPI 5.0 */
1593     ACPI_HEST_NOTIFY_GPIO               = 7,    /* ACPI 6.0 */
1594     ACPI_HEST_NOTIFY_SEA                = 8,    /* ACPI 6.1 */
1595     ACPI_HEST_NOTIFY_SEI                = 9,    /* ACPI 6.1 */
1596     ACPI_HEST_NOTIFY_GSIV               = 10,   /* ACPI 6.1 */
1597     ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11,   /* ACPI 6.2 */
1598     ACPI_HEST_NOTIFY_RESERVED           = 12    /* 12 and greater are reserved */
1599 };
1600 
1601 /* Values for ConfigWriteEnable bitfield above */
1602 
1603 #define ACPI_HEST_TYPE                  (1)
1604 #define ACPI_HEST_POLL_INTERVAL         (1<<1)
1605 #define ACPI_HEST_POLL_THRESHOLD_VALUE  (1<<2)
1606 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
1607 #define ACPI_HEST_ERR_THRESHOLD_VALUE   (1<<4)
1608 #define ACPI_HEST_ERR_THRESHOLD_WINDOW  (1<<5)
1609 
1610 
1611 /*
1612  * HEST subtables
1613  */
1614 
1615 /* 0: IA32 Machine Check Exception */
1616 
1617 typedef struct acpi_hest_ia_machine_check
1618 {
1619     ACPI_HEST_HEADER        Header;
1620     UINT16                  Reserved1;
1621     UINT8                   Flags;              /* See flags ACPI_HEST_GLOBAL, etc. above */
1622     UINT8                   Enabled;
1623     UINT32                  RecordsToPreallocate;
1624     UINT32                  MaxSectionsPerRecord;
1625     UINT64                  GlobalCapabilityData;
1626     UINT64                  GlobalControlData;
1627     UINT8                   NumHardwareBanks;
1628     UINT8                   Reserved3[7];
1629 
1630 } ACPI_HEST_IA_MACHINE_CHECK;
1631 
1632 
1633 /* 1: IA32 Corrected Machine Check */
1634 
1635 typedef struct acpi_hest_ia_corrected
1636 {
1637     ACPI_HEST_HEADER        Header;
1638     UINT16                  Reserved1;
1639     UINT8                   Flags;              /* See flags ACPI_HEST_GLOBAL, etc. above */
1640     UINT8                   Enabled;
1641     UINT32                  RecordsToPreallocate;
1642     UINT32                  MaxSectionsPerRecord;
1643     ACPI_HEST_NOTIFY        Notify;
1644     UINT8                   NumHardwareBanks;
1645     UINT8                   Reserved2[3];
1646 
1647 } ACPI_HEST_IA_CORRECTED;
1648 
1649 
1650 /* 2: IA32 Non-Maskable Interrupt */
1651 
1652 typedef struct acpi_hest_ia_nmi
1653 {
1654     ACPI_HEST_HEADER        Header;
1655     UINT32                  Reserved;
1656     UINT32                  RecordsToPreallocate;
1657     UINT32                  MaxSectionsPerRecord;
1658     UINT32                  MaxRawDataLength;
1659 
1660 } ACPI_HEST_IA_NMI;
1661 
1662 
1663 /* 3,4,5: Not used */
1664 
1665 /* 6: PCI Express Root Port AER */
1666 
1667 typedef struct acpi_hest_aer_root
1668 {
1669     ACPI_HEST_HEADER        Header;
1670     ACPI_HEST_AER_COMMON    Aer;
1671     UINT32                  RootErrorCommand;
1672 
1673 } ACPI_HEST_AER_ROOT;
1674 
1675 
1676 /* 7: PCI Express AER (AER Endpoint) */
1677 
1678 typedef struct acpi_hest_aer
1679 {
1680     ACPI_HEST_HEADER        Header;
1681     ACPI_HEST_AER_COMMON    Aer;
1682 
1683 } ACPI_HEST_AER;
1684 
1685 
1686 /* 8: PCI Express/PCI-X Bridge AER */
1687 
1688 typedef struct acpi_hest_aer_bridge
1689 {
1690     ACPI_HEST_HEADER        Header;
1691     ACPI_HEST_AER_COMMON    Aer;
1692     UINT32                  UncorrectableMask2;
1693     UINT32                  UncorrectableSeverity2;
1694     UINT32                  AdvancedCapabilities2;
1695 
1696 } ACPI_HEST_AER_BRIDGE;
1697 
1698 
1699 /* 9: Generic Hardware Error Source */
1700 
1701 typedef struct acpi_hest_generic
1702 {
1703     ACPI_HEST_HEADER        Header;
1704     UINT16                  RelatedSourceId;
1705     UINT8                   Reserved;
1706     UINT8                   Enabled;
1707     UINT32                  RecordsToPreallocate;
1708     UINT32                  MaxSectionsPerRecord;
1709     UINT32                  MaxRawDataLength;
1710     ACPI_GENERIC_ADDRESS    ErrorStatusAddress;
1711     ACPI_HEST_NOTIFY        Notify;
1712     UINT32                  ErrorBlockLength;
1713 
1714 } ACPI_HEST_GENERIC;
1715 
1716 
1717 /* 10: Generic Hardware Error Source, version 2 */
1718 
1719 typedef struct acpi_hest_generic_v2
1720 {
1721     ACPI_HEST_HEADER        Header;
1722     UINT16                  RelatedSourceId;
1723     UINT8                   Reserved;
1724     UINT8                   Enabled;
1725     UINT32                  RecordsToPreallocate;
1726     UINT32                  MaxSectionsPerRecord;
1727     UINT32                  MaxRawDataLength;
1728     ACPI_GENERIC_ADDRESS    ErrorStatusAddress;
1729     ACPI_HEST_NOTIFY        Notify;
1730     UINT32                  ErrorBlockLength;
1731     ACPI_GENERIC_ADDRESS    ReadAckRegister;
1732     UINT64                  ReadAckPreserve;
1733     UINT64                  ReadAckWrite;
1734 
1735 } ACPI_HEST_GENERIC_V2;
1736 
1737 
1738 /* Generic Error Status block */
1739 
1740 typedef struct acpi_hest_generic_status
1741 {
1742     UINT32                  BlockStatus;
1743     UINT32                  RawDataOffset;
1744     UINT32                  RawDataLength;
1745     UINT32                  DataLength;
1746     UINT32                  ErrorSeverity;
1747 
1748 } ACPI_HEST_GENERIC_STATUS;
1749 
1750 /* Values for BlockStatus flags above */
1751 
1752 #define ACPI_HEST_UNCORRECTABLE             (1)
1753 #define ACPI_HEST_CORRECTABLE               (1<<1)
1754 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE    (1<<2)
1755 #define ACPI_HEST_MULTIPLE_CORRECTABLE      (1<<3)
1756 #define ACPI_HEST_ERROR_ENTRY_COUNT         (0xFF<<4) /* 8 bits, error count */
1757 
1758 
1759 /* Generic Error Data entry */
1760 
1761 typedef struct acpi_hest_generic_data
1762 {
1763     UINT8                   SectionType[16];
1764     UINT32                  ErrorSeverity;
1765     UINT16                  Revision;
1766     UINT8                   ValidationBits;
1767     UINT8                   Flags;
1768     UINT32                  ErrorDataLength;
1769     UINT8                   FruId[16];
1770     UINT8                   FruText[20];
1771 
1772 } ACPI_HEST_GENERIC_DATA;
1773 
1774 /* Extension for revision 0x0300 */
1775 
1776 typedef struct acpi_hest_generic_data_v300
1777 {
1778     UINT8                   SectionType[16];
1779     UINT32                  ErrorSeverity;
1780     UINT16                  Revision;
1781     UINT8                   ValidationBits;
1782     UINT8                   Flags;
1783     UINT32                  ErrorDataLength;
1784     UINT8                   FruId[16];
1785     UINT8                   FruText[20];
1786     UINT64                  TimeStamp;
1787 
1788 } ACPI_HEST_GENERIC_DATA_V300;
1789 
1790 /* Values for ErrorSeverity above */
1791 
1792 #define ACPI_HEST_GEN_ERROR_RECOVERABLE     0
1793 #define ACPI_HEST_GEN_ERROR_FATAL           1
1794 #define ACPI_HEST_GEN_ERROR_CORRECTED       2
1795 #define ACPI_HEST_GEN_ERROR_NONE            3
1796 
1797 /* Flags for ValidationBits above */
1798 
1799 #define ACPI_HEST_GEN_VALID_FRU_ID          (1)
1800 #define ACPI_HEST_GEN_VALID_FRU_STRING      (1<<1)
1801 #define ACPI_HEST_GEN_VALID_TIMESTAMP       (1<<2)
1802 
1803 
1804 /* 11: IA32 Deferred Machine Check Exception (ACPI 6.2) */
1805 
1806 typedef struct acpi_hest_ia_deferred_check
1807 {
1808     ACPI_HEST_HEADER        Header;
1809     UINT16                  Reserved1;
1810     UINT8                   Flags;              /* See flags ACPI_HEST_GLOBAL, etc. above */
1811     UINT8                   Enabled;
1812     UINT32                  RecordsToPreallocate;
1813     UINT32                  MaxSectionsPerRecord;
1814     ACPI_HEST_NOTIFY        Notify;
1815     UINT8                   NumHardwareBanks;
1816     UINT8                   Reserved2[3];
1817 
1818 } ACPI_HEST_IA_DEFERRED_CHECK;
1819 
1820 
1821 /*******************************************************************************
1822  *
1823  * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.3)
1824  *
1825  ******************************************************************************/
1826 
1827 typedef struct acpi_table_hmat
1828 {
1829     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1830     UINT32                  Reserved;
1831 
1832 } ACPI_TABLE_HMAT;
1833 
1834 
1835 /* Values for HMAT structure types */
1836 
1837 enum AcpiHmatType
1838 {
1839     ACPI_HMAT_TYPE_ADDRESS_RANGE        = 0,   /* Memory subsystem address range */
1840     ACPI_HMAT_TYPE_LOCALITY             = 1,   /* System locality latency and bandwidth information */
1841     ACPI_HMAT_TYPE_CACHE                = 2,   /* Memory side cache information */
1842     ACPI_HMAT_TYPE_RESERVED             = 3    /* 3 and greater are reserved */
1843 };
1844 
1845 typedef struct acpi_hmat_structure
1846 {
1847     UINT16                  Type;
1848     UINT16                  Reserved;
1849     UINT32                  Length;
1850 
1851 } ACPI_HMAT_STRUCTURE;
1852 
1853 
1854 /*
1855  * HMAT Structures, correspond to Type in ACPI_HMAT_STRUCTURE
1856  */
1857 
1858 /* 0: Memory proximity domain attributes */
1859 
1860 typedef struct acpi_hmat_proximity_domain
1861 {
1862     ACPI_HMAT_STRUCTURE     Header;
1863     UINT16                  Flags;
1864     UINT16                  Reserved1;
1865     UINT32                  InitiatorPD;            /* Attached Initiator proximity domain */
1866     UINT32                  MemoryPD;               /* Memory proximity domain */
1867     UINT32                  Reserved2;
1868     UINT64                  Reserved3;
1869     UINT64                  Reserved4;
1870 
1871 } ACPI_HMAT_PROXIMITY_DOMAIN;
1872 
1873 /* Masks for Flags field above */
1874 
1875 #define ACPI_HMAT_INITIATOR_PD_VALID    (1)     /* 1: InitiatorPD field is valid */
1876 
1877 
1878 /* 1: System locality latency and bandwidth information */
1879 
1880 typedef struct acpi_hmat_locality
1881 {
1882     ACPI_HMAT_STRUCTURE     Header;
1883     UINT8                   Flags;
1884     UINT8                   DataType;
1885     UINT8                   MinTransferSize;
1886     UINT8                   Reserved1;
1887     UINT32                  NumberOfInitiatorPDs;
1888     UINT32                  NumberOfTargetPDs;
1889     UINT32                  Reserved2;
1890     UINT64                  EntryBaseUnit;
1891 
1892 } ACPI_HMAT_LOCALITY;
1893 
1894 /* Masks for Flags field above */
1895 
1896 #define ACPI_HMAT_MEMORY_HIERARCHY  (0x0F)      /* Bits 0-3 */
1897 
1898 /* Values for Memory Hierarchy flags */
1899 
1900 #define ACPI_HMAT_MEMORY            0
1901 #define ACPI_HMAT_1ST_LEVEL_CACHE   1
1902 #define ACPI_HMAT_2ND_LEVEL_CACHE   2
1903 #define ACPI_HMAT_3RD_LEVEL_CACHE   3
1904 #define ACPI_HMAT_MINIMUM_XFER_SIZE 0x10        /* Bit 4: ACPI 6.4 */
1905 #define ACPI_HMAT_NON_SEQUENTIAL_XFERS 0x20     /* Bit 5: ACPI 6.4 */
1906 
1907 
1908 /* Values for DataType field above */
1909 
1910 #define ACPI_HMAT_ACCESS_LATENCY    0
1911 #define ACPI_HMAT_READ_LATENCY      1
1912 #define ACPI_HMAT_WRITE_LATENCY     2
1913 #define ACPI_HMAT_ACCESS_BANDWIDTH  3
1914 #define ACPI_HMAT_READ_BANDWIDTH    4
1915 #define ACPI_HMAT_WRITE_BANDWIDTH   5
1916 
1917 
1918 /* 2: Memory side cache information */
1919 
1920 typedef struct acpi_hmat_cache
1921 {
1922     ACPI_HMAT_STRUCTURE     Header;
1923     UINT32                  MemoryPD;
1924     UINT32                  Reserved1;
1925     UINT64                  CacheSize;
1926     UINT32                  CacheAttributes;
1927     UINT16                  Reserved2;
1928     UINT16                  NumberOfSMBIOSHandles;
1929 
1930 } ACPI_HMAT_CACHE;
1931 
1932 /* Masks for CacheAttributes field above */
1933 
1934 #define ACPI_HMAT_TOTAL_CACHE_LEVEL     (0x0000000F)
1935 #define ACPI_HMAT_CACHE_LEVEL           (0x000000F0)
1936 #define ACPI_HMAT_CACHE_ASSOCIATIVITY   (0x00000F00)
1937 #define ACPI_HMAT_WRITE_POLICY          (0x0000F000)
1938 #define ACPI_HMAT_CACHE_LINE_SIZE       (0xFFFF0000)
1939 
1940 /* Values for cache associativity flag */
1941 
1942 #define ACPI_HMAT_CA_NONE                     (0)
1943 #define ACPI_HMAT_CA_DIRECT_MAPPED            (1)
1944 #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING   (2)
1945 
1946 /* Values for write policy flag */
1947 
1948 #define ACPI_HMAT_CP_NONE   (0)
1949 #define ACPI_HMAT_CP_WB     (1)
1950 #define ACPI_HMAT_CP_WT     (2)
1951 
1952 
1953 /*******************************************************************************
1954  *
1955  * HPET - High Precision Event Timer table
1956  *        Version 1
1957  *
1958  * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
1959  * Version 1.0a, October 2004
1960  *
1961  ******************************************************************************/
1962 
1963 typedef struct acpi_table_hpet
1964 {
1965     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1966     UINT32                  Id;                 /* Hardware ID of event timer block */
1967     ACPI_GENERIC_ADDRESS    Address;            /* Address of event timer block */
1968     UINT8                   Sequence;           /* HPET sequence number */
1969     UINT16                  MinimumTick;        /* Main counter min tick, periodic mode */
1970     UINT8                   Flags;
1971 
1972 } ACPI_TABLE_HPET;
1973 
1974 /* Masks for Flags field above */
1975 
1976 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
1977 
1978 /* Values for Page Protect flags */
1979 
1980 enum AcpiHpetPageProtect
1981 {
1982     ACPI_HPET_NO_PAGE_PROTECT       = 0,
1983     ACPI_HPET_PAGE_PROTECT4         = 1,
1984     ACPI_HPET_PAGE_PROTECT64        = 2
1985 };
1986 
1987 
1988 /*******************************************************************************
1989  *
1990  * IBFT - Boot Firmware Table
1991  *        Version 1
1992  *
1993  * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
1994  * Specification", Version 1.01, March 1, 2007
1995  *
1996  * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
1997  * Therefore, it is not currently supported by the disassembler.
1998  *
1999  ******************************************************************************/
2000 
2001 typedef struct acpi_table_ibft
2002 {
2003     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
2004     UINT8                   Reserved[12];
2005 
2006 } ACPI_TABLE_IBFT;
2007 
2008 
2009 /* IBFT common subtable header */
2010 
2011 typedef struct acpi_ibft_header
2012 {
2013     UINT8                   Type;
2014     UINT8                   Version;
2015     UINT16                  Length;
2016     UINT8                   Index;
2017     UINT8                   Flags;
2018 
2019 } ACPI_IBFT_HEADER;
2020 
2021 /* Values for Type field above */
2022 
2023 enum AcpiIbftType
2024 {
2025     ACPI_IBFT_TYPE_NOT_USED         = 0,
2026     ACPI_IBFT_TYPE_CONTROL          = 1,
2027     ACPI_IBFT_TYPE_INITIATOR        = 2,
2028     ACPI_IBFT_TYPE_NIC              = 3,
2029     ACPI_IBFT_TYPE_TARGET           = 4,
2030     ACPI_IBFT_TYPE_EXTENSIONS       = 5,
2031     ACPI_IBFT_TYPE_RESERVED         = 6     /* 6 and greater are reserved */
2032 };
2033 
2034 
2035 /* IBFT subtables */
2036 
2037 typedef struct acpi_ibft_control
2038 {
2039     ACPI_IBFT_HEADER        Header;
2040     UINT16                  Extensions;
2041     UINT16                  InitiatorOffset;
2042     UINT16                  Nic0Offset;
2043     UINT16                  Target0Offset;
2044     UINT16                  Nic1Offset;
2045     UINT16                  Target1Offset;
2046 
2047 } ACPI_IBFT_CONTROL;
2048 
2049 typedef struct acpi_ibft_initiator
2050 {
2051     ACPI_IBFT_HEADER        Header;
2052     UINT8                   SnsServer[16];
2053     UINT8                   SlpServer[16];
2054     UINT8                   PrimaryServer[16];
2055     UINT8                   SecondaryServer[16];
2056     UINT16                  NameLength;
2057     UINT16                  NameOffset;
2058 
2059 } ACPI_IBFT_INITIATOR;
2060 
2061 typedef struct acpi_ibft_nic
2062 {
2063     ACPI_IBFT_HEADER        Header;
2064     UINT8                   IpAddress[16];
2065     UINT8                   SubnetMaskPrefix;
2066     UINT8                   Origin;
2067     UINT8                   Gateway[16];
2068     UINT8                   PrimaryDns[16];
2069     UINT8                   SecondaryDns[16];
2070     UINT8                   Dhcp[16];
2071     UINT16                  Vlan;
2072     UINT8                   MacAddress[6];
2073     UINT16                  PciAddress;
2074     UINT16                  NameLength;
2075     UINT16                  NameOffset;
2076 
2077 } ACPI_IBFT_NIC;
2078 
2079 typedef struct acpi_ibft_target
2080 {
2081     ACPI_IBFT_HEADER        Header;
2082     UINT8                   TargetIpAddress[16];
2083     UINT16                  TargetIpSocket;
2084     UINT8                   TargetBootLun[8];
2085     UINT8                   ChapType;
2086     UINT8                   NicAssociation;
2087     UINT16                  TargetNameLength;
2088     UINT16                  TargetNameOffset;
2089     UINT16                  ChapNameLength;
2090     UINT16                  ChapNameOffset;
2091     UINT16                  ChapSecretLength;
2092     UINT16                  ChapSecretOffset;
2093     UINT16                  ReverseChapNameLength;
2094     UINT16                  ReverseChapNameOffset;
2095     UINT16                  ReverseChapSecretLength;
2096     UINT16                  ReverseChapSecretOffset;
2097 
2098 } ACPI_IBFT_TARGET;
2099 
2100 
2101 /* Reset to default packing */
2102 
2103 #pragma pack()
2104 
2105 #endif /* __ACTBL1_H__ */
2106