xref: /haiku/src/add-ons/kernel/bus_managers/acpi/acpica/include/actbl1.h (revision 644fa5a93845dc4a1bc155f1fd0f94ebdf0b47bc)
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 - 2014, 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 #ifndef __ACTBL1_H__
117 #define __ACTBL1_H__
118 
119 
120 /*******************************************************************************
121  *
122  * Additional ACPI Tables (1)
123  *
124  * These tables are not consumed directly by the ACPICA subsystem, but are
125  * included here to support device drivers and the AML disassembler.
126  *
127  * The tables in this file are fully defined within the ACPI specification.
128  *
129  ******************************************************************************/
130 
131 
132 /*
133  * Values for description table header signatures for tables defined in this
134  * file. Useful because they make it more difficult to inadvertently type in
135  * the wrong signature.
136  */
137 #define ACPI_SIG_BERT           "BERT"      /* Boot Error Record Table */
138 #define ACPI_SIG_CPEP           "CPEP"      /* Corrected Platform Error Polling table */
139 #define ACPI_SIG_ECDT           "ECDT"      /* Embedded Controller Boot Resources Table */
140 #define ACPI_SIG_EINJ           "EINJ"      /* Error Injection table */
141 #define ACPI_SIG_ERST           "ERST"      /* Error Record Serialization Table */
142 #define ACPI_SIG_HEST           "HEST"      /* Hardware Error Source Table */
143 #define ACPI_SIG_MADT           "APIC"      /* Multiple APIC Description Table */
144 #define ACPI_SIG_MSCT           "MSCT"      /* Maximum System Characteristics Table */
145 #define ACPI_SIG_SBST           "SBST"      /* Smart Battery Specification Table */
146 #define ACPI_SIG_SLIT           "SLIT"      /* System Locality Distance Information Table */
147 #define ACPI_SIG_SRAT           "SRAT"      /* System Resource Affinity Table */
148 
149 
150 /*
151  * All tables must be byte-packed to match the ACPI specification, since
152  * the tables are provided by the system BIOS.
153  */
154 #pragma pack(1)
155 
156 /*
157  * Note: C bitfields are not used for this reason:
158  *
159  * "Bitfields are great and easy to read, but unfortunately the C language
160  * does not specify the layout of bitfields in memory, which means they are
161  * essentially useless for dealing with packed data in on-disk formats or
162  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
163  * this decision was a design error in C. Ritchie could have picked an order
164  * and stuck with it." Norman Ramsey.
165  * See http://stackoverflow.com/a/1053662/41661
166  */
167 
168 
169 /*******************************************************************************
170  *
171  * Common subtable headers
172  *
173  ******************************************************************************/
174 
175 /* Generic subtable header (used in MADT, SRAT, etc.) */
176 
177 typedef struct acpi_subtable_header
178 {
179     UINT8                   Type;
180     UINT8                   Length;
181 
182 } ACPI_SUBTABLE_HEADER;
183 
184 
185 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
186 
187 typedef struct acpi_whea_header
188 {
189     UINT8                   Action;
190     UINT8                   Instruction;
191     UINT8                   Flags;
192     UINT8                   Reserved;
193     ACPI_GENERIC_ADDRESS    RegisterRegion;
194     UINT64                  Value;              /* Value used with Read/Write register */
195     UINT64                  Mask;               /* Bitmask required for this register instruction */
196 
197 } ACPI_WHEA_HEADER;
198 
199 
200 /*******************************************************************************
201  *
202  * BERT - Boot Error Record Table (ACPI 4.0)
203  *        Version 1
204  *
205  ******************************************************************************/
206 
207 typedef struct acpi_table_bert
208 {
209     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
210     UINT32                  RegionLength;       /* Length of the boot error region */
211     UINT64                  Address;            /* Physical address of the error region */
212 
213 } ACPI_TABLE_BERT;
214 
215 
216 /* Boot Error Region (not a subtable, pointed to by Address field above) */
217 
218 typedef struct acpi_bert_region
219 {
220     UINT32                  BlockStatus;        /* Type of error information */
221     UINT32                  RawDataOffset;      /* Offset to raw error data */
222     UINT32                  RawDataLength;      /* Length of raw error data */
223     UINT32                  DataLength;         /* Length of generic error data */
224     UINT32                  ErrorSeverity;      /* Severity code */
225 
226 } ACPI_BERT_REGION;
227 
228 /* Values for BlockStatus flags above */
229 
230 #define ACPI_BERT_UNCORRECTABLE             (1)
231 #define ACPI_BERT_CORRECTABLE               (1<<1)
232 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE    (1<<2)
233 #define ACPI_BERT_MULTIPLE_CORRECTABLE      (1<<3)
234 #define ACPI_BERT_ERROR_ENTRY_COUNT         (0xFF<<4) /* 8 bits, error count */
235 
236 /* Values for ErrorSeverity above */
237 
238 enum AcpiBertErrorSeverity
239 {
240     ACPI_BERT_ERROR_CORRECTABLE     = 0,
241     ACPI_BERT_ERROR_FATAL           = 1,
242     ACPI_BERT_ERROR_CORRECTED       = 2,
243     ACPI_BERT_ERROR_NONE            = 3,
244     ACPI_BERT_ERROR_RESERVED        = 4     /* 4 and greater are reserved */
245 };
246 
247 /*
248  * Note: The generic error data that follows the ErrorSeverity field above
249  * uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below
250  */
251 
252 
253 /*******************************************************************************
254  *
255  * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
256  *        Version 1
257  *
258  ******************************************************************************/
259 
260 typedef struct acpi_table_cpep
261 {
262     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
263     UINT64                  Reserved;
264 
265 } ACPI_TABLE_CPEP;
266 
267 
268 /* Subtable */
269 
270 typedef struct acpi_cpep_polling
271 {
272     ACPI_SUBTABLE_HEADER    Header;
273     UINT8                   Id;                 /* Processor ID */
274     UINT8                   Eid;                /* Processor EID */
275     UINT32                  Interval;           /* Polling interval (msec) */
276 
277 } ACPI_CPEP_POLLING;
278 
279 
280 /*******************************************************************************
281  *
282  * ECDT - Embedded Controller Boot Resources Table
283  *        Version 1
284  *
285  ******************************************************************************/
286 
287 typedef struct acpi_table_ecdt
288 {
289     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
290     ACPI_GENERIC_ADDRESS    Control;            /* Address of EC command/status register */
291     ACPI_GENERIC_ADDRESS    Data;               /* Address of EC data register */
292     UINT32                  Uid;                /* Unique ID - must be same as the EC _UID method */
293     UINT8                   Gpe;                /* The GPE for the EC */
294     UINT8                   Id[1];              /* Full namepath of the EC in the ACPI namespace */
295 
296 } ACPI_TABLE_ECDT;
297 
298 
299 /*******************************************************************************
300  *
301  * EINJ - Error Injection Table (ACPI 4.0)
302  *        Version 1
303  *
304  ******************************************************************************/
305 
306 typedef struct acpi_table_einj
307 {
308     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
309     UINT32                  HeaderLength;
310     UINT8                   Flags;
311     UINT8                   Reserved[3];
312     UINT32                  Entries;
313 
314 } ACPI_TABLE_EINJ;
315 
316 
317 /* EINJ Injection Instruction Entries (actions) */
318 
319 typedef struct acpi_einj_entry
320 {
321     ACPI_WHEA_HEADER        WheaHeader;         /* Common header for WHEA tables */
322 
323 } ACPI_EINJ_ENTRY;
324 
325 /* Masks for Flags field above */
326 
327 #define ACPI_EINJ_PRESERVE          (1)
328 
329 /* Values for Action field above */
330 
331 enum AcpiEinjActions
332 {
333     ACPI_EINJ_BEGIN_OPERATION               = 0,
334     ACPI_EINJ_GET_TRIGGER_TABLE             = 1,
335     ACPI_EINJ_SET_ERROR_TYPE                = 2,
336     ACPI_EINJ_GET_ERROR_TYPE                = 3,
337     ACPI_EINJ_END_OPERATION                 = 4,
338     ACPI_EINJ_EXECUTE_OPERATION             = 5,
339     ACPI_EINJ_CHECK_BUSY_STATUS             = 6,
340     ACPI_EINJ_GET_COMMAND_STATUS            = 7,
341     ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS   = 8,
342     ACPI_EINJ_ACTION_RESERVED               = 9,     /* 9 and greater are reserved */
343     ACPI_EINJ_TRIGGER_ERROR                 = 0xFF   /* Except for this value */
344 };
345 
346 /* Values for Instruction field above */
347 
348 enum AcpiEinjInstructions
349 {
350     ACPI_EINJ_READ_REGISTER         = 0,
351     ACPI_EINJ_READ_REGISTER_VALUE   = 1,
352     ACPI_EINJ_WRITE_REGISTER        = 2,
353     ACPI_EINJ_WRITE_REGISTER_VALUE  = 3,
354     ACPI_EINJ_NOOP                  = 4,
355     ACPI_EINJ_FLUSH_CACHELINE       = 5,
356     ACPI_EINJ_INSTRUCTION_RESERVED  = 6     /* 6 and greater are reserved */
357 };
358 
359 typedef struct acpi_einj_error_type_with_addr
360 {
361     UINT32                  ErrorType;
362     UINT32                  VendorStructOffset;
363     UINT32                  Flags;
364     UINT32                  ApicId;
365     UINT64                  Address;
366     UINT64                  Range;
367     UINT32                  PcieId;
368 
369 } ACPI_EINJ_ERROR_TYPE_WITH_ADDR;
370 
371 typedef struct acpi_einj_vendor
372 {
373     UINT32                  Length;
374     UINT32                  PcieId;
375     UINT16                  VendorId;
376     UINT16                  DeviceId;
377     UINT8                   RevisionId;
378     UINT8                   Reserved[3];
379 
380 } ACPI_EINJ_VENDOR;
381 
382 
383 /* EINJ Trigger Error Action Table */
384 
385 typedef struct acpi_einj_trigger
386 {
387     UINT32                  HeaderSize;
388     UINT32                  Revision;
389     UINT32                  TableSize;
390     UINT32                  EntryCount;
391 
392 } ACPI_EINJ_TRIGGER;
393 
394 /* Command status return values */
395 
396 enum AcpiEinjCommandStatus
397 {
398     ACPI_EINJ_SUCCESS               = 0,
399     ACPI_EINJ_FAILURE               = 1,
400     ACPI_EINJ_INVALID_ACCESS        = 2,
401     ACPI_EINJ_STATUS_RESERVED       = 3     /* 3 and greater are reserved */
402 };
403 
404 
405 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
406 
407 #define ACPI_EINJ_PROCESSOR_CORRECTABLE     (1)
408 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE   (1<<1)
409 #define ACPI_EINJ_PROCESSOR_FATAL           (1<<2)
410 #define ACPI_EINJ_MEMORY_CORRECTABLE        (1<<3)
411 #define ACPI_EINJ_MEMORY_UNCORRECTABLE      (1<<4)
412 #define ACPI_EINJ_MEMORY_FATAL              (1<<5)
413 #define ACPI_EINJ_PCIX_CORRECTABLE          (1<<6)
414 #define ACPI_EINJ_PCIX_UNCORRECTABLE        (1<<7)
415 #define ACPI_EINJ_PCIX_FATAL                (1<<8)
416 #define ACPI_EINJ_PLATFORM_CORRECTABLE      (1<<9)
417 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE    (1<<10)
418 #define ACPI_EINJ_PLATFORM_FATAL            (1<<11)
419 #define ACPI_EINJ_VENDOR_DEFINED            (1<<31)
420 
421 
422 /*******************************************************************************
423  *
424  * ERST - Error Record Serialization Table (ACPI 4.0)
425  *        Version 1
426  *
427  ******************************************************************************/
428 
429 typedef struct acpi_table_erst
430 {
431     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
432     UINT32                  HeaderLength;
433     UINT32                  Reserved;
434     UINT32                  Entries;
435 
436 } ACPI_TABLE_ERST;
437 
438 
439 /* ERST Serialization Entries (actions) */
440 
441 typedef struct acpi_erst_entry
442 {
443     ACPI_WHEA_HEADER        WheaHeader;         /* Common header for WHEA tables */
444 
445 } ACPI_ERST_ENTRY;
446 
447 /* Masks for Flags field above */
448 
449 #define ACPI_ERST_PRESERVE          (1)
450 
451 /* Values for Action field above */
452 
453 enum AcpiErstActions
454 {
455     ACPI_ERST_BEGIN_WRITE           = 0,
456     ACPI_ERST_BEGIN_READ            = 1,
457     ACPI_ERST_BEGIN_CLEAR           = 2,
458     ACPI_ERST_END                   = 3,
459     ACPI_ERST_SET_RECORD_OFFSET     = 4,
460     ACPI_ERST_EXECUTE_OPERATION     = 5,
461     ACPI_ERST_CHECK_BUSY_STATUS     = 6,
462     ACPI_ERST_GET_COMMAND_STATUS    = 7,
463     ACPI_ERST_GET_RECORD_ID         = 8,
464     ACPI_ERST_SET_RECORD_ID         = 9,
465     ACPI_ERST_GET_RECORD_COUNT      = 10,
466     ACPI_ERST_BEGIN_DUMMY_WRIITE    = 11,
467     ACPI_ERST_NOT_USED              = 12,
468     ACPI_ERST_GET_ERROR_RANGE       = 13,
469     ACPI_ERST_GET_ERROR_LENGTH      = 14,
470     ACPI_ERST_GET_ERROR_ATTRIBUTES  = 15,
471     ACPI_ERST_ACTION_RESERVED       = 16    /* 16 and greater are reserved */
472 };
473 
474 /* Values for Instruction field above */
475 
476 enum AcpiErstInstructions
477 {
478     ACPI_ERST_READ_REGISTER         = 0,
479     ACPI_ERST_READ_REGISTER_VALUE   = 1,
480     ACPI_ERST_WRITE_REGISTER        = 2,
481     ACPI_ERST_WRITE_REGISTER_VALUE  = 3,
482     ACPI_ERST_NOOP                  = 4,
483     ACPI_ERST_LOAD_VAR1             = 5,
484     ACPI_ERST_LOAD_VAR2             = 6,
485     ACPI_ERST_STORE_VAR1            = 7,
486     ACPI_ERST_ADD                   = 8,
487     ACPI_ERST_SUBTRACT              = 9,
488     ACPI_ERST_ADD_VALUE             = 10,
489     ACPI_ERST_SUBTRACT_VALUE        = 11,
490     ACPI_ERST_STALL                 = 12,
491     ACPI_ERST_STALL_WHILE_TRUE      = 13,
492     ACPI_ERST_SKIP_NEXT_IF_TRUE     = 14,
493     ACPI_ERST_GOTO                  = 15,
494     ACPI_ERST_SET_SRC_ADDRESS_BASE  = 16,
495     ACPI_ERST_SET_DST_ADDRESS_BASE  = 17,
496     ACPI_ERST_MOVE_DATA             = 18,
497     ACPI_ERST_INSTRUCTION_RESERVED  = 19    /* 19 and greater are reserved */
498 };
499 
500 /* Command status return values */
501 
502 enum AcpiErstCommandStatus
503 {
504     ACPI_ERST_SUCESS                = 0,
505     ACPI_ERST_NO_SPACE              = 1,
506     ACPI_ERST_NOT_AVAILABLE         = 2,
507     ACPI_ERST_FAILURE               = 3,
508     ACPI_ERST_RECORD_EMPTY          = 4,
509     ACPI_ERST_NOT_FOUND             = 5,
510     ACPI_ERST_STATUS_RESERVED       = 6     /* 6 and greater are reserved */
511 };
512 
513 
514 /* Error Record Serialization Information */
515 
516 typedef struct acpi_erst_info
517 {
518     UINT16                  Signature;          /* Should be "ER" */
519     UINT8                   Data[48];
520 
521 } ACPI_ERST_INFO;
522 
523 
524 /*******************************************************************************
525  *
526  * HEST - Hardware Error Source Table (ACPI 4.0)
527  *        Version 1
528  *
529  ******************************************************************************/
530 
531 typedef struct acpi_table_hest
532 {
533     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
534     UINT32                  ErrorSourceCount;
535 
536 } ACPI_TABLE_HEST;
537 
538 
539 /* HEST subtable header */
540 
541 typedef struct acpi_hest_header
542 {
543     UINT16                  Type;
544     UINT16                  SourceId;
545 
546 } ACPI_HEST_HEADER;
547 
548 
549 /* Values for Type field above for subtables */
550 
551 enum AcpiHestTypes
552 {
553     ACPI_HEST_TYPE_IA32_CHECK           = 0,
554     ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
555     ACPI_HEST_TYPE_IA32_NMI             = 2,
556     ACPI_HEST_TYPE_NOT_USED3            = 3,
557     ACPI_HEST_TYPE_NOT_USED4            = 4,
558     ACPI_HEST_TYPE_NOT_USED5            = 5,
559     ACPI_HEST_TYPE_AER_ROOT_PORT        = 6,
560     ACPI_HEST_TYPE_AER_ENDPOINT         = 7,
561     ACPI_HEST_TYPE_AER_BRIDGE           = 8,
562     ACPI_HEST_TYPE_GENERIC_ERROR        = 9,
563     ACPI_HEST_TYPE_RESERVED             = 10    /* 10 and greater are reserved */
564 };
565 
566 
567 /*
568  * HEST substructures contained in subtables
569  */
570 
571 /*
572  * IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and
573  * ACPI_HEST_IA_CORRECTED structures.
574  */
575 typedef struct acpi_hest_ia_error_bank
576 {
577     UINT8                   BankNumber;
578     UINT8                   ClearStatusOnInit;
579     UINT8                   StatusFormat;
580     UINT8                   Reserved;
581     UINT32                  ControlRegister;
582     UINT64                  ControlData;
583     UINT32                  StatusRegister;
584     UINT32                  AddressRegister;
585     UINT32                  MiscRegister;
586 
587 } ACPI_HEST_IA_ERROR_BANK;
588 
589 
590 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
591 
592 typedef struct acpi_hest_aer_common
593 {
594     UINT16                  Reserved1;
595     UINT8                   Flags;
596     UINT8                   Enabled;
597     UINT32                  RecordsToPreallocate;
598     UINT32                  MaxSectionsPerRecord;
599     UINT32                  Bus;                    /* Bus and Segment numbers */
600     UINT16                  Device;
601     UINT16                  Function;
602     UINT16                  DeviceControl;
603     UINT16                  Reserved2;
604     UINT32                  UncorrectableMask;
605     UINT32                  UncorrectableSeverity;
606     UINT32                  CorrectableMask;
607     UINT32                  AdvancedCapabilities;
608 
609 } ACPI_HEST_AER_COMMON;
610 
611 /* Masks for HEST Flags fields */
612 
613 #define ACPI_HEST_FIRMWARE_FIRST        (1)
614 #define ACPI_HEST_GLOBAL                (1<<1)
615 
616 /*
617  * Macros to access the bus/segment numbers in Bus field above:
618  *  Bus number is encoded in bits 7:0
619  *  Segment number is encoded in bits 23:8
620  */
621 #define ACPI_HEST_BUS(Bus)              ((Bus) & 0xFF)
622 #define ACPI_HEST_SEGMENT(Bus)          (((Bus) >> 8) & 0xFFFF)
623 
624 
625 /* Hardware Error Notification */
626 
627 typedef struct acpi_hest_notify
628 {
629     UINT8                   Type;
630     UINT8                   Length;
631     UINT16                  ConfigWriteEnable;
632     UINT32                  PollInterval;
633     UINT32                  Vector;
634     UINT32                  PollingThresholdValue;
635     UINT32                  PollingThresholdWindow;
636     UINT32                  ErrorThresholdValue;
637     UINT32                  ErrorThresholdWindow;
638 
639 } ACPI_HEST_NOTIFY;
640 
641 /* Values for Notify Type field above */
642 
643 enum AcpiHestNotifyTypes
644 {
645     ACPI_HEST_NOTIFY_POLLED     = 0,
646     ACPI_HEST_NOTIFY_EXTERNAL   = 1,
647     ACPI_HEST_NOTIFY_LOCAL      = 2,
648     ACPI_HEST_NOTIFY_SCI        = 3,
649     ACPI_HEST_NOTIFY_NMI        = 4,
650     ACPI_HEST_NOTIFY_CMCI       = 5,    /* ACPI 5.0 */
651     ACPI_HEST_NOTIFY_MCE        = 6,    /* ACPI 5.0 */
652     ACPI_HEST_NOTIFY_RESERVED   = 7     /* 7 and greater are reserved */
653 };
654 
655 /* Values for ConfigWriteEnable bitfield above */
656 
657 #define ACPI_HEST_TYPE                  (1)
658 #define ACPI_HEST_POLL_INTERVAL         (1<<1)
659 #define ACPI_HEST_POLL_THRESHOLD_VALUE  (1<<2)
660 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
661 #define ACPI_HEST_ERR_THRESHOLD_VALUE   (1<<4)
662 #define ACPI_HEST_ERR_THRESHOLD_WINDOW  (1<<5)
663 
664 
665 /*
666  * HEST subtables
667  */
668 
669 /* 0: IA32 Machine Check Exception */
670 
671 typedef struct acpi_hest_ia_machine_check
672 {
673     ACPI_HEST_HEADER        Header;
674     UINT16                  Reserved1;
675     UINT8                   Flags;
676     UINT8                   Enabled;
677     UINT32                  RecordsToPreallocate;
678     UINT32                  MaxSectionsPerRecord;
679     UINT64                  GlobalCapabilityData;
680     UINT64                  GlobalControlData;
681     UINT8                   NumHardwareBanks;
682     UINT8                   Reserved3[7];
683 
684 } ACPI_HEST_IA_MACHINE_CHECK;
685 
686 
687 /* 1: IA32 Corrected Machine Check */
688 
689 typedef struct acpi_hest_ia_corrected
690 {
691     ACPI_HEST_HEADER        Header;
692     UINT16                  Reserved1;
693     UINT8                   Flags;
694     UINT8                   Enabled;
695     UINT32                  RecordsToPreallocate;
696     UINT32                  MaxSectionsPerRecord;
697     ACPI_HEST_NOTIFY        Notify;
698     UINT8                   NumHardwareBanks;
699     UINT8                   Reserved2[3];
700 
701 } ACPI_HEST_IA_CORRECTED;
702 
703 
704 /* 2: IA32 Non-Maskable Interrupt */
705 
706 typedef struct acpi_hest_ia_nmi
707 {
708     ACPI_HEST_HEADER        Header;
709     UINT32                  Reserved;
710     UINT32                  RecordsToPreallocate;
711     UINT32                  MaxSectionsPerRecord;
712     UINT32                  MaxRawDataLength;
713 
714 } ACPI_HEST_IA_NMI;
715 
716 
717 /* 3,4,5: Not used */
718 
719 /* 6: PCI Express Root Port AER */
720 
721 typedef struct acpi_hest_aer_root
722 {
723     ACPI_HEST_HEADER        Header;
724     ACPI_HEST_AER_COMMON    Aer;
725     UINT32                  RootErrorCommand;
726 
727 } ACPI_HEST_AER_ROOT;
728 
729 
730 /* 7: PCI Express AER (AER Endpoint) */
731 
732 typedef struct acpi_hest_aer
733 {
734     ACPI_HEST_HEADER        Header;
735     ACPI_HEST_AER_COMMON    Aer;
736 
737 } ACPI_HEST_AER;
738 
739 
740 /* 8: PCI Express/PCI-X Bridge AER */
741 
742 typedef struct acpi_hest_aer_bridge
743 {
744     ACPI_HEST_HEADER        Header;
745     ACPI_HEST_AER_COMMON    Aer;
746     UINT32                  UncorrectableMask2;
747     UINT32                  UncorrectableSeverity2;
748     UINT32                  AdvancedCapabilities2;
749 
750 } ACPI_HEST_AER_BRIDGE;
751 
752 
753 /* 9: Generic Hardware Error Source */
754 
755 typedef struct acpi_hest_generic
756 {
757     ACPI_HEST_HEADER        Header;
758     UINT16                  RelatedSourceId;
759     UINT8                   Reserved;
760     UINT8                   Enabled;
761     UINT32                  RecordsToPreallocate;
762     UINT32                  MaxSectionsPerRecord;
763     UINT32                  MaxRawDataLength;
764     ACPI_GENERIC_ADDRESS    ErrorStatusAddress;
765     ACPI_HEST_NOTIFY        Notify;
766     UINT32                  ErrorBlockLength;
767 
768 } ACPI_HEST_GENERIC;
769 
770 
771 /* Generic Error Status block */
772 
773 typedef struct acpi_hest_generic_status
774 {
775     UINT32                  BlockStatus;
776     UINT32                  RawDataOffset;
777     UINT32                  RawDataLength;
778     UINT32                  DataLength;
779     UINT32                  ErrorSeverity;
780 
781 } ACPI_HEST_GENERIC_STATUS;
782 
783 /* Values for BlockStatus flags above */
784 
785 #define ACPI_HEST_UNCORRECTABLE             (1)
786 #define ACPI_HEST_CORRECTABLE               (1<<1)
787 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE    (1<<2)
788 #define ACPI_HEST_MULTIPLE_CORRECTABLE      (1<<3)
789 #define ACPI_HEST_ERROR_ENTRY_COUNT         (0xFF<<4) /* 8 bits, error count */
790 
791 
792 /* Generic Error Data entry */
793 
794 typedef struct acpi_hest_generic_data
795 {
796     UINT8                   SectionType[16];
797     UINT32                  ErrorSeverity;
798     UINT16                  Revision;
799     UINT8                   ValidationBits;
800     UINT8                   Flags;
801     UINT32                  ErrorDataLength;
802     UINT8                   FruId[16];
803     UINT8                   FruText[20];
804 
805 } ACPI_HEST_GENERIC_DATA;
806 
807 
808 /*******************************************************************************
809  *
810  * MADT - Multiple APIC Description Table
811  *        Version 3
812  *
813  ******************************************************************************/
814 
815 typedef struct acpi_table_madt
816 {
817     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
818     UINT32                  Address;            /* Physical address of local APIC */
819     UINT32                  Flags;
820 
821 } ACPI_TABLE_MADT;
822 
823 /* Masks for Flags field above */
824 
825 #define ACPI_MADT_PCAT_COMPAT       (1)         /* 00: System also has dual 8259s */
826 
827 /* Values for PCATCompat flag */
828 
829 #define ACPI_MADT_DUAL_PIC          0
830 #define ACPI_MADT_MULTIPLE_APIC     1
831 
832 
833 /* Values for MADT subtable type in ACPI_SUBTABLE_HEADER */
834 
835 enum AcpiMadtType
836 {
837     ACPI_MADT_TYPE_LOCAL_APIC               = 0,
838     ACPI_MADT_TYPE_IO_APIC                  = 1,
839     ACPI_MADT_TYPE_INTERRUPT_OVERRIDE       = 2,
840     ACPI_MADT_TYPE_NMI_SOURCE               = 3,
841     ACPI_MADT_TYPE_LOCAL_APIC_NMI           = 4,
842     ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE      = 5,
843     ACPI_MADT_TYPE_IO_SAPIC                 = 6,
844     ACPI_MADT_TYPE_LOCAL_SAPIC              = 7,
845     ACPI_MADT_TYPE_INTERRUPT_SOURCE         = 8,
846     ACPI_MADT_TYPE_LOCAL_X2APIC             = 9,
847     ACPI_MADT_TYPE_LOCAL_X2APIC_NMI         = 10,
848     ACPI_MADT_TYPE_GENERIC_INTERRUPT        = 11,
849     ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR      = 12,
850     ACPI_MADT_TYPE_GENERIC_MSI_FRAME        = 13,
851     ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR    = 14,
852     ACPI_MADT_TYPE_RESERVED                 = 15    /* 15 and greater are reserved */
853 };
854 
855 
856 /*
857  * MADT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
858  */
859 
860 /* 0: Processor Local APIC */
861 
862 typedef struct acpi_madt_local_apic
863 {
864     ACPI_SUBTABLE_HEADER    Header;
865     UINT8                   ProcessorId;        /* ACPI processor id */
866     UINT8                   Id;                 /* Processor's local APIC id */
867     UINT32                  LapicFlags;
868 
869 } ACPI_MADT_LOCAL_APIC;
870 
871 
872 /* 1: IO APIC */
873 
874 typedef struct acpi_madt_io_apic
875 {
876     ACPI_SUBTABLE_HEADER    Header;
877     UINT8                   Id;                 /* I/O APIC ID */
878     UINT8                   Reserved;           /* Reserved - must be zero */
879     UINT32                  Address;            /* APIC physical address */
880     UINT32                  GlobalIrqBase;      /* Global system interrupt where INTI lines start */
881 
882 } ACPI_MADT_IO_APIC;
883 
884 
885 /* 2: Interrupt Override */
886 
887 typedef struct acpi_madt_interrupt_override
888 {
889     ACPI_SUBTABLE_HEADER    Header;
890     UINT8                   Bus;                /* 0 - ISA */
891     UINT8                   SourceIrq;          /* Interrupt source (IRQ) */
892     UINT32                  GlobalIrq;          /* Global system interrupt */
893     UINT16                  IntiFlags;
894 
895 } ACPI_MADT_INTERRUPT_OVERRIDE;
896 
897 
898 /* 3: NMI Source */
899 
900 typedef struct acpi_madt_nmi_source
901 {
902     ACPI_SUBTABLE_HEADER    Header;
903     UINT16                  IntiFlags;
904     UINT32                  GlobalIrq;          /* Global system interrupt */
905 
906 } ACPI_MADT_NMI_SOURCE;
907 
908 
909 /* 4: Local APIC NMI */
910 
911 typedef struct acpi_madt_local_apic_nmi
912 {
913     ACPI_SUBTABLE_HEADER    Header;
914     UINT8                   ProcessorId;        /* ACPI processor id */
915     UINT16                  IntiFlags;
916     UINT8                   Lint;               /* LINTn to which NMI is connected */
917 
918 } ACPI_MADT_LOCAL_APIC_NMI;
919 
920 
921 /* 5: Address Override */
922 
923 typedef struct acpi_madt_local_apic_override
924 {
925     ACPI_SUBTABLE_HEADER    Header;
926     UINT16                  Reserved;           /* Reserved, must be zero */
927     UINT64                  Address;            /* APIC physical address */
928 
929 } ACPI_MADT_LOCAL_APIC_OVERRIDE;
930 
931 
932 /* 6: I/O Sapic */
933 
934 typedef struct acpi_madt_io_sapic
935 {
936     ACPI_SUBTABLE_HEADER    Header;
937     UINT8                   Id;                 /* I/O SAPIC ID */
938     UINT8                   Reserved;           /* Reserved, must be zero */
939     UINT32                  GlobalIrqBase;      /* Global interrupt for SAPIC start */
940     UINT64                  Address;            /* SAPIC physical address */
941 
942 } ACPI_MADT_IO_SAPIC;
943 
944 
945 /* 7: Local Sapic */
946 
947 typedef struct acpi_madt_local_sapic
948 {
949     ACPI_SUBTABLE_HEADER    Header;
950     UINT8                   ProcessorId;        /* ACPI processor id */
951     UINT8                   Id;                 /* SAPIC ID */
952     UINT8                   Eid;                /* SAPIC EID */
953     UINT8                   Reserved[3];        /* Reserved, must be zero */
954     UINT32                  LapicFlags;
955     UINT32                  Uid;                /* Numeric UID - ACPI 3.0 */
956     char                    UidString[1];       /* String UID  - ACPI 3.0 */
957 
958 } ACPI_MADT_LOCAL_SAPIC;
959 
960 
961 /* 8: Platform Interrupt Source */
962 
963 typedef struct acpi_madt_interrupt_source
964 {
965     ACPI_SUBTABLE_HEADER    Header;
966     UINT16                  IntiFlags;
967     UINT8                   Type;               /* 1=PMI, 2=INIT, 3=corrected */
968     UINT8                   Id;                 /* Processor ID */
969     UINT8                   Eid;                /* Processor EID */
970     UINT8                   IoSapicVector;      /* Vector value for PMI interrupts */
971     UINT32                  GlobalIrq;          /* Global system interrupt */
972     UINT32                  Flags;              /* Interrupt Source Flags */
973 
974 } ACPI_MADT_INTERRUPT_SOURCE;
975 
976 /* Masks for Flags field above */
977 
978 #define ACPI_MADT_CPEI_OVERRIDE     (1)
979 
980 
981 /* 9: Processor Local X2APIC (ACPI 4.0) */
982 
983 typedef struct acpi_madt_local_x2apic
984 {
985     ACPI_SUBTABLE_HEADER    Header;
986     UINT16                  Reserved;           /* Reserved - must be zero */
987     UINT32                  LocalApicId;        /* Processor x2APIC ID  */
988     UINT32                  LapicFlags;
989     UINT32                  Uid;                /* ACPI processor UID */
990 
991 } ACPI_MADT_LOCAL_X2APIC;
992 
993 
994 /* 10: Local X2APIC NMI (ACPI 4.0) */
995 
996 typedef struct acpi_madt_local_x2apic_nmi
997 {
998     ACPI_SUBTABLE_HEADER    Header;
999     UINT16                  IntiFlags;
1000     UINT32                  Uid;                /* ACPI processor UID */
1001     UINT8                   Lint;               /* LINTn to which NMI is connected */
1002     UINT8                   Reserved[3];        /* Reserved - must be zero */
1003 
1004 } ACPI_MADT_LOCAL_X2APIC_NMI;
1005 
1006 
1007 /* 11: Generic Interrupt (ACPI 5.0) */
1008 
1009 typedef struct acpi_madt_generic_interrupt
1010 {
1011     ACPI_SUBTABLE_HEADER    Header;
1012     UINT16                  Reserved;           /* Reserved - must be zero */
1013     UINT32                  CpuInterfaceNumber;
1014     UINT32                  Uid;
1015     UINT32                  Flags;
1016     UINT32                  ParkingVersion;
1017     UINT32                  PerformanceInterrupt;
1018     UINT64                  ParkedAddress;
1019     UINT64                  BaseAddress;
1020     UINT64                  GicvBaseAddress;
1021     UINT64                  GichBaseAddress;
1022     UINT32                  VgicInterrupt;
1023     UINT64                  GicrBaseAddress;
1024     UINT64                  ArmMpidr;
1025 
1026 } ACPI_MADT_GENERIC_INTERRUPT;
1027 
1028 /* Masks for Flags field above */
1029 
1030 /* ACPI_MADT_ENABLED                    (1)      Processor is usable if set */
1031 #define ACPI_MADT_PERFORMANCE_IRQ_MODE  (1<<1)  /* 01: Performance Interrupt Mode */
1032 #define ACPI_MADT_VGIC_IRQ_MODE         (1<<2)  /* 02: VGIC Maintenance Interrupt mode */
1033 
1034 
1035 /* 12: Generic Distributor (ACPI 5.0) */
1036 
1037 typedef struct acpi_madt_generic_distributor
1038 {
1039     ACPI_SUBTABLE_HEADER    Header;
1040     UINT16                  Reserved;           /* Reserved - must be zero */
1041     UINT32                  GicId;
1042     UINT64                  BaseAddress;
1043     UINT32                  GlobalIrqBase;
1044     UINT32                  Reserved2;          /* Reserved - must be zero */
1045 
1046 } ACPI_MADT_GENERIC_DISTRIBUTOR;
1047 
1048 
1049 /* 13: Generic MSI Frame (ACPI 5.1) */
1050 
1051 typedef struct acpi_madt_generic_msi_frame
1052 {
1053     ACPI_SUBTABLE_HEADER    Header;
1054     UINT16                  Reserved;           /* Reserved - must be zero */
1055     UINT32                  MsiFrameId;
1056     UINT64                  BaseAddress;
1057     UINT32                  Flags;
1058     UINT16                  SpiCount;
1059     UINT16                  SpiBase;
1060 
1061 } ACPI_MADT_GENERIC_MSI_FRAME;
1062 
1063 /* Masks for Flags field above */
1064 
1065 #define ACPI_MADT_OVERRIDE_SPI_VALUES   (1)
1066 
1067 
1068 /* 14: Generic Redistributor (ACPI 5.1) */
1069 
1070 typedef struct acpi_madt_generic_redistributor
1071 {
1072     ACPI_SUBTABLE_HEADER    Header;
1073     UINT16                  Reserved;           /* reserved - must be zero */
1074     UINT64                  BaseAddress;
1075     UINT32                  Length;
1076 
1077 } ACPI_MADT_GENERIC_REDISTRIBUTOR;
1078 
1079 
1080 /*
1081  * Common flags fields for MADT subtables
1082  */
1083 
1084 /* MADT Local APIC flags */
1085 
1086 #define ACPI_MADT_ENABLED           (1)         /* 00: Processor is usable if set */
1087 
1088 /* MADT MPS INTI flags (IntiFlags) */
1089 
1090 #define ACPI_MADT_POLARITY_MASK     (3)         /* 00-01: Polarity of APIC I/O input signals */
1091 #define ACPI_MADT_TRIGGER_MASK      (3<<2)      /* 02-03: Trigger mode of APIC input signals */
1092 
1093 /* Values for MPS INTI flags */
1094 
1095 #define ACPI_MADT_POLARITY_CONFORMS       0
1096 #define ACPI_MADT_POLARITY_ACTIVE_HIGH    1
1097 #define ACPI_MADT_POLARITY_RESERVED       2
1098 #define ACPI_MADT_POLARITY_ACTIVE_LOW     3
1099 
1100 #define ACPI_MADT_TRIGGER_CONFORMS        (0)
1101 #define ACPI_MADT_TRIGGER_EDGE            (1<<2)
1102 #define ACPI_MADT_TRIGGER_RESERVED        (2<<2)
1103 #define ACPI_MADT_TRIGGER_LEVEL           (3<<2)
1104 
1105 
1106 /*******************************************************************************
1107  *
1108  * MSCT - Maximum System Characteristics Table (ACPI 4.0)
1109  *        Version 1
1110  *
1111  ******************************************************************************/
1112 
1113 typedef struct acpi_table_msct
1114 {
1115     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1116     UINT32                  ProximityOffset;    /* Location of proximity info struct(s) */
1117     UINT32                  MaxProximityDomains;/* Max number of proximity domains */
1118     UINT32                  MaxClockDomains;    /* Max number of clock domains */
1119     UINT64                  MaxAddress;         /* Max physical address in system */
1120 
1121 } ACPI_TABLE_MSCT;
1122 
1123 
1124 /* Subtable - Maximum Proximity Domain Information. Version 1 */
1125 
1126 typedef struct acpi_msct_proximity
1127 {
1128     UINT8                   Revision;
1129     UINT8                   Length;
1130     UINT32                  RangeStart;         /* Start of domain range */
1131     UINT32                  RangeEnd;           /* End of domain range */
1132     UINT32                  ProcessorCapacity;
1133     UINT64                  MemoryCapacity;     /* In bytes */
1134 
1135 } ACPI_MSCT_PROXIMITY;
1136 
1137 
1138 /*******************************************************************************
1139  *
1140  * SBST - Smart Battery Specification Table
1141  *        Version 1
1142  *
1143  ******************************************************************************/
1144 
1145 typedef struct acpi_table_sbst
1146 {
1147     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1148     UINT32                  WarningLevel;
1149     UINT32                  LowLevel;
1150     UINT32                  CriticalLevel;
1151 
1152 } ACPI_TABLE_SBST;
1153 
1154 
1155 /*******************************************************************************
1156  *
1157  * SLIT - System Locality Distance Information Table
1158  *        Version 1
1159  *
1160  ******************************************************************************/
1161 
1162 typedef struct acpi_table_slit
1163 {
1164     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1165     UINT64                  LocalityCount;
1166     UINT8                   Entry[1];           /* Real size = localities^2 */
1167 
1168 } ACPI_TABLE_SLIT;
1169 
1170 
1171 /*******************************************************************************
1172  *
1173  * SRAT - System Resource Affinity Table
1174  *        Version 3
1175  *
1176  ******************************************************************************/
1177 
1178 typedef struct acpi_table_srat
1179 {
1180     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1181     UINT32                  TableRevision;      /* Must be value '1' */
1182     UINT64                  Reserved;           /* Reserved, must be zero */
1183 
1184 } ACPI_TABLE_SRAT;
1185 
1186 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
1187 
1188 enum AcpiSratType
1189 {
1190     ACPI_SRAT_TYPE_CPU_AFFINITY         = 0,
1191     ACPI_SRAT_TYPE_MEMORY_AFFINITY      = 1,
1192     ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY  = 2,
1193     ACPI_SRAT_TYPE_RESERVED             = 3     /* 3 and greater are reserved */
1194 };
1195 
1196 /*
1197  * SRAT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
1198  */
1199 
1200 /* 0: Processor Local APIC/SAPIC Affinity */
1201 
1202 typedef struct acpi_srat_cpu_affinity
1203 {
1204     ACPI_SUBTABLE_HEADER    Header;
1205     UINT8                   ProximityDomainLo;
1206     UINT8                   ApicId;
1207     UINT32                  Flags;
1208     UINT8                   LocalSapicEid;
1209     UINT8                   ProximityDomainHi[3];
1210     UINT32                  Reserved;           /* Reserved, must be zero */
1211 
1212 } ACPI_SRAT_CPU_AFFINITY;
1213 
1214 /* Flags */
1215 
1216 #define ACPI_SRAT_CPU_USE_AFFINITY  (1)         /* 00: Use affinity structure */
1217 
1218 
1219 /* 1: Memory Affinity */
1220 
1221 typedef struct acpi_srat_mem_affinity
1222 {
1223     ACPI_SUBTABLE_HEADER    Header;
1224     UINT32                  ProximityDomain;
1225     UINT16                  Reserved;           /* Reserved, must be zero */
1226     UINT64                  BaseAddress;
1227     UINT64                  Length;
1228     UINT32                  Reserved1;
1229     UINT32                  Flags;
1230     UINT64                  Reserved2;          /* Reserved, must be zero */
1231 
1232 } ACPI_SRAT_MEM_AFFINITY;
1233 
1234 /* Flags */
1235 
1236 #define ACPI_SRAT_MEM_ENABLED       (1)         /* 00: Use affinity structure */
1237 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1)      /* 01: Memory region is hot pluggable */
1238 #define ACPI_SRAT_MEM_NON_VOLATILE  (1<<2)      /* 02: Memory region is non-volatile */
1239 
1240 
1241 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
1242 
1243 typedef struct acpi_srat_x2apic_cpu_affinity
1244 {
1245     ACPI_SUBTABLE_HEADER    Header;
1246     UINT16                  Reserved;           /* Reserved, must be zero */
1247     UINT32                  ProximityDomain;
1248     UINT32                  ApicId;
1249     UINT32                  Flags;
1250     UINT32                  ClockDomain;
1251     UINT32                  Reserved2;
1252 
1253 } ACPI_SRAT_X2APIC_CPU_AFFINITY;
1254 
1255 /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
1256 
1257 #define ACPI_SRAT_CPU_ENABLED       (1)         /* 00: Use affinity structure */
1258 
1259 
1260 /* Reset to default packing */
1261 
1262 #pragma pack()
1263 
1264 #endif /* __ACTBL1_H__ */
1265