xref: /titanic_50/usr/src/uts/intel/sys/acpi/actbl1.h (revision 2d6aa547f868d751d00f1f2e70171d9dc9317af1)
1 /******************************************************************************
2  *
3  * Name: actbl1.h - Additional ACPI table definitions
4  *       $Revision: 1.51 $
5  *
6  *****************************************************************************/
7 
8 /******************************************************************************
9  *
10  * 1. Copyright Notice
11  *
12  * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
13  * All rights reserved.
14  *
15  * 2. License
16  *
17  * 2.1. This is your license from Intel Corp. under its intellectual property
18  * rights.  You may have additional license terms from the party that provided
19  * you this software, covering your right to use that party's intellectual
20  * property rights.
21  *
22  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23  * copy of the source code appearing in this file ("Covered Code") an
24  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25  * base code distributed originally by Intel ("Original Intel Code") to copy,
26  * make derivatives, distribute, use and display any portion of the Covered
27  * Code in any form, with the right to sublicense such rights; and
28  *
29  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30  * license (with the right to sublicense), under only those claims of Intel
31  * patents that are infringed by the Original Intel Code, to make, use, sell,
32  * offer to sell, and import the Covered Code and derivative works thereof
33  * solely to the minimum extent necessary to exercise the above copyright
34  * license, and in no event shall the patent license extend to any additions
35  * to or modifications of the Original Intel Code.  No other license or right
36  * is granted directly or by implication, estoppel or otherwise;
37  *
38  * The above copyright and patent license is granted only if the following
39  * conditions are met:
40  *
41  * 3. Conditions
42  *
43  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44  * Redistribution of source code of any substantial portion of the Covered
45  * Code or modification with rights to further distribute source must include
46  * the above Copyright Notice, the above License, this list of Conditions,
47  * and the following Disclaimer and Export Compliance provision.  In addition,
48  * Licensee must cause all Covered Code to which Licensee contributes to
49  * contain a file documenting the changes Licensee made to create that Covered
50  * Code and the date of any change.  Licensee must include in that file the
51  * documentation of any changes made by any predecessor Licensee.  Licensee
52  * must include a prominent statement that the modification is derived,
53  * directly or indirectly, from Original Intel Code.
54  *
55  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56  * Redistribution of source code of any substantial portion of the Covered
57  * Code or modification without rights to further distribute source must
58  * include the following Disclaimer and Export Compliance provision in the
59  * documentation and/or other materials provided with distribution.  In
60  * addition, Licensee may not authorize further sublicense of source of any
61  * portion of the Covered Code, and must include terms to the effect that the
62  * license from Licensee to its licensee is limited to the intellectual
63  * property embodied in the software Licensee provides to its licensee, and
64  * not to intellectual property embodied in modifications its licensee may
65  * make.
66  *
67  * 3.3. Redistribution of Executable. Redistribution in executable form of any
68  * substantial portion of the Covered Code or modification must reproduce the
69  * above Copyright Notice, and the following Disclaimer and Export Compliance
70  * provision in the documentation and/or other materials provided with the
71  * distribution.
72  *
73  * 3.4. Intel retains all right, title, and interest in and to the Original
74  * Intel Code.
75  *
76  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77  * Intel shall be used in advertising or otherwise to promote the sale, use or
78  * other dealings in products derived from or relating to the Covered Code
79  * without prior written authorization from Intel.
80  *
81  * 4. Disclaimer and Export Compliance
82  *
83  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
86  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
87  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
88  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89  * PARTICULAR PURPOSE.
90  *
91  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
97  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98  * LIMITED REMEDY.
99  *
100  * 4.3. Licensee shall not export, either directly or indirectly, any of this
101  * software or system incorporating such software without first obtaining any
102  * required license or other approval from the U. S. Department of Commerce or
103  * any other agency or department of the United States Government.  In the
104  * event Licensee exports any such software from the United States or
105  * re-exports any such software from a foreign destination, Licensee shall
106  * ensure that the distribution and export/re-export of the software is in
107  * compliance with all laws, regulations, orders, or other restrictions of the
108  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109  * any of its subsidiaries will export/re-export any technical data, process,
110  * software, or service, directly or indirectly, to any country for which the
111  * United States government or any agency thereof requires an export license,
112  * other governmental approval, or letter of assurance, without first obtaining
113  * such license, approval or letter.
114  *
115  *****************************************************************************/
116 
117 #ifndef __ACTBL1_H__
118 #define __ACTBL1_H__
119 
120 
121 /*******************************************************************************
122  *
123  * Additional ACPI Tables
124  *
125  * These tables are not consumed directly by the ACPICA subsystem, but are
126  * included here to support device drivers and the AML disassembler.
127  *
128  ******************************************************************************/
129 
130 
131 /*
132  * Values for description table header signatures. Useful because they make
133  * it more difficult to inadvertently type in the wrong signature.
134  */
135 #define ACPI_SIG_ASF            "ASF!"      /* Alert Standard Format table */
136 #define ACPI_SIG_BERT           "BERT"      /* Boot Error Record Table */
137 #define ACPI_SIG_BOOT           "BOOT"      /* Simple Boot Flag Table */
138 #define ACPI_SIG_CPEP           "CPEP"      /* Corrected Platform Error Polling table */
139 #define ACPI_SIG_DBGP           "DBGP"      /* Debug Port table */
140 #define ACPI_SIG_DMAR           "DMAR"      /* DMA Remapping table */
141 #define ACPI_SIG_ECDT           "ECDT"      /* Embedded Controller Boot Resources Table */
142 #define ACPI_SIG_EINJ           "EINJ"      /* Error Injection table */
143 #define ACPI_SIG_ERST           "ERST"      /* Error Record Serialization Table */
144 #define ACPI_SIG_HEST           "HEST"      /* Hardware Error Source Table */
145 #define ACPI_SIG_HPET           "HPET"      /* High Precision Event Timer table */
146 #define ACPI_SIG_IBFT           "IBFT"      /* iSCSI Boot Firmware Table */
147 #define ACPI_SIG_MADT           "APIC"      /* Multiple APIC Description Table */
148 #define ACPI_SIG_MCFG           "MCFG"      /* PCI Memory Mapped Configuration table */
149 #define ACPI_SIG_SBST           "SBST"      /* Smart Battery Specification Table */
150 #define ACPI_SIG_SLIC           "SLIC"      /* Software Licensing Description Table */
151 #define ACPI_SIG_SLIT           "SLIT"      /* System Locality Distance Information Table */
152 #define ACPI_SIG_SPCR           "SPCR"      /* Serial Port Console Redirection table */
153 #define ACPI_SIG_SPMI           "SPMI"      /* Server Platform Management Interface table */
154 #define ACPI_SIG_SRAT           "SRAT"      /* System Resource Affinity Table */
155 #define ACPI_SIG_TCPA           "TCPA"      /* Trusted Computing Platform Alliance table */
156 #define ACPI_SIG_UEFI           "UEFI"      /* Uefi Boot Optimization Table */
157 #define ACPI_SIG_WDAT           "WDAT"      /* Watchdog Action Table */
158 #define ACPI_SIG_WDRT           "WDRT"      /* Watchdog Resource Table */
159 
160 
161 /*
162  * All tables must be byte-packed to match the ACPI specification, since
163  * the tables are provided by the system BIOS.
164  */
165 #pragma pack(1)
166 
167 /*
168  * Note about bitfields: The UINT8 type is used for bitfields in ACPI tables.
169  * This is the only type that is even remotely portable. Anything else is not
170  * portable, so do not use any other bitfield types.
171  */
172 
173 
174 /* Common Subtable header (used in MADT, SRAT, etc.) */
175 
176 typedef struct acpi_subtable_header
177 {
178     UINT8                   Type;
179     UINT8                   Length;
180 
181 } ACPI_SUBTABLE_HEADER;
182 
183 
184 /* Common Subtable header for WHEA tables (EINJ, ERST, WDAT) */
185 
186 typedef struct acpi_whea_header
187 {
188     UINT8                   Action;
189     UINT8                   Instruction;
190     UINT8                   Flags;
191     UINT8                   Reserved;
192     ACPI_GENERIC_ADDRESS    RegisterRegion;
193     UINT64                  Value;              /* Value used with Read/Write register */
194     UINT64                  Mask;               /* Bitmask required for this register instruction */
195 
196 } ACPI_WHEA_HEADER;
197 
198 
199 /*******************************************************************************
200  *
201  * ASF - Alert Standard Format table (Signature "ASF!")
202  *
203  * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
204  *
205  ******************************************************************************/
206 
207 typedef struct acpi_table_asf
208 {
209     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
210 
211 } ACPI_TABLE_ASF;
212 
213 
214 /* ASF subtable header */
215 
216 typedef struct acpi_asf_header
217 {
218     UINT8                   Type;
219     UINT8                   Reserved;
220     UINT16                  Length;
221 
222 } ACPI_ASF_HEADER;
223 
224 
225 /* Values for Type field above */
226 
227 enum AcpiAsfType
228 {
229     ACPI_ASF_TYPE_INFO          = 0,
230     ACPI_ASF_TYPE_ALERT         = 1,
231     ACPI_ASF_TYPE_CONTROL       = 2,
232     ACPI_ASF_TYPE_BOOT          = 3,
233     ACPI_ASF_TYPE_ADDRESS       = 4,
234     ACPI_ASF_TYPE_RESERVED      = 5
235 };
236 
237 /*
238  * ASF subtables
239  */
240 
241 /* 0: ASF Information */
242 
243 typedef struct acpi_asf_info
244 {
245     ACPI_ASF_HEADER         Header;
246     UINT8                   MinResetValue;
247     UINT8                   MinPollInterval;
248     UINT16                  SystemId;
249     UINT32                  MfgId;
250     UINT8                   Flags;
251     UINT8                   Reserved2[3];
252 
253 } ACPI_ASF_INFO;
254 
255 /* 1: ASF Alerts */
256 
257 typedef struct acpi_asf_alert
258 {
259     ACPI_ASF_HEADER         Header;
260     UINT8                   AssertMask;
261     UINT8                   DeassertMask;
262     UINT8                   Alerts;
263     UINT8                   DataLength;
264 
265 } ACPI_ASF_ALERT;
266 
267 typedef struct acpi_asf_alert_data
268 {
269     UINT8                   Address;
270     UINT8                   Command;
271     UINT8                   Mask;
272     UINT8                   Value;
273     UINT8                   SensorType;
274     UINT8                   Type;
275     UINT8                   Offset;
276     UINT8                   SourceType;
277     UINT8                   Severity;
278     UINT8                   SensorNumber;
279     UINT8                   Entity;
280     UINT8                   Instance;
281 
282 } ACPI_ASF_ALERT_DATA;
283 
284 /* 2: ASF Remote Control */
285 
286 typedef struct acpi_asf_remote
287 {
288     ACPI_ASF_HEADER         Header;
289     UINT8                   Controls;
290     UINT8                   DataLength;
291     UINT16                  Reserved2;
292 
293 } ACPI_ASF_REMOTE;
294 
295 typedef struct acpi_asf_control_data
296 {
297     UINT8                   Function;
298     UINT8                   Address;
299     UINT8                   Command;
300     UINT8                   Value;
301 
302 } ACPI_ASF_CONTROL_DATA;
303 
304 /* 3: ASF RMCP Boot Options */
305 
306 typedef struct acpi_asf_rmcp
307 {
308     ACPI_ASF_HEADER         Header;
309     UINT8                   Capabilities[7];
310     UINT8                   CompletionCode;
311     UINT32                  EnterpriseId;
312     UINT8                   Command;
313     UINT16                  Parameter;
314     UINT16                  BootOptions;
315     UINT16                  OemParameters;
316 
317 } ACPI_ASF_RMCP;
318 
319 /* 4: ASF Address */
320 
321 typedef struct acpi_asf_address
322 {
323     ACPI_ASF_HEADER         Header;
324     UINT8                   EpromAddress;
325     UINT8                   Devices;
326 
327 } ACPI_ASF_ADDRESS;
328 
329 
330 /*******************************************************************************
331  *
332  * BERT - Boot Error Record Table
333  *
334  ******************************************************************************/
335 
336 typedef struct acpi_table_bert
337 {
338     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
339     UINT32                  RegionLength;       /* Length of the boot error region */
340     UINT64                  Address;            /* Physical addresss of the error region */
341 
342 } ACPI_TABLE_BERT;
343 
344 
345 /* Boot Error Region */
346 
347 typedef struct acpi_bert_region
348 {
349     UINT32                  BlockStatus;
350     UINT32                  RawDataOffset;
351     UINT32                  RawDataLength;
352     UINT32                  DataLength;
353     UINT32                  ErrorSeverity;
354 
355 } ACPI_BERT_REGION;
356 
357 /* BlockStatus Flags */
358 
359 #define ACPI_BERT_UNCORRECTABLE             (1)
360 #define ACPI_BERT_CORRECTABLE               (2)
361 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE    (4)
362 #define ACPI_BERT_MULTIPLE_CORRECTABLE      (8)
363 
364 
365 /*******************************************************************************
366  *
367  * BOOT - Simple Boot Flag Table
368  *
369  ******************************************************************************/
370 
371 typedef struct acpi_table_boot
372 {
373     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
374     UINT8                   CmosIndex;          /* Index in CMOS RAM for the boot register */
375     UINT8                   Reserved[3];
376 
377 } ACPI_TABLE_BOOT;
378 
379 
380 /*******************************************************************************
381  *
382  * CPEP - Corrected Platform Error Polling table
383  *
384  ******************************************************************************/
385 
386 typedef struct acpi_table_cpep
387 {
388     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
389     UINT64                  Reserved;
390 
391 } ACPI_TABLE_CPEP;
392 
393 
394 /* Subtable */
395 
396 typedef struct acpi_cpep_polling
397 {
398     UINT8                   Type;
399     UINT8                   Length;
400     UINT8                   Id;                 /* Processor ID */
401     UINT8                   Eid;                /* Processor EID */
402     UINT32                  Interval;           /* Polling interval (msec) */
403 
404 } ACPI_CPEP_POLLING;
405 
406 
407 /*******************************************************************************
408  *
409  * DBGP - Debug Port table
410  *
411  ******************************************************************************/
412 
413 typedef struct acpi_table_dbgp
414 {
415     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
416     UINT8                   Type;               /* 0=full 16550, 1=subset of 16550 */
417     UINT8                   Reserved[3];
418     ACPI_GENERIC_ADDRESS    DebugPort;
419 
420 } ACPI_TABLE_DBGP;
421 
422 
423 /*******************************************************************************
424  *
425  * DMAR - DMA Remapping table
426  *        From "Intel Virtualization Technology for Directed I/O", Sept. 2007
427  *
428  ******************************************************************************/
429 
430 typedef struct acpi_table_dmar
431 {
432     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
433     UINT8                   Width;              /* Host Address Width */
434     UINT8                   Flags;
435     UINT8                   Reserved[10];
436 
437 } ACPI_TABLE_DMAR;
438 
439 /* Flags */
440 
441 #define ACPI_DMAR_INTR_REMAP        (1)
442 
443 /* DMAR subtable header */
444 
445 typedef struct acpi_dmar_header
446 {
447     UINT16                  Type;
448     UINT16                  Length;
449 
450 } ACPI_DMAR_HEADER;
451 
452 /* Values for subtable type in ACPI_DMAR_HEADER */
453 
454 enum AcpiDmarType
455 {
456     ACPI_DMAR_TYPE_HARDWARE_UNIT        = 0,
457     ACPI_DMAR_TYPE_RESERVED_MEMORY      = 1,
458     ACPI_DMAR_TYPE_ATSR                 = 2,
459     ACPI_DMAR_TYPE_RESERVED             = 3     /* 3 and greater are reserved */
460 };
461 
462 typedef struct acpi_dmar_device_scope
463 {
464     UINT8                   EntryType;
465     UINT8                   Length;
466     UINT16                  Reserved;
467     UINT8                   EnumerationId;
468     UINT8                   Bus;
469 
470 } ACPI_DMAR_DEVICE_SCOPE;
471 
472 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE */
473 
474 enum AcpiDmarScopeType
475 {
476     ACPI_DMAR_SCOPE_TYPE_NOT_USED       = 0,
477     ACPI_DMAR_SCOPE_TYPE_ENDPOINT       = 1,
478     ACPI_DMAR_SCOPE_TYPE_BRIDGE         = 2,
479     ACPI_DMAR_SCOPE_TYPE_IOAPIC         = 3,
480     ACPI_DMAR_SCOPE_TYPE_HPET           = 4,
481     ACPI_DMAR_SCOPE_TYPE_RESERVED       = 5     /* 5 and greater are reserved */
482 };
483 
484 typedef struct acpi_dmar_pci_path
485 {
486     UINT8                   Device;
487     UINT8                   Function;
488 
489 } ACPI_DMAR_PCI_PATH;
490 
491 /*
492  * DMAR Sub-tables, correspond to Type in ACPI_DMAR_HEADER
493  */
494 
495 /* 0: Hardware Unit Definition */
496 
497 typedef struct acpi_dmar_hardware_unit
498 {
499     ACPI_DMAR_HEADER        Header;
500     UINT8                   Flags;
501     UINT8                   Reserved;
502     UINT16                  Segment;
503     UINT64                  Address;            /* Register Base Address */
504 
505 } ACPI_DMAR_HARDWARE_UNIT;
506 
507 /* Flags */
508 
509 #define ACPI_DMAR_INCLUDE_ALL       (1)
510 
511 /* 1: Reserved Memory Defininition */
512 
513 typedef struct acpi_dmar_reserved_memory
514 {
515     ACPI_DMAR_HEADER        Header;
516     UINT16                  Reserved;
517     UINT16                  Segment;
518     UINT64                  BaseAddress;        /* 4K aligned base address */
519     UINT64                  EndAddress;         /* 4K aligned limit address */
520 
521 } ACPI_DMAR_RESERVED_MEMORY;
522 
523 /* Flags */
524 
525 #define ACPI_DMAR_ALLOW_ALL         (1)
526 
527 /* 2: Root Port ATS Capability Reporting Structure */
528 
529 typedef struct acpi_dmar_atsr
530 {
531     ACPI_DMAR_HEADER        Header;
532     UINT8                   Flags;
533     UINT8                   Reserved;
534     UINT16                  Segment;
535 
536 } ACPI_DMAR_ATSR;
537 
538 /* Flags */
539 
540 #define ACPI_DMAR_ALL_PORTS         (1)
541 
542 
543 /*******************************************************************************
544  *
545  * ECDT - Embedded Controller Boot Resources Table
546  *
547  ******************************************************************************/
548 
549 typedef struct acpi_table_ecdt
550 {
551     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
552     ACPI_GENERIC_ADDRESS    Control;            /* Address of EC command/status register */
553     ACPI_GENERIC_ADDRESS    Data;               /* Address of EC data register */
554     UINT32                  Uid;                /* Unique ID - must be same as the EC _UID method */
555     UINT8                   Gpe;                /* The GPE for the EC */
556     UINT8                   Id[1];              /* Full namepath of the EC in the ACPI namespace */
557 
558 } ACPI_TABLE_ECDT;
559 
560 
561 /*******************************************************************************
562  *
563  * EINJ - Error Injection Table
564  *
565  ******************************************************************************/
566 
567 typedef struct acpi_table_einj
568 {
569     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
570     UINT32                  HeaderLength;
571     UINT32                  Reserved;
572     UINT32                  Entries;
573 
574 } ACPI_TABLE_EINJ;
575 
576 /* EINJ Injection Instruction Entries (actions) */
577 
578 typedef struct acpi_einj_entry
579 {
580     ACPI_WHEA_HEADER        WheaHeader;         /* Common header for WHEA tables */
581 
582 } ACPI_EINJ_ENTRY;
583 
584 /* Values for Action field above */
585 
586 enum AcpiEinjActions
587 {
588     ACPI_EINJ_BEGIN_OPERATION       = 0,
589     ACPI_EINJ_GET_TRIGGER_TABLE     = 1,
590     ACPI_EINJ_SET_ERROR_TYPE        = 2,
591     ACPI_EINJ_GET_ERROR_TYPE        = 3,
592     ACPI_EINJ_END_OPERATION         = 4,
593     ACPI_EINJ_EXECUTE_OPERATION     = 5,
594     ACPI_EINJ_CHECK_BUSY_STATUS     = 6,
595     ACPI_EINJ_GET_COMMAND_STATUS    = 7,
596     ACPI_EINJ_ACTION_RESERVED       = 8,     /* 8 and greater are reserved */
597     ACPI_EINJ_TRIGGER_ERROR         = 0xFF   /* Except for this value */
598 };
599 
600 /* Values for Instruction field above */
601 
602 enum AcpiEinjInstructions
603 {
604     ACPI_EINJ_READ_REGISTER         = 0,
605     ACPI_EINJ_READ_REGISTER_VALUE   = 1,
606     ACPI_EINJ_WRITE_REGISTER        = 2,
607     ACPI_EINJ_WRITE_REGISTER_VALUE  = 3,
608     ACPI_EINJ_NOOP                  = 4,
609     ACPI_EINJ_INSTRUCTION_RESERVED  = 5     /* 5 and greater are reserved */
610 };
611 
612 /* EINJ Trigger Error Action Table */
613 
614 typedef struct acpi_einj_trigger
615 {
616     UINT32                  HeaderSize;
617     UINT32                  Revision;
618     UINT32                  TableSize;
619     UINT32                  EntryCount;
620 
621 } ACPI_EINJ_TRIGGER;
622 
623 
624 /*******************************************************************************
625  *
626  * ERST - Error Record Serialization Table
627  *
628  ******************************************************************************/
629 
630 typedef struct acpi_table_erst
631 {
632     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
633     UINT32                  HeaderLength;
634     UINT32                  Reserved;
635     UINT32                  Entries;
636 
637 } ACPI_TABLE_ERST;
638 
639 /* ERST Serialization Entries (actions) */
640 
641 typedef struct acpi_erst_entry
642 {
643     ACPI_WHEA_HEADER        WheaHeader;         /* Common header for WHEA tables */
644 
645 } ACPI_ERST_ENTRY;
646 
647 /* Values for Action field above */
648 
649 enum AcpiErstActions
650 {
651     ACPI_ERST_BEGIN_WRITE_OPERATION = 0,
652     ACPI_ERST_BEGIN_READ_OPERATION  = 1,
653     ACPI_ERST_BETGIN_CLEAR_OPERATION= 2,
654     ACPI_ERST_END_OPERATION         = 3,
655     ACPI_ERST_SET_RECORD_OFFSET     = 4,
656     ACPI_ERST_EXECUTE_OPERATION     = 5,
657     ACPI_ERST_CHECK_BUSY_STATUS     = 6,
658     ACPI_ERST_GET_COMMAND_STATUS    = 7,
659     ACPI_ERST_GET_RECORD_IDENTIFIER = 8,
660     ACPI_ERST_SET_RECORD_IDENTIFIER = 9,
661     ACPI_ERST_GET_RECORD_COUNT      = 10,
662     ACPI_ERST_BEGIN_DUMMY_WRIITE    = 11,
663     ACPI_ERST_NOT_USED              = 12,
664     ACPI_ERST_GET_ERROR_RANGE       = 13,
665     ACPI_ERST_GET_ERROR_LENGTH      = 14,
666     ACPI_ERST_GET_ERROR_ATTRIBUTES  = 15,
667     ACPI_ERST_ACTION_RESERVED       = 16    /* 16 and greater are reserved */
668 };
669 
670 /* Values for Instruction field above */
671 
672 enum AcpiErstInstructions
673 {
674     ACPI_ERST_READ_REGISTER         = 0,
675     ACPI_ERST_READ_REGISTER_VALUE   = 1,
676     ACPI_ERST_WRITE_REGISTER        = 2,
677     ACPI_ERST_WRITE_REGISTER_VALUE  = 3,
678     ACPI_ERST_NOOP                  = 4,
679     ACPI_ERST_LOAD_VAR1             = 5,
680     ACPI_ERST_LOAD_VAR2             = 6,
681     ACPI_ERST_STORE_VAR1            = 7,
682     ACPI_ERST_ADD                   = 8,
683     ACPI_ERST_SUBTRACT              = 9,
684     ACPI_ERST_ADD_VALUE             = 10,
685     ACPI_ERST_SUBTRACT_VALUE        = 11,
686     ACPI_ERST_STALL                 = 12,
687     ACPI_ERST_STALL_WHILE_TRUE      = 13,
688     ACPI_ERST_SKIP_NEXT_IF_TRUE     = 14,
689     ACPI_ERST_GOTO                  = 15,
690     ACPI_ERST_SET_SRC_ADDRESS_BASE  = 16,
691     ACPI_ERST_SET_DST_ADDRESS_BASE  = 17,
692     ACPI_ERST_MOVE_DATA             = 18,
693     ACPI_ERST_INSTRUCTION_RESERVED  = 19    /* 19 and greater are reserved */
694 };
695 
696 
697 /*******************************************************************************
698  *
699  * HEST - Hardware Error Source Table
700  *
701  ******************************************************************************/
702 
703 typedef struct acpi_table_hest
704 {
705     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
706     UINT32                  ErrorSourceCount;
707 
708 } ACPI_TABLE_HEST;
709 
710 
711 /* HEST subtable header */
712 
713 typedef struct acpi_hest_header
714 {
715     UINT16                  Type;
716 
717 } ACPI_HEST_HEADER;
718 
719 
720 /* Values for Type field above for subtables */
721 
722 enum AcpiHestTypes
723 {
724     ACPI_HEST_TYPE_XPF_MACHINE_CHECK             = 0,
725     ACPI_HEST_TYPE_XPF_CORRECTED_MACHINE_CHECK   = 1,
726     ACPI_HEST_TYPE_XPF_UNUSED                    = 2,
727     ACPI_HEST_TYPE_XPF_NON_MASKABLE_INTERRUPT    = 3,
728     ACPI_HEST_TYPE_IPF_CORRECTED_MACHINE_CHECK   = 4,
729     ACPI_HEST_TYPE_IPF_CORRECTED_PLATFORM_ERROR  = 5,
730     ACPI_HEST_TYPE_AER_ROOT_PORT                 = 6,
731     ACPI_HEST_TYPE_AER_ENDPOINT                  = 7,
732     ACPI_HEST_TYPE_AER_BRIDGE                    = 8,
733     ACPI_HEST_TYPE_GENERIC_HARDWARE_ERROR_SOURCE = 9,
734     ACPI_HEST_TYPE_RESERVED                      = 10    /* 10 and greater are reserved */
735 };
736 
737 
738 /*
739  * HEST Sub-subtables
740  */
741 
742 /* XPF Machine Check Error Bank */
743 
744 typedef struct acpi_hest_xpf_error_bank
745 {
746     UINT8                   BankNumber;
747     UINT8                   ClearStatusOnInit;
748     UINT8                   StatusFormat;
749     UINT8                   ConfigWriteEnable;
750     UINT32                  ControlRegister;
751     UINT64                  ControlInitData;
752     UINT32                  StatusRegister;
753     UINT32                  AddressRegister;
754     UINT32                  MiscRegister;
755 
756 } ACPI_HEST_XPF_ERROR_BANK;
757 
758 
759 /* Generic Error Status */
760 
761 typedef struct acpi_hest_generic_status
762 {
763     UINT32                  BlockStatus;
764     UINT32                  RawDataOffset;
765     UINT32                  RawDataLength;
766     UINT32                  DataLength;
767     UINT32                  ErrorSeverity;
768 
769 } ACPI_HEST_GENERIC_STATUS;
770 
771 
772 /* Generic Error Data */
773 
774 typedef struct acpi_hest_generic_data
775 {
776     UINT8                   SectionType[16];
777     UINT32                  ErrorSeverity;
778     UINT16                  Revision;
779     UINT8                   ValidationBits;
780     UINT8                   Flags;
781     UINT32                  ErrorDataLength;
782     UINT8                   FruId[16];
783     UINT8                   FruText[20];
784 
785 } ACPI_HEST_GENERIC_DATA;
786 
787 
788 /* Common HEST structure for PCI/AER types below (6,7,8) */
789 
790 typedef struct acpi_hest_aer_common
791 {
792     UINT16                  SourceId;
793     UINT16                  ConfigWriteEnable;
794     UINT8                   Flags;
795     UINT8                   Enabled;
796     UINT32                  RecordsToPreAllocate;
797     UINT32                  MaxSectionsPerRecord;
798     UINT32                  Bus;
799     UINT16                  Device;
800     UINT16                  Function;
801     UINT16                  DeviceControl;
802     UINT16                  Reserved;
803     UINT32                  UncorrectableErrorMask;
804     UINT32                  UncorrectableErrorSeverity;
805     UINT32                  CorrectableErrorMask;
806     UINT32                  AdvancedErrorCababilities;
807 
808 } ACPI_HEST_AER_COMMON;
809 
810 
811 /* Hardware Error Notification */
812 
813 typedef struct acpi_hest_notify
814 {
815     UINT8                   Type;
816     UINT8                   Length;
817     UINT16                  ConfigWriteEnable;
818     UINT32                  PollInterval;
819     UINT32                  Vector;
820     UINT32                  PollingThresholdValue;
821     UINT32                  PollingThresholdWindow;
822     UINT32                  ErrorThresholdValue;
823     UINT32                  ErrorThresholdWindow;
824 
825 } ACPI_HEST_NOTIFY;
826 
827 /* Values for Notify Type field above */
828 
829 enum AcpiHestNotifyTypes
830 {
831     ACPI_HEST_NOTIFY_POLLED     = 0,
832     ACPI_HEST_NOTIFY_EXTERNAL   = 1,
833     ACPI_HEST_NOTIFY_LOCAL      = 2,
834     ACPI_HEST_NOTIFY_SCI        = 3,
835     ACPI_HEST_NOTIFY_NMI        = 4,
836     ACPI_HEST_NOTIFY_RESERVED   = 5     /* 5 and greater are reserved */
837 };
838 
839 
840 /*
841  * HEST subtables
842  *
843  * From WHEA Design Document, 16 May 2007.
844  * Note: There is no subtable type 2 in this version of the document,
845  * and there are two different subtable type 3s.
846  */
847 
848  /* 0: XPF Machine Check Exception */
849 
850 typedef struct acpi_hest_xpf_machine_check
851 {
852     ACPI_HEST_HEADER        Header;
853     UINT16                  SourceId;
854     UINT16                  ConfigWriteEnable;
855     UINT8                   Flags;
856     UINT8                   Reserved1;
857     UINT32                  RecordsToPreAllocate;
858     UINT32                  MaxSectionsPerRecord;
859     UINT64                  GlobalCapabilityData;
860     UINT64                  GlobalControlData;
861     UINT8                   NumHardwareBanks;
862     UINT8                   Reserved2[7];
863 
864 } ACPI_HEST_XPF_MACHINE_CHECK;
865 
866 
867 /* 1: XPF Corrected Machine Check */
868 
869 typedef struct acpi_table_hest_xpf_corrected
870 {
871     ACPI_HEST_HEADER        Header;
872     UINT16                  SourceId;
873     UINT16                  ConfigWriteEnable;
874     UINT8                   Flags;
875     UINT8                   Enabled;
876     UINT32                  RecordsToPreAllocate;
877     UINT32                  MaxSectionsPerRecord;
878     ACPI_HEST_NOTIFY        Notify;
879     UINT8                   NumHardwareBanks;
880     UINT8                   Reserved[3];
881 
882 } ACPI_HEST_XPF_CORRECTED;
883 
884 
885 /* 3: XPF Non-Maskable Interrupt */
886 
887 typedef struct acpi_hest_xpf_nmi
888 {
889     ACPI_HEST_HEADER        Header;
890     UINT16                  SourceId;
891     UINT32                  Reserved;
892     UINT32                  RecordsToPreAllocate;
893     UINT32                  MaxSectionsPerRecord;
894     UINT32                  MaxRawDataLength;
895 
896 } ACPI_HEST_XPF_NMI;
897 
898 
899 /* 4: IPF Corrected Machine Check */
900 
901 typedef struct acpi_hest_ipf_corrected
902 {
903     ACPI_HEST_HEADER        Header;
904     UINT8                   Enabled;
905     UINT8                   Reserved;
906 
907 } ACPI_HEST_IPF_CORRECTED;
908 
909 
910 /* 5: IPF Corrected Platform Error */
911 
912 typedef struct acpi_hest_ipf_corrected_platform
913 {
914     ACPI_HEST_HEADER        Header;
915     UINT8                   Enabled;
916     UINT8                   Reserved;
917 
918 } ACPI_HEST_IPF_CORRECTED_PLATFORM;
919 
920 
921 /* 6: PCI Express Root Port AER */
922 
923 typedef struct acpi_hest_aer_root
924 {
925     ACPI_HEST_HEADER        Header;
926     ACPI_HEST_AER_COMMON    Aer;
927     UINT32                  RootErrorCommand;
928 
929 } ACPI_HEST_AER_ROOT;
930 
931 
932 /* 7: PCI Express AER (AER Endpoint) */
933 
934 typedef struct acpi_hest_aer
935 {
936     ACPI_HEST_HEADER        Header;
937     ACPI_HEST_AER_COMMON    Aer;
938 
939 } ACPI_HEST_AER;
940 
941 
942 /* 8: PCI Express/PCI-X Bridge AER */
943 
944 typedef struct acpi_hest_aer_bridge
945 {
946     ACPI_HEST_HEADER        Header;
947     ACPI_HEST_AER_COMMON    Aer;
948     UINT32                  SecondaryUncorrectableErrorMask;
949     UINT32                  SecondaryUncorrectableErrorSeverity;
950     UINT32                  SecondaryAdvancedCapabilities;
951 
952 } ACPI_HEST_AER_BRIDGE;
953 
954 
955 /* 9: Generic Hardware Error Source */
956 
957 typedef struct acpi_hest_generic
958 {
959     ACPI_HEST_HEADER        Header;
960     UINT16                  SourceId;
961     UINT16                  RelatedSourceId;
962     UINT8                   ConfigWriteEnable;
963     UINT8                   Enabled;
964     UINT32                  RecordsToPreAllocate;
965     UINT32                  MaxSectionsPerRecord;
966     UINT32                  MaxRawDataLength;
967     ACPI_GENERIC_ADDRESS    ErrorStatusAddress;
968     ACPI_HEST_NOTIFY        Notify;
969     UINT32                  ErrorStatusBlockLength;
970 
971 } ACPI_HEST_GENERIC;
972 
973 
974 /*******************************************************************************
975  *
976  * HPET - High Precision Event Timer table
977  *
978  ******************************************************************************/
979 
980 typedef struct acpi_table_hpet
981 {
982     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
983     UINT32                  Id;                 /* Hardware ID of event timer block */
984     ACPI_GENERIC_ADDRESS    Address;            /* Address of event timer block */
985     UINT8                   Sequence;           /* HPET sequence number */
986     UINT16                  MinimumTick;        /* Main counter min tick, periodic mode */
987     UINT8                   Flags;
988 
989 } ACPI_TABLE_HPET;
990 
991 /*! Flags */
992 
993 #define ACPI_HPET_PAGE_PROTECT      (1)         /* 00: No page protection */
994 #define ACPI_HPET_PAGE_PROTECT_4    (1<<1)      /* 01: 4KB page protected */
995 #define ACPI_HPET_PAGE_PROTECT_64   (1<<2)      /* 02: 64KB page protected */
996 
997 /*! [End] no source code translation !*/
998 
999 
1000 /*******************************************************************************
1001  *
1002  * IBFT - Boot Firmware Table
1003  *
1004  ******************************************************************************/
1005 
1006 typedef struct acpi_table_ibft
1007 {
1008     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1009     UINT8                   Reserved[12];
1010 
1011 } ACPI_TABLE_IBFT;
1012 
1013 
1014 /* IBFT common subtable header */
1015 
1016 typedef struct acpi_ibft_header
1017 {
1018     UINT8                   Type;
1019     UINT8                   Version;
1020     UINT16                  Length;
1021     UINT8                   Index;
1022     UINT8                   Flags;
1023 
1024 } ACPI_IBFT_HEADER;
1025 
1026 
1027 /* Values for Type field above */
1028 
1029 enum AcpiIbftType
1030 {
1031     ACPI_IBFT_TYPE_NOT_USED         = 0,
1032     ACPI_IBFT_TYPE_CONTROL          = 1,
1033     ACPI_IBFT_TYPE_INITIATOR        = 2,
1034     ACPI_IBFT_TYPE_NIC              = 3,
1035     ACPI_IBFT_TYPE_TARGET           = 4,
1036     ACPI_IBFT_TYPE_EXTENSIONS       = 5,
1037     ACPI_IBFT_TYPE_RESERVED         = 6     /* 6 and greater are reserved */
1038 };
1039 
1040 
1041 /* IBFT subtables */
1042 
1043 typedef struct acpi_ibft_control
1044 {
1045     ACPI_IBFT_HEADER        Header;
1046     UINT16                  Extensions;
1047     UINT16                  InitiatorOffset;
1048     UINT16                  Nic0Offset;
1049     UINT16                  Target0Offset;
1050     UINT16                  Nic1Offset;
1051     UINT16                  Target1Offset;
1052 
1053 } ACPI_IBFT_CONTROL;
1054 
1055 typedef struct acpi_ibft_initiator
1056 {
1057     ACPI_IBFT_HEADER        Header;
1058     UINT8                   SnsServer[16];
1059     UINT8                   SlpServer[16];
1060     UINT8                   PrimaryServer[16];
1061     UINT8                   SecondaryServer[16];
1062     UINT16                  NameLength;
1063     UINT16                  NameOffset;
1064 
1065 } ACPI_IBFT_INITIATOR;
1066 
1067 typedef struct acpi_ibft_nic
1068 {
1069     ACPI_IBFT_HEADER        Header;
1070     UINT8                   IpAddress[16];
1071     UINT8                   SubnetMaskPrefix;
1072     UINT8                   Origin;
1073     UINT8                   Gateway[16];
1074     UINT8                   PrimaryDns[16];
1075     UINT8                   SecondaryDns[16];
1076     UINT8                   Dhcp[16];
1077     UINT16                  Vlan;
1078     UINT8                   MacAddress[6];
1079     UINT16                  PciAddress;
1080     UINT16                  NameLength;
1081     UINT16                  NameOffset;
1082 
1083 } ACPI_IBFT_NIC;
1084 
1085 typedef struct acpi_ibft_target
1086 {
1087     ACPI_IBFT_HEADER        Header;
1088     UINT8                   TargetIpAddress[16];
1089     UINT16                  TargetIpSocket;
1090     UINT8                   TargetBootLun[8];
1091     UINT8                   ChapType;
1092     UINT8                   NicAssociation;
1093     UINT16                  TargetNameLength;
1094     UINT16                  TargetNameOffset;
1095     UINT16                  ChapNameLength;
1096     UINT16                  ChapNameOffset;
1097     UINT16                  ChapSecretLength;
1098     UINT16                  ChapSecretOffset;
1099     UINT16                  ReverseChapNameLength;
1100     UINT16                  ReverseChapNameOffset;
1101     UINT16                  ReverseChapSecretLength;
1102     UINT16                  ReverseChapSecretOffset;
1103 
1104 } ACPI_IBFT_TARGET;
1105 
1106 
1107 /*******************************************************************************
1108  *
1109  * MADT - Multiple APIC Description Table
1110  *
1111  ******************************************************************************/
1112 
1113 typedef struct acpi_table_madt
1114 {
1115     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1116     UINT32                  Address;            /* Physical address of local APIC */
1117     UINT32                  Flags;
1118 
1119 } ACPI_TABLE_MADT;
1120 
1121 /* Flags */
1122 
1123 #define ACPI_MADT_PCAT_COMPAT       (1)         /* 00:    System also has dual 8259s */
1124 
1125 /* Values for PCATCompat flag */
1126 
1127 #define ACPI_MADT_DUAL_PIC          0
1128 #define ACPI_MADT_MULTIPLE_APIC     1
1129 
1130 
1131 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
1132 
1133 enum AcpiMadtType
1134 {
1135     ACPI_MADT_TYPE_LOCAL_APIC           = 0,
1136     ACPI_MADT_TYPE_IO_APIC              = 1,
1137     ACPI_MADT_TYPE_INTERRUPT_OVERRIDE   = 2,
1138     ACPI_MADT_TYPE_NMI_SOURCE           = 3,
1139     ACPI_MADT_TYPE_LOCAL_APIC_NMI       = 4,
1140     ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE  = 5,
1141     ACPI_MADT_TYPE_IO_SAPIC             = 6,
1142     ACPI_MADT_TYPE_LOCAL_SAPIC          = 7,
1143     ACPI_MADT_TYPE_INTERRUPT_SOURCE     = 8,
1144     ACPI_MADT_TYPE_LOCAL_X2APIC         = 9,
1145     ACPI_MADT_TYPE_LOCAL_X2APIC_NMI     = 10,
1146     ACPI_MADT_TYPE_RESERVED             = 11    /* 11 and greater are reserved */
1147 };
1148 
1149 
1150 /*
1151  * MADT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
1152  */
1153 
1154 /* 0: Processor Local APIC */
1155 
1156 typedef struct acpi_madt_local_apic
1157 {
1158     ACPI_SUBTABLE_HEADER    Header;
1159     UINT8                   ProcessorId;        /* ACPI processor id */
1160     UINT8                   Id;                 /* Processor's local APIC id */
1161     UINT32                  LapicFlags;
1162 
1163 } ACPI_MADT_LOCAL_APIC;
1164 
1165 /* 1: IO APIC */
1166 
1167 typedef struct acpi_madt_io_apic
1168 {
1169     ACPI_SUBTABLE_HEADER    Header;
1170     UINT8                   Id;                 /* I/O APIC ID */
1171     UINT8                   Reserved;           /* Reserved - must be zero */
1172     UINT32                  Address;            /* APIC physical address */
1173     UINT32                  GlobalIrqBase;      /* Global system interrupt where INTI lines start */
1174 
1175 } ACPI_MADT_IO_APIC;
1176 
1177 /* 2: Interrupt Override */
1178 
1179 typedef struct acpi_madt_interrupt_override
1180 {
1181     ACPI_SUBTABLE_HEADER    Header;
1182     UINT8                   Bus;                /* 0 - ISA */
1183     UINT8                   SourceIrq;          /* Interrupt source (IRQ) */
1184     UINT32                  GlobalIrq;          /* Global system interrupt */
1185     UINT16                  IntiFlags;
1186 
1187 } ACPI_MADT_INTERRUPT_OVERRIDE;
1188 
1189 /* 3: NMI Source */
1190 
1191 typedef struct acpi_madt_nmi_source
1192 {
1193     ACPI_SUBTABLE_HEADER    Header;
1194     UINT16                  IntiFlags;
1195     UINT32                  GlobalIrq;          /* Global system interrupt */
1196 
1197 } ACPI_MADT_NMI_SOURCE;
1198 
1199 /* 4: Local APIC NMI */
1200 
1201 typedef struct acpi_madt_local_apic_nmi
1202 {
1203     ACPI_SUBTABLE_HEADER    Header;
1204     UINT8                   ProcessorId;        /* ACPI processor id */
1205     UINT16                  IntiFlags;
1206     UINT8                   Lint;               /* LINTn to which NMI is connected */
1207 
1208 } ACPI_MADT_LOCAL_APIC_NMI;
1209 
1210 /* 5: Address Override */
1211 
1212 typedef struct acpi_madt_local_apic_override
1213 {
1214     ACPI_SUBTABLE_HEADER    Header;
1215     UINT16                  Reserved;           /* Reserved, must be zero */
1216     UINT64                  Address;            /* APIC physical address */
1217 
1218 } ACPI_MADT_LOCAL_APIC_OVERRIDE;
1219 
1220 /* 6: I/O Sapic */
1221 
1222 typedef struct acpi_madt_io_sapic
1223 {
1224     ACPI_SUBTABLE_HEADER    Header;
1225     UINT8                   Id;                 /* I/O SAPIC ID */
1226     UINT8                   Reserved;           /* Reserved, must be zero */
1227     UINT32                  GlobalIrqBase;      /* Global interrupt for SAPIC start */
1228     UINT64                  Address;            /* SAPIC physical address */
1229 
1230 } ACPI_MADT_IO_SAPIC;
1231 
1232 /* 7: Local Sapic */
1233 
1234 typedef struct acpi_madt_local_sapic
1235 {
1236     ACPI_SUBTABLE_HEADER    Header;
1237     UINT8                   ProcessorId;        /* ACPI processor id */
1238     UINT8                   Id;                 /* SAPIC ID */
1239     UINT8                   Eid;                /* SAPIC EID */
1240     UINT8                   Reserved[3];        /* Reserved, must be zero */
1241     UINT32                  LapicFlags;
1242     UINT32                  Uid;                /* Numeric UID - ACPI 3.0 */
1243     char                    UidString[1];       /* String UID  - ACPI 3.0 */
1244 
1245 } ACPI_MADT_LOCAL_SAPIC;
1246 
1247 /* 8: Platform Interrupt Source */
1248 
1249 typedef struct acpi_madt_interrupt_source
1250 {
1251     ACPI_SUBTABLE_HEADER    Header;
1252     UINT16                  IntiFlags;
1253     UINT8                   Type;               /* 1=PMI, 2=INIT, 3=corrected */
1254     UINT8                   Id;                 /* Processor ID */
1255     UINT8                   Eid;                /* Processor EID */
1256     UINT8                   IoSapicVector;      /* Vector value for PMI interrupts */
1257     UINT32                  GlobalIrq;          /* Global system interrupt */
1258     UINT32                  Flags;              /* Interrupt Source Flags */
1259 
1260 } ACPI_MADT_INTERRUPT_SOURCE;
1261 
1262 /* Flags field above */
1263 
1264 #define ACPI_MADT_CPEI_OVERRIDE     (1)
1265 
1266 /* 9: Processor Local X2_APIC (07/2008) */
1267 
1268 typedef struct acpi_madt_local_x2apic
1269 {
1270     ACPI_SUBTABLE_HEADER    Header;
1271     UINT16                  Reserved;           /* Reserved - must be zero */
1272     UINT32                  LocalApicId;        /* Processor X2_APIC ID  */
1273     UINT32                  LapicFlags;
1274     UINT32                  Uid;                /* Extended X2_APIC processor ID */
1275 
1276 } ACPI_MADT_LOCAL_X2APIC;
1277 
1278 /* 10: Local X2APIC NMI (07/2008) */
1279 
1280 typedef struct acpi_madt_local_x2apic_nmi
1281 {
1282     ACPI_SUBTABLE_HEADER    Header;
1283     UINT16                  IntiFlags;
1284     UINT32                  Uid;                /* Processor X2_APIC ID */
1285     UINT8                   Lint;               /* LINTn to which NMI is connected */
1286     UINT8                   Reserved[3];
1287 
1288 } ACPI_MADT_LOCAL_X2APIC_NMI;
1289 
1290 
1291 /*
1292  * Common flags fields for MADT subtables
1293  */
1294 
1295 /* MADT Local APIC flags (LapicFlags) */
1296 
1297 #define ACPI_MADT_ENABLED           (1)         /* 00: Processor is usable if set */
1298 
1299 /* MADT MPS INTI flags (IntiFlags) */
1300 
1301 #define ACPI_MADT_POLARITY_MASK     (3)         /* 00-01: Polarity of APIC I/O input signals */
1302 #define ACPI_MADT_TRIGGER_MASK      (3<<2)      /* 02-03: Trigger mode of APIC input signals */
1303 
1304 /* Values for MPS INTI flags */
1305 
1306 #define ACPI_MADT_POLARITY_CONFORMS       0
1307 #define ACPI_MADT_POLARITY_ACTIVE_HIGH    1
1308 #define ACPI_MADT_POLARITY_RESERVED       2
1309 #define ACPI_MADT_POLARITY_ACTIVE_LOW     3
1310 
1311 #define ACPI_MADT_TRIGGER_CONFORMS        (0)
1312 #define ACPI_MADT_TRIGGER_EDGE            (1<<2)
1313 #define ACPI_MADT_TRIGGER_RESERVED        (2<<2)
1314 #define ACPI_MADT_TRIGGER_LEVEL           (3<<2)
1315 
1316 
1317 /*******************************************************************************
1318  *
1319  * MCFG - PCI Memory Mapped Configuration table and sub-table
1320  *
1321  ******************************************************************************/
1322 
1323 typedef struct acpi_table_mcfg
1324 {
1325     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1326     UINT8                   Reserved[8];
1327 
1328 } ACPI_TABLE_MCFG;
1329 
1330 
1331 /* Subtable */
1332 
1333 typedef struct acpi_mcfg_allocation
1334 {
1335     UINT64                  Address;            /* Base address, processor-relative */
1336     UINT16                  PciSegment;         /* PCI segment group number */
1337     UINT8                   StartBusNumber;     /* Starting PCI Bus number */
1338     UINT8                   EndBusNumber;       /* Final PCI Bus number */
1339     UINT32                  Reserved;
1340 
1341 } ACPI_MCFG_ALLOCATION;
1342 
1343 
1344 /*******************************************************************************
1345  *
1346  * SBST - Smart Battery Specification Table
1347  *
1348  ******************************************************************************/
1349 
1350 typedef struct acpi_table_sbst
1351 {
1352     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1353     UINT32                  WarningLevel;
1354     UINT32                  LowLevel;
1355     UINT32                  CriticalLevel;
1356 
1357 } ACPI_TABLE_SBST;
1358 
1359 
1360 /*******************************************************************************
1361  *
1362  * SLIT - System Locality Distance Information Table
1363  *
1364  ******************************************************************************/
1365 
1366 typedef struct acpi_table_slit
1367 {
1368     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1369     UINT64                  LocalityCount;
1370     UINT8                   Entry[1];           /* Real size = localities^2 */
1371 
1372 } ACPI_TABLE_SLIT;
1373 
1374 
1375 /*******************************************************************************
1376  *
1377  * SPCR - Serial Port Console Redirection table
1378  *
1379  ******************************************************************************/
1380 
1381 typedef struct acpi_table_spcr
1382 {
1383     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1384     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
1385     UINT8                   Reserved[3];
1386     ACPI_GENERIC_ADDRESS    SerialPort;
1387     UINT8                   InterruptType;
1388     UINT8                   PcInterrupt;
1389     UINT32                  Interrupt;
1390     UINT8                   BaudRate;
1391     UINT8                   Parity;
1392     UINT8                   StopBits;
1393     UINT8                   FlowControl;
1394     UINT8                   TerminalType;
1395     UINT8                   Reserved1;
1396     UINT16                  PciDeviceId;
1397     UINT16                  PciVendorId;
1398     UINT8                   PciBus;
1399     UINT8                   PciDevice;
1400     UINT8                   PciFunction;
1401     UINT32                  PciFlags;
1402     UINT8                   PciSegment;
1403     UINT32                  Reserved2;
1404 
1405 } ACPI_TABLE_SPCR;
1406 
1407 
1408 /*******************************************************************************
1409  *
1410  * SPMI - Server Platform Management Interface table
1411  *
1412  ******************************************************************************/
1413 
1414 typedef struct acpi_table_spmi
1415 {
1416     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1417     UINT8                   Reserved;
1418     UINT8                   InterfaceType;
1419     UINT16                  SpecRevision;       /* Version of IPMI */
1420     UINT8                   InterruptType;
1421     UINT8                   GpeNumber;          /* GPE assigned */
1422     UINT8                   Reserved1;
1423     UINT8                   PciDeviceFlag;
1424     UINT32                  Interrupt;
1425     ACPI_GENERIC_ADDRESS    IpmiRegister;
1426     UINT8                   PciSegment;
1427     UINT8                   PciBus;
1428     UINT8                   PciDevice;
1429     UINT8                   PciFunction;
1430 
1431 } ACPI_TABLE_SPMI;
1432 
1433 
1434 /*******************************************************************************
1435  *
1436  * SRAT - System Resource Affinity Table
1437  *
1438  ******************************************************************************/
1439 
1440 typedef struct acpi_table_srat
1441 {
1442     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1443     UINT32                  TableRevision;      /* Must be value '1' */
1444     UINT64                  Reserved;           /* Reserved, must be zero */
1445 
1446 } ACPI_TABLE_SRAT;
1447 
1448 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
1449 
1450 enum AcpiSratType
1451 {
1452     ACPI_SRAT_TYPE_CPU_AFFINITY         = 0,
1453     ACPI_SRAT_TYPE_MEMORY_AFFINITY      = 1,
1454     ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY  = 2,
1455     ACPI_SRAT_TYPE_RESERVED             = 3     /* 3 and greater are reserved */
1456 };
1457 
1458 /*
1459  * SRAT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
1460  */
1461 
1462 /* 0: Processor Local APIC/SAPIC Affinity */
1463 
1464 typedef struct acpi_srat_cpu_affinity
1465 {
1466     ACPI_SUBTABLE_HEADER    Header;
1467     UINT8                   ProximityDomainLo;
1468     UINT8                   ApicId;
1469     UINT32                  Flags;
1470     UINT8                   LocalSapicEid;
1471     UINT8                   ProximityDomainHi[3];
1472     UINT32                  Reserved;           /* Reserved, must be zero */
1473 
1474 } ACPI_SRAT_CPU_AFFINITY;
1475 
1476 /* 1: Memory Affinity */
1477 
1478 typedef struct acpi_srat_mem_affinity
1479 {
1480     ACPI_SUBTABLE_HEADER    Header;
1481     UINT32                  ProximityDomain;
1482     UINT16                  Reserved;           /* Reserved, must be zero */
1483     UINT64                  BaseAddress;
1484     UINT64                  Length;
1485     UINT32                  Reserved1;
1486     UINT32                  Flags;
1487     UINT64                  Reserved2;          /* Reserved, must be zero */
1488 
1489 } ACPI_SRAT_MEM_AFFINITY;
1490 
1491 /* Flags */
1492 
1493 #define ACPI_SRAT_MEM_ENABLED       (1)         /* 00: Use affinity structure */
1494 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1)      /* 01: Memory region is hot pluggable */
1495 #define ACPI_SRAT_MEM_NON_VOLATILE  (1<<2)      /* 02: Memory region is non-volatile */
1496 
1497 /* 2: Processor Local X2_APIC Affinity (07/2008) */
1498 
1499 typedef struct acpi_srat_x2apic_cpu_affinity
1500 {
1501     ACPI_SUBTABLE_HEADER    Header;
1502     UINT16                  Reserved;           /* Reserved, must be zero */
1503     UINT32                  ProximityDomain;
1504     UINT32                  ApicId;
1505     UINT32                  Flags;
1506 
1507 } ACPI_SRAT_X2APIC_CPU_AFFINITY;
1508 
1509 /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
1510 
1511 #define ACPI_SRAT_CPU_ENABLED       (1)         /* 00: Use affinity structure */
1512 
1513 
1514 /*******************************************************************************
1515  *
1516  * TCPA - Trusted Computing Platform Alliance table
1517  *
1518  ******************************************************************************/
1519 
1520 typedef struct acpi_table_tcpa
1521 {
1522     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1523     UINT16                  Reserved;
1524     UINT32                  MaxLogLength;       /* Maximum length for the event log area */
1525     UINT64                  LogAddress;         /* Address of the event log area */
1526 
1527 } ACPI_TABLE_TCPA;
1528 
1529 
1530 /*******************************************************************************
1531  *
1532  * UEFI - UEFI Boot optimization Table
1533  *
1534  ******************************************************************************/
1535 
1536 typedef struct acpi_table_uefi
1537 {
1538     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1539     UINT8                   Identifier[16];     /* UUID identifier */
1540     UINT16                  DataOffset;         /* Offset of remaining data in table */
1541     UINT8                   Data;
1542 
1543 } ACPI_TABLE_UEFI;
1544 
1545 
1546 /*******************************************************************************
1547  *
1548  * WDAT - Watchdog Action Table
1549  *
1550  ******************************************************************************/
1551 
1552 typedef struct acpi_table_wdat
1553 {
1554     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1555     UINT32                  HeaderLength;       /* Watchdog Header Length */
1556     UINT16                  PciSegment;         /* PCI Segment number */
1557     UINT8                   PciBus;             /* PCI Bus number */
1558     UINT8                   PciDevice;          /* PCI Device number */
1559     UINT8                   PciFunction;        /* PCI Function number */
1560     UINT8                   Reserved[3];
1561     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
1562     UINT32                  MaxCount;           /* Maximum counter value supported */
1563     UINT32                  MinCount;           /* Minimum counter value */
1564     UINT8                   Flags;
1565     UINT8                   Reserved2[3];
1566     UINT32                  Entries;            /* Number of watchdog entries that follow */
1567 
1568 } ACPI_TABLE_WDAT;
1569 
1570 /* WDAT Instruction Entries (actions) */
1571 
1572 typedef struct acpi_wdat_entry
1573 {
1574     ACPI_WHEA_HEADER        WheaHeader;         /* Common header for WHEA tables */
1575 
1576 } ACPI_WDAT_ENTRY;
1577 
1578 /* Values for Action field above */
1579 
1580 enum AcpiWdatActions
1581 {
1582     ACPI_WDAT_RESET                 = 1,
1583     ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1584     ACPI_WDAT_GET_COUNTDOWN         = 5,
1585     ACPI_WDAT_SET_COUNTDOWN         = 6,
1586     ACPI_WDAT_GET_RUNNING_STATE     = 8,
1587     ACPI_WDAT_SET_RUNNING_STATE     = 9,
1588     ACPI_WDAT_GET_STOPPED_STATE     = 10,
1589     ACPI_WDAT_SET_STOPPED_STATE     = 11,
1590     ACPI_WDAT_GET_REBOOT            = 16,
1591     ACPI_WDAT_SET_REBOOT            = 17,
1592     ACPI_WDAT_GET_SHUTDOWN          = 18,
1593     ACPI_WDAT_SET_SHUTDOWN          = 19,
1594     ACPI_WDAT_GET_STATUS            = 32,
1595     ACPI_WDAT_SET_STATUS            = 33,
1596     ACPI_WDAT_ACTION_RESERVED       = 34    /* 34 and greater are reserved */
1597 };
1598 
1599 /* Values for Instruction field above */
1600 
1601 enum AcpiWdatInstructions
1602 {
1603     ACPI_WDAT_READ_VALUE            = 0,
1604     ACPI_WDAT_READ_COUNTDOWN        = 1,
1605     ACPI_WDAT_WRITE_VALUE           = 2,
1606     ACPI_WDAT_WRITE_COUNTDOWN       = 3,
1607     ACPI_WDAT_INSTRUCTION_RESERVED  = 4,    /* 4 and greater are reserved */
1608     ACPI_WDAT_PRESERVE_REGISTER     = 0x80  /* Except for this value */
1609 };
1610 
1611 
1612 /*******************************************************************************
1613  *
1614  * WDRT - Watchdog Resource Table
1615  *
1616  ******************************************************************************/
1617 
1618 typedef struct acpi_table_wdrt
1619 {
1620     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1621     UINT32                  HeaderLength;       /* Watchdog Header Length */
1622     UINT8                   PciSegment;         /* PCI Segment number */
1623     UINT8                   PciBus;             /* PCI Bus number */
1624     UINT8                   PciDevice;          /* PCI Device number */
1625     UINT8                   PciFunction;        /* PCI Function number */
1626     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
1627     UINT32                  MaxCount;           /* Maximum counter value supported */
1628     UINT32                  MinCount;           /* Minimum counter value */
1629     UINT8                   Flags;
1630     UINT8                   Reserved[3];
1631     UINT32                  Entries;            /* Number of watchdog entries that follow */
1632 
1633 } ACPI_TABLE_WDRT;
1634 
1635 /* Flags */
1636 
1637 #define ACPI_WDRT_TIMER_ENABLED     (1)         /* 00: Timer enabled */
1638 
1639 
1640 /* Reset to default packing */
1641 
1642 #pragma pack()
1643 
1644 #endif /* __ACTBL1_H__ */
1645