[ACPICA] Update to version 20171215. CORE-15222
[reactos.git] / drivers / bus / acpi / acpica / include / actbl1.h
1 /******************************************************************************
2 *
3 * Name: actbl1.h - Additional ACPI table definitions
4 *
5 *****************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2017, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44 #ifndef __ACTBL1_H__
45 #define __ACTBL1_H__
46
47
48 /*******************************************************************************
49 *
50 * Additional ACPI Tables (1)
51 *
52 * These tables are not consumed directly by the ACPICA subsystem, but are
53 * included here to support device drivers and the AML disassembler.
54 *
55 * The tables in this file are fully defined within the ACPI specification.
56 *
57 ******************************************************************************/
58
59
60 /*
61 * Values for description table header signatures for tables defined in this
62 * file. Useful because they make it more difficult to inadvertently type in
63 * the wrong signature.
64 */
65 #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
66 #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
67 #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
68 #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
69 #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
70 #define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */
71 #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
72 #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
73 #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */
74 #define ACPI_SIG_PDTT "PDTT" /* Platform Debug Trigger Table */
75 #define ACPI_SIG_PPTT "PPTT" /* Processor Properties Topology Table */
76 #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
77 #define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */
78 #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
79 #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
80 #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
81
82
83 /*
84 * All tables must be byte-packed to match the ACPI specification, since
85 * the tables are provided by the system BIOS.
86 */
87 #pragma pack(1)
88
89 /*
90 * Note: C bitfields are not used for this reason:
91 *
92 * "Bitfields are great and easy to read, but unfortunately the C language
93 * does not specify the layout of bitfields in memory, which means they are
94 * essentially useless for dealing with packed data in on-disk formats or
95 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
96 * this decision was a design error in C. Ritchie could have picked an order
97 * and stuck with it." Norman Ramsey.
98 * See http://stackoverflow.com/a/1053662/41661
99 */
100
101
102 /*******************************************************************************
103 *
104 * Common subtable headers
105 *
106 ******************************************************************************/
107
108 /* Generic subtable header (used in MADT, SRAT, etc.) */
109
110 typedef struct acpi_subtable_header
111 {
112 UINT8 Type;
113 UINT8 Length;
114
115 } ACPI_SUBTABLE_HEADER;
116
117
118 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
119
120 typedef struct acpi_whea_header
121 {
122 UINT8 Action;
123 UINT8 Instruction;
124 UINT8 Flags;
125 UINT8 Reserved;
126 ACPI_GENERIC_ADDRESS RegisterRegion;
127 UINT64 Value; /* Value used with Read/Write register */
128 UINT64 Mask; /* Bitmask required for this register instruction */
129
130 } ACPI_WHEA_HEADER;
131
132
133 /*******************************************************************************
134 *
135 * BERT - Boot Error Record Table (ACPI 4.0)
136 * Version 1
137 *
138 ******************************************************************************/
139
140 typedef struct acpi_table_bert
141 {
142 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
143 UINT32 RegionLength; /* Length of the boot error region */
144 UINT64 Address; /* Physical address of the error region */
145
146 } ACPI_TABLE_BERT;
147
148
149 /* Boot Error Region (not a subtable, pointed to by Address field above) */
150
151 typedef struct acpi_bert_region
152 {
153 UINT32 BlockStatus; /* Type of error information */
154 UINT32 RawDataOffset; /* Offset to raw error data */
155 UINT32 RawDataLength; /* Length of raw error data */
156 UINT32 DataLength; /* Length of generic error data */
157 UINT32 ErrorSeverity; /* Severity code */
158
159 } ACPI_BERT_REGION;
160
161 /* Values for BlockStatus flags above */
162
163 #define ACPI_BERT_UNCORRECTABLE (1)
164 #define ACPI_BERT_CORRECTABLE (1<<1)
165 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
166 #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
167 #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
168
169 /* Values for ErrorSeverity above */
170
171 enum AcpiBertErrorSeverity
172 {
173 ACPI_BERT_ERROR_CORRECTABLE = 0,
174 ACPI_BERT_ERROR_FATAL = 1,
175 ACPI_BERT_ERROR_CORRECTED = 2,
176 ACPI_BERT_ERROR_NONE = 3,
177 ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */
178 };
179
180 /*
181 * Note: The generic error data that follows the ErrorSeverity field above
182 * uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below
183 */
184
185
186 /*******************************************************************************
187 *
188 * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
189 * Version 1
190 *
191 ******************************************************************************/
192
193 typedef struct acpi_table_cpep
194 {
195 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
196 UINT64 Reserved;
197
198 } ACPI_TABLE_CPEP;
199
200
201 /* Subtable */
202
203 typedef struct acpi_cpep_polling
204 {
205 ACPI_SUBTABLE_HEADER Header;
206 UINT8 Id; /* Processor ID */
207 UINT8 Eid; /* Processor EID */
208 UINT32 Interval; /* Polling interval (msec) */
209
210 } ACPI_CPEP_POLLING;
211
212
213 /*******************************************************************************
214 *
215 * ECDT - Embedded Controller Boot Resources Table
216 * Version 1
217 *
218 ******************************************************************************/
219
220 typedef struct acpi_table_ecdt
221 {
222 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
223 ACPI_GENERIC_ADDRESS Control; /* Address of EC command/status register */
224 ACPI_GENERIC_ADDRESS Data; /* Address of EC data register */
225 UINT32 Uid; /* Unique ID - must be same as the EC _UID method */
226 UINT8 Gpe; /* The GPE for the EC */
227 UINT8 Id[1]; /* Full namepath of the EC in the ACPI namespace */
228
229 } ACPI_TABLE_ECDT;
230
231
232 /*******************************************************************************
233 *
234 * EINJ - Error Injection Table (ACPI 4.0)
235 * Version 1
236 *
237 ******************************************************************************/
238
239 typedef struct acpi_table_einj
240 {
241 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
242 UINT32 HeaderLength;
243 UINT8 Flags;
244 UINT8 Reserved[3];
245 UINT32 Entries;
246
247 } ACPI_TABLE_EINJ;
248
249
250 /* EINJ Injection Instruction Entries (actions) */
251
252 typedef struct acpi_einj_entry
253 {
254 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
255
256 } ACPI_EINJ_ENTRY;
257
258 /* Masks for Flags field above */
259
260 #define ACPI_EINJ_PRESERVE (1)
261
262 /* Values for Action field above */
263
264 enum AcpiEinjActions
265 {
266 ACPI_EINJ_BEGIN_OPERATION = 0,
267 ACPI_EINJ_GET_TRIGGER_TABLE = 1,
268 ACPI_EINJ_SET_ERROR_TYPE = 2,
269 ACPI_EINJ_GET_ERROR_TYPE = 3,
270 ACPI_EINJ_END_OPERATION = 4,
271 ACPI_EINJ_EXECUTE_OPERATION = 5,
272 ACPI_EINJ_CHECK_BUSY_STATUS = 6,
273 ACPI_EINJ_GET_COMMAND_STATUS = 7,
274 ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
275 ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
276 ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */
277 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
278 };
279
280 /* Values for Instruction field above */
281
282 enum AcpiEinjInstructions
283 {
284 ACPI_EINJ_READ_REGISTER = 0,
285 ACPI_EINJ_READ_REGISTER_VALUE = 1,
286 ACPI_EINJ_WRITE_REGISTER = 2,
287 ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
288 ACPI_EINJ_NOOP = 4,
289 ACPI_EINJ_FLUSH_CACHELINE = 5,
290 ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */
291 };
292
293 typedef struct acpi_einj_error_type_with_addr
294 {
295 UINT32 ErrorType;
296 UINT32 VendorStructOffset;
297 UINT32 Flags;
298 UINT32 ApicId;
299 UINT64 Address;
300 UINT64 Range;
301 UINT32 PcieId;
302
303 } ACPI_EINJ_ERROR_TYPE_WITH_ADDR;
304
305 typedef struct acpi_einj_vendor
306 {
307 UINT32 Length;
308 UINT32 PcieId;
309 UINT16 VendorId;
310 UINT16 DeviceId;
311 UINT8 RevisionId;
312 UINT8 Reserved[3];
313
314 } ACPI_EINJ_VENDOR;
315
316
317 /* EINJ Trigger Error Action Table */
318
319 typedef struct acpi_einj_trigger
320 {
321 UINT32 HeaderSize;
322 UINT32 Revision;
323 UINT32 TableSize;
324 UINT32 EntryCount;
325
326 } ACPI_EINJ_TRIGGER;
327
328 /* Command status return values */
329
330 enum AcpiEinjCommandStatus
331 {
332 ACPI_EINJ_SUCCESS = 0,
333 ACPI_EINJ_FAILURE = 1,
334 ACPI_EINJ_INVALID_ACCESS = 2,
335 ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */
336 };
337
338
339 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
340
341 #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
342 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
343 #define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
344 #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
345 #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
346 #define ACPI_EINJ_MEMORY_FATAL (1<<5)
347 #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
348 #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
349 #define ACPI_EINJ_PCIX_FATAL (1<<8)
350 #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
351 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
352 #define ACPI_EINJ_PLATFORM_FATAL (1<<11)
353 #define ACPI_EINJ_VENDOR_DEFINED (1<<31)
354
355
356 /*******************************************************************************
357 *
358 * ERST - Error Record Serialization Table (ACPI 4.0)
359 * Version 1
360 *
361 ******************************************************************************/
362
363 typedef struct acpi_table_erst
364 {
365 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
366 UINT32 HeaderLength;
367 UINT32 Reserved;
368 UINT32 Entries;
369
370 } ACPI_TABLE_ERST;
371
372
373 /* ERST Serialization Entries (actions) */
374
375 typedef struct acpi_erst_entry
376 {
377 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
378
379 } ACPI_ERST_ENTRY;
380
381 /* Masks for Flags field above */
382
383 #define ACPI_ERST_PRESERVE (1)
384
385 /* Values for Action field above */
386
387 enum AcpiErstActions
388 {
389 ACPI_ERST_BEGIN_WRITE = 0,
390 ACPI_ERST_BEGIN_READ = 1,
391 ACPI_ERST_BEGIN_CLEAR = 2,
392 ACPI_ERST_END = 3,
393 ACPI_ERST_SET_RECORD_OFFSET = 4,
394 ACPI_ERST_EXECUTE_OPERATION = 5,
395 ACPI_ERST_CHECK_BUSY_STATUS = 6,
396 ACPI_ERST_GET_COMMAND_STATUS = 7,
397 ACPI_ERST_GET_RECORD_ID = 8,
398 ACPI_ERST_SET_RECORD_ID = 9,
399 ACPI_ERST_GET_RECORD_COUNT = 10,
400 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
401 ACPI_ERST_NOT_USED = 12,
402 ACPI_ERST_GET_ERROR_RANGE = 13,
403 ACPI_ERST_GET_ERROR_LENGTH = 14,
404 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
405 ACPI_ERST_EXECUTE_TIMINGS = 16,
406 ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */
407 };
408
409 /* Values for Instruction field above */
410
411 enum AcpiErstInstructions
412 {
413 ACPI_ERST_READ_REGISTER = 0,
414 ACPI_ERST_READ_REGISTER_VALUE = 1,
415 ACPI_ERST_WRITE_REGISTER = 2,
416 ACPI_ERST_WRITE_REGISTER_VALUE = 3,
417 ACPI_ERST_NOOP = 4,
418 ACPI_ERST_LOAD_VAR1 = 5,
419 ACPI_ERST_LOAD_VAR2 = 6,
420 ACPI_ERST_STORE_VAR1 = 7,
421 ACPI_ERST_ADD = 8,
422 ACPI_ERST_SUBTRACT = 9,
423 ACPI_ERST_ADD_VALUE = 10,
424 ACPI_ERST_SUBTRACT_VALUE = 11,
425 ACPI_ERST_STALL = 12,
426 ACPI_ERST_STALL_WHILE_TRUE = 13,
427 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
428 ACPI_ERST_GOTO = 15,
429 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
430 ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
431 ACPI_ERST_MOVE_DATA = 18,
432 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
433 };
434
435 /* Command status return values */
436
437 enum AcpiErstCommandStatus
438 {
439 ACPI_ERST_SUCESS = 0,
440 ACPI_ERST_NO_SPACE = 1,
441 ACPI_ERST_NOT_AVAILABLE = 2,
442 ACPI_ERST_FAILURE = 3,
443 ACPI_ERST_RECORD_EMPTY = 4,
444 ACPI_ERST_NOT_FOUND = 5,
445 ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */
446 };
447
448
449 /* Error Record Serialization Information */
450
451 typedef struct acpi_erst_info
452 {
453 UINT16 Signature; /* Should be "ER" */
454 UINT8 Data[48];
455
456 } ACPI_ERST_INFO;
457
458
459 /*******************************************************************************
460 *
461 * HEST - Hardware Error Source Table (ACPI 4.0)
462 * Version 1
463 *
464 ******************************************************************************/
465
466 typedef struct acpi_table_hest
467 {
468 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
469 UINT32 ErrorSourceCount;
470
471 } ACPI_TABLE_HEST;
472
473
474 /* HEST subtable header */
475
476 typedef struct acpi_hest_header
477 {
478 UINT16 Type;
479 UINT16 SourceId;
480
481 } ACPI_HEST_HEADER;
482
483
484 /* Values for Type field above for subtables */
485
486 enum AcpiHestTypes
487 {
488 ACPI_HEST_TYPE_IA32_CHECK = 0,
489 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
490 ACPI_HEST_TYPE_IA32_NMI = 2,
491 ACPI_HEST_TYPE_NOT_USED3 = 3,
492 ACPI_HEST_TYPE_NOT_USED4 = 4,
493 ACPI_HEST_TYPE_NOT_USED5 = 5,
494 ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
495 ACPI_HEST_TYPE_AER_ENDPOINT = 7,
496 ACPI_HEST_TYPE_AER_BRIDGE = 8,
497 ACPI_HEST_TYPE_GENERIC_ERROR = 9,
498 ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
499 ACPI_HEST_TYPE_IA32_DEFERRED_CHECK = 11,
500 ACPI_HEST_TYPE_RESERVED = 12 /* 12 and greater are reserved */
501 };
502
503
504 /*
505 * HEST substructures contained in subtables
506 */
507
508 /*
509 * IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and
510 * ACPI_HEST_IA_CORRECTED structures.
511 */
512 typedef struct acpi_hest_ia_error_bank
513 {
514 UINT8 BankNumber;
515 UINT8 ClearStatusOnInit;
516 UINT8 StatusFormat;
517 UINT8 Reserved;
518 UINT32 ControlRegister;
519 UINT64 ControlData;
520 UINT32 StatusRegister;
521 UINT32 AddressRegister;
522 UINT32 MiscRegister;
523
524 } ACPI_HEST_IA_ERROR_BANK;
525
526
527 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
528
529 typedef struct acpi_hest_aer_common
530 {
531 UINT16 Reserved1;
532 UINT8 Flags;
533 UINT8 Enabled;
534 UINT32 RecordsToPreallocate;
535 UINT32 MaxSectionsPerRecord;
536 UINT32 Bus; /* Bus and Segment numbers */
537 UINT16 Device;
538 UINT16 Function;
539 UINT16 DeviceControl;
540 UINT16 Reserved2;
541 UINT32 UncorrectableMask;
542 UINT32 UncorrectableSeverity;
543 UINT32 CorrectableMask;
544 UINT32 AdvancedCapabilities;
545
546 } ACPI_HEST_AER_COMMON;
547
548 /* Masks for HEST Flags fields */
549
550 #define ACPI_HEST_FIRMWARE_FIRST (1)
551 #define ACPI_HEST_GLOBAL (1<<1)
552 #define ACPI_HEST_GHES_ASSIST (1<<2)
553
554 /*
555 * Macros to access the bus/segment numbers in Bus field above:
556 * Bus number is encoded in bits 7:0
557 * Segment number is encoded in bits 23:8
558 */
559 #define ACPI_HEST_BUS(Bus) ((Bus) & 0xFF)
560 #define ACPI_HEST_SEGMENT(Bus) (((Bus) >> 8) & 0xFFFF)
561
562
563 /* Hardware Error Notification */
564
565 typedef struct acpi_hest_notify
566 {
567 UINT8 Type;
568 UINT8 Length;
569 UINT16 ConfigWriteEnable;
570 UINT32 PollInterval;
571 UINT32 Vector;
572 UINT32 PollingThresholdValue;
573 UINT32 PollingThresholdWindow;
574 UINT32 ErrorThresholdValue;
575 UINT32 ErrorThresholdWindow;
576
577 } ACPI_HEST_NOTIFY;
578
579 /* Values for Notify Type field above */
580
581 enum AcpiHestNotifyTypes
582 {
583 ACPI_HEST_NOTIFY_POLLED = 0,
584 ACPI_HEST_NOTIFY_EXTERNAL = 1,
585 ACPI_HEST_NOTIFY_LOCAL = 2,
586 ACPI_HEST_NOTIFY_SCI = 3,
587 ACPI_HEST_NOTIFY_NMI = 4,
588 ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */
589 ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */
590 ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */
591 ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */
592 ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */
593 ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */
594 ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11, /* ACPI 6.2 */
595 ACPI_HEST_NOTIFY_RESERVED = 12 /* 12 and greater are reserved */
596 };
597
598 /* Values for ConfigWriteEnable bitfield above */
599
600 #define ACPI_HEST_TYPE (1)
601 #define ACPI_HEST_POLL_INTERVAL (1<<1)
602 #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
603 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
604 #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
605 #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
606
607
608 /*
609 * HEST subtables
610 */
611
612 /* 0: IA32 Machine Check Exception */
613
614 typedef struct acpi_hest_ia_machine_check
615 {
616 ACPI_HEST_HEADER Header;
617 UINT16 Reserved1;
618 UINT8 Flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
619 UINT8 Enabled;
620 UINT32 RecordsToPreallocate;
621 UINT32 MaxSectionsPerRecord;
622 UINT64 GlobalCapabilityData;
623 UINT64 GlobalControlData;
624 UINT8 NumHardwareBanks;
625 UINT8 Reserved3[7];
626
627 } ACPI_HEST_IA_MACHINE_CHECK;
628
629
630 /* 1: IA32 Corrected Machine Check */
631
632 typedef struct acpi_hest_ia_corrected
633 {
634 ACPI_HEST_HEADER Header;
635 UINT16 Reserved1;
636 UINT8 Flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
637 UINT8 Enabled;
638 UINT32 RecordsToPreallocate;
639 UINT32 MaxSectionsPerRecord;
640 ACPI_HEST_NOTIFY Notify;
641 UINT8 NumHardwareBanks;
642 UINT8 Reserved2[3];
643
644 } ACPI_HEST_IA_CORRECTED;
645
646
647 /* 2: IA32 Non-Maskable Interrupt */
648
649 typedef struct acpi_hest_ia_nmi
650 {
651 ACPI_HEST_HEADER Header;
652 UINT32 Reserved;
653 UINT32 RecordsToPreallocate;
654 UINT32 MaxSectionsPerRecord;
655 UINT32 MaxRawDataLength;
656
657 } ACPI_HEST_IA_NMI;
658
659
660 /* 3,4,5: Not used */
661
662 /* 6: PCI Express Root Port AER */
663
664 typedef struct acpi_hest_aer_root
665 {
666 ACPI_HEST_HEADER Header;
667 ACPI_HEST_AER_COMMON Aer;
668 UINT32 RootErrorCommand;
669
670 } ACPI_HEST_AER_ROOT;
671
672
673 /* 7: PCI Express AER (AER Endpoint) */
674
675 typedef struct acpi_hest_aer
676 {
677 ACPI_HEST_HEADER Header;
678 ACPI_HEST_AER_COMMON Aer;
679
680 } ACPI_HEST_AER;
681
682
683 /* 8: PCI Express/PCI-X Bridge AER */
684
685 typedef struct acpi_hest_aer_bridge
686 {
687 ACPI_HEST_HEADER Header;
688 ACPI_HEST_AER_COMMON Aer;
689 UINT32 UncorrectableMask2;
690 UINT32 UncorrectableSeverity2;
691 UINT32 AdvancedCapabilities2;
692
693 } ACPI_HEST_AER_BRIDGE;
694
695
696 /* 9: Generic Hardware Error Source */
697
698 typedef struct acpi_hest_generic
699 {
700 ACPI_HEST_HEADER Header;
701 UINT16 RelatedSourceId;
702 UINT8 Reserved;
703 UINT8 Enabled;
704 UINT32 RecordsToPreallocate;
705 UINT32 MaxSectionsPerRecord;
706 UINT32 MaxRawDataLength;
707 ACPI_GENERIC_ADDRESS ErrorStatusAddress;
708 ACPI_HEST_NOTIFY Notify;
709 UINT32 ErrorBlockLength;
710
711 } ACPI_HEST_GENERIC;
712
713
714 /* 10: Generic Hardware Error Source, version 2 */
715
716 typedef struct acpi_hest_generic_v2
717 {
718 ACPI_HEST_HEADER Header;
719 UINT16 RelatedSourceId;
720 UINT8 Reserved;
721 UINT8 Enabled;
722 UINT32 RecordsToPreallocate;
723 UINT32 MaxSectionsPerRecord;
724 UINT32 MaxRawDataLength;
725 ACPI_GENERIC_ADDRESS ErrorStatusAddress;
726 ACPI_HEST_NOTIFY Notify;
727 UINT32 ErrorBlockLength;
728 ACPI_GENERIC_ADDRESS ReadAckRegister;
729 UINT64 ReadAckPreserve;
730 UINT64 ReadAckWrite;
731
732 } ACPI_HEST_GENERIC_V2;
733
734
735 /* Generic Error Status block */
736
737 typedef struct acpi_hest_generic_status
738 {
739 UINT32 BlockStatus;
740 UINT32 RawDataOffset;
741 UINT32 RawDataLength;
742 UINT32 DataLength;
743 UINT32 ErrorSeverity;
744
745 } ACPI_HEST_GENERIC_STATUS;
746
747 /* Values for BlockStatus flags above */
748
749 #define ACPI_HEST_UNCORRECTABLE (1)
750 #define ACPI_HEST_CORRECTABLE (1<<1)
751 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
752 #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
753 #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
754
755
756 /* Generic Error Data entry */
757
758 typedef struct acpi_hest_generic_data
759 {
760 UINT8 SectionType[16];
761 UINT32 ErrorSeverity;
762 UINT16 Revision;
763 UINT8 ValidationBits;
764 UINT8 Flags;
765 UINT32 ErrorDataLength;
766 UINT8 FruId[16];
767 UINT8 FruText[20];
768
769 } ACPI_HEST_GENERIC_DATA;
770
771 /* Extension for revision 0x0300 */
772
773 typedef struct acpi_hest_generic_data_v300
774 {
775 UINT8 SectionType[16];
776 UINT32 ErrorSeverity;
777 UINT16 Revision;
778 UINT8 ValidationBits;
779 UINT8 Flags;
780 UINT32 ErrorDataLength;
781 UINT8 FruId[16];
782 UINT8 FruText[20];
783 UINT64 TimeStamp;
784
785 } ACPI_HEST_GENERIC_DATA_V300;
786
787 /* Values for ErrorSeverity above */
788
789 #define ACPI_HEST_GEN_ERROR_RECOVERABLE 0
790 #define ACPI_HEST_GEN_ERROR_FATAL 1
791 #define ACPI_HEST_GEN_ERROR_CORRECTED 2
792 #define ACPI_HEST_GEN_ERROR_NONE 3
793
794 /* Flags for ValidationBits above */
795
796 #define ACPI_HEST_GEN_VALID_FRU_ID (1)
797 #define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1)
798 #define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2)
799
800
801 /* 11: IA32 Deferred Machine Check Exception (ACPI 6.2) */
802
803 typedef struct acpi_hest_ia_deferred_check
804 {
805 ACPI_HEST_HEADER Header;
806 UINT16 Reserved1;
807 UINT8 Flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
808 UINT8 Enabled;
809 UINT32 RecordsToPreallocate;
810 UINT32 MaxSectionsPerRecord;
811 ACPI_HEST_NOTIFY Notify;
812 UINT8 NumHardwareBanks;
813 UINT8 Reserved2[3];
814
815 } ACPI_HEST_IA_DEFERRED_CHECK;
816
817
818 /*******************************************************************************
819 *
820 * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2)
821 * Version 1
822 *
823 ******************************************************************************/
824
825 typedef struct acpi_table_hmat
826 {
827 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
828 UINT32 Reserved;
829
830 } ACPI_TABLE_HMAT;
831
832
833 /* Values for HMAT structure types */
834
835 enum AcpiHmatType
836 {
837 ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subystem address range */
838 ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */
839 ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */
840 ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
841 };
842
843 typedef struct acpi_hmat_structure
844 {
845 UINT16 Type;
846 UINT16 Reserved;
847 UINT32 Length;
848
849 } ACPI_HMAT_STRUCTURE;
850
851
852 /*
853 * HMAT Structures, correspond to Type in ACPI_HMAT_STRUCTURE
854 */
855
856 /* 0: Memory subystem address range */
857
858 typedef struct acpi_hmat_address_range
859 {
860 ACPI_HMAT_STRUCTURE Header;
861 UINT16 Flags;
862 UINT16 Reserved1;
863 UINT32 ProcessorPD; /* Processor proximity domain */
864 UINT32 MemoryPD; /* Memory proximity domain */
865 UINT32 Reserved2;
866 UINT64 PhysicalAddressBase; /* Physical address range base */
867 UINT64 PhysicalAddressLength; /* Physical address range length */
868
869 } ACPI_HMAT_ADDRESS_RANGE;
870
871 /* Masks for Flags field above */
872
873 #define ACPI_HMAT_PROCESSOR_PD_VALID (1) /* 1: ProcessorPD field is valid */
874 #define ACPI_HMAT_MEMORY_PD_VALID (1<<1) /* 1: MemoryPD field is valid */
875 #define ACPI_HMAT_RESERVATION_HINT (1<<2) /* 1: Reservation hint */
876
877
878 /* 1: System locality latency and bandwidth information */
879
880 typedef struct acpi_hmat_locality
881 {
882 ACPI_HMAT_STRUCTURE Header;
883 UINT8 Flags;
884 UINT8 DataType;
885 UINT16 Reserved1;
886 UINT32 NumberOfInitiatorPDs;
887 UINT32 NumberOfTargetPDs;
888 UINT32 Reserved2;
889 UINT64 EntryBaseUnit;
890
891 } ACPI_HMAT_LOCALITY;
892
893 /* Masks for Flags field above */
894
895 #define ACPI_HMAT_MEMORY_HIERARCHY (0x0F)
896
897 /* Values for Memory Hierarchy flag */
898
899 #define ACPI_HMAT_MEMORY 0
900 #define ACPI_HMAT_LAST_LEVEL_CACHE 1
901 #define ACPI_HMAT_1ST_LEVEL_CACHE 2
902 #define ACPI_HMAT_2ND_LEVEL_CACHE 3
903 #define ACPI_HMAT_3RD_LEVEL_CACHE 4
904
905 /* Values for DataType field above */
906
907 #define ACPI_HMAT_ACCESS_LATENCY 0
908 #define ACPI_HMAT_READ_LATENCY 1
909 #define ACPI_HMAT_WRITE_LATENCY 2
910 #define ACPI_HMAT_ACCESS_BANDWIDTH 3
911 #define ACPI_HMAT_READ_BANDWIDTH 4
912 #define ACPI_HMAT_WRITE_BANDWIDTH 5
913
914
915 /* 2: Memory side cache information */
916
917 typedef struct acpi_hmat_cache
918 {
919 ACPI_HMAT_STRUCTURE Header;
920 UINT32 MemoryPD;
921 UINT32 Reserved1;
922 UINT64 CacheSize;
923 UINT32 CacheAttributes;
924 UINT16 Reserved2;
925 UINT16 NumberOfSMBIOSHandles;
926
927 } ACPI_HMAT_CACHE;
928
929 /* Masks for CacheAttributes field above */
930
931 #define ACPI_HMAT_TOTAL_CACHE_LEVEL (0x0000000F)
932 #define ACPI_HMAT_CACHE_LEVEL (0x000000F0)
933 #define ACPI_HMAT_CACHE_ASSOCIATIVITY (0x00000F00)
934 #define ACPI_HMAT_WRITE_POLICY (0x0000F000)
935 #define ACPI_HMAT_CACHE_LINE_SIZE (0xFFFF0000)
936
937 /* Values for cache associativity flag */
938
939 #define ACPI_HMAT_CA_NONE (0)
940 #define ACPI_HMAT_CA_DIRECT_MAPPED (1)
941 #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING (2)
942
943 /* Values for write policy flag */
944
945 #define ACPI_HMAT_CP_NONE (0)
946 #define ACPI_HMAT_CP_WB (1)
947 #define ACPI_HMAT_CP_WT (2)
948
949
950 /*******************************************************************************
951 *
952 * MADT - Multiple APIC Description Table
953 * Version 3
954 *
955 ******************************************************************************/
956
957 typedef struct acpi_table_madt
958 {
959 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
960 UINT32 Address; /* Physical address of local APIC */
961 UINT32 Flags;
962
963 } ACPI_TABLE_MADT;
964
965 /* Masks for Flags field above */
966
967 #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
968
969 /* Values for PCATCompat flag */
970
971 #define ACPI_MADT_DUAL_PIC 1
972 #define ACPI_MADT_MULTIPLE_APIC 0
973
974
975 /* Values for MADT subtable type in ACPI_SUBTABLE_HEADER */
976
977 enum AcpiMadtType
978 {
979 ACPI_MADT_TYPE_LOCAL_APIC = 0,
980 ACPI_MADT_TYPE_IO_APIC = 1,
981 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,
982 ACPI_MADT_TYPE_NMI_SOURCE = 3,
983 ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,
984 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,
985 ACPI_MADT_TYPE_IO_SAPIC = 6,
986 ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
987 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
988 ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
989 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
990 ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11,
991 ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12,
992 ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13,
993 ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14,
994 ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15,
995 ACPI_MADT_TYPE_RESERVED = 16 /* 16 and greater are reserved */
996 };
997
998
999 /*
1000 * MADT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
1001 */
1002
1003 /* 0: Processor Local APIC */
1004
1005 typedef struct acpi_madt_local_apic
1006 {
1007 ACPI_SUBTABLE_HEADER Header;
1008 UINT8 ProcessorId; /* ACPI processor id */
1009 UINT8 Id; /* Processor's local APIC id */
1010 UINT32 LapicFlags;
1011
1012 } ACPI_MADT_LOCAL_APIC;
1013
1014
1015 /* 1: IO APIC */
1016
1017 typedef struct acpi_madt_io_apic
1018 {
1019 ACPI_SUBTABLE_HEADER Header;
1020 UINT8 Id; /* I/O APIC ID */
1021 UINT8 Reserved; /* Reserved - must be zero */
1022 UINT32 Address; /* APIC physical address */
1023 UINT32 GlobalIrqBase; /* Global system interrupt where INTI lines start */
1024
1025 } ACPI_MADT_IO_APIC;
1026
1027
1028 /* 2: Interrupt Override */
1029
1030 typedef struct acpi_madt_interrupt_override
1031 {
1032 ACPI_SUBTABLE_HEADER Header;
1033 UINT8 Bus; /* 0 - ISA */
1034 UINT8 SourceIrq; /* Interrupt source (IRQ) */
1035 UINT32 GlobalIrq; /* Global system interrupt */
1036 UINT16 IntiFlags;
1037
1038 } ACPI_MADT_INTERRUPT_OVERRIDE;
1039
1040
1041 /* 3: NMI Source */
1042
1043 typedef struct acpi_madt_nmi_source
1044 {
1045 ACPI_SUBTABLE_HEADER Header;
1046 UINT16 IntiFlags;
1047 UINT32 GlobalIrq; /* Global system interrupt */
1048
1049 } ACPI_MADT_NMI_SOURCE;
1050
1051
1052 /* 4: Local APIC NMI */
1053
1054 typedef struct acpi_madt_local_apic_nmi
1055 {
1056 ACPI_SUBTABLE_HEADER Header;
1057 UINT8 ProcessorId; /* ACPI processor id */
1058 UINT16 IntiFlags;
1059 UINT8 Lint; /* LINTn to which NMI is connected */
1060
1061 } ACPI_MADT_LOCAL_APIC_NMI;
1062
1063
1064 /* 5: Address Override */
1065
1066 typedef struct acpi_madt_local_apic_override
1067 {
1068 ACPI_SUBTABLE_HEADER Header;
1069 UINT16 Reserved; /* Reserved, must be zero */
1070 UINT64 Address; /* APIC physical address */
1071
1072 } ACPI_MADT_LOCAL_APIC_OVERRIDE;
1073
1074
1075 /* 6: I/O Sapic */
1076
1077 typedef struct acpi_madt_io_sapic
1078 {
1079 ACPI_SUBTABLE_HEADER Header;
1080 UINT8 Id; /* I/O SAPIC ID */
1081 UINT8 Reserved; /* Reserved, must be zero */
1082 UINT32 GlobalIrqBase; /* Global interrupt for SAPIC start */
1083 UINT64 Address; /* SAPIC physical address */
1084
1085 } ACPI_MADT_IO_SAPIC;
1086
1087
1088 /* 7: Local Sapic */
1089
1090 typedef struct acpi_madt_local_sapic
1091 {
1092 ACPI_SUBTABLE_HEADER Header;
1093 UINT8 ProcessorId; /* ACPI processor id */
1094 UINT8 Id; /* SAPIC ID */
1095 UINT8 Eid; /* SAPIC EID */
1096 UINT8 Reserved[3]; /* Reserved, must be zero */
1097 UINT32 LapicFlags;
1098 UINT32 Uid; /* Numeric UID - ACPI 3.0 */
1099 char UidString[1]; /* String UID - ACPI 3.0 */
1100
1101 } ACPI_MADT_LOCAL_SAPIC;
1102
1103
1104 /* 8: Platform Interrupt Source */
1105
1106 typedef struct acpi_madt_interrupt_source
1107 {
1108 ACPI_SUBTABLE_HEADER Header;
1109 UINT16 IntiFlags;
1110 UINT8 Type; /* 1=PMI, 2=INIT, 3=corrected */
1111 UINT8 Id; /* Processor ID */
1112 UINT8 Eid; /* Processor EID */
1113 UINT8 IoSapicVector; /* Vector value for PMI interrupts */
1114 UINT32 GlobalIrq; /* Global system interrupt */
1115 UINT32 Flags; /* Interrupt Source Flags */
1116
1117 } ACPI_MADT_INTERRUPT_SOURCE;
1118
1119 /* Masks for Flags field above */
1120
1121 #define ACPI_MADT_CPEI_OVERRIDE (1)
1122
1123
1124 /* 9: Processor Local X2APIC (ACPI 4.0) */
1125
1126 typedef struct acpi_madt_local_x2apic
1127 {
1128 ACPI_SUBTABLE_HEADER Header;
1129 UINT16 Reserved; /* Reserved - must be zero */
1130 UINT32 LocalApicId; /* Processor x2APIC ID */
1131 UINT32 LapicFlags;
1132 UINT32 Uid; /* ACPI processor UID */
1133
1134 } ACPI_MADT_LOCAL_X2APIC;
1135
1136
1137 /* 10: Local X2APIC NMI (ACPI 4.0) */
1138
1139 typedef struct acpi_madt_local_x2apic_nmi
1140 {
1141 ACPI_SUBTABLE_HEADER Header;
1142 UINT16 IntiFlags;
1143 UINT32 Uid; /* ACPI processor UID */
1144 UINT8 Lint; /* LINTn to which NMI is connected */
1145 UINT8 Reserved[3]; /* Reserved - must be zero */
1146
1147 } ACPI_MADT_LOCAL_X2APIC_NMI;
1148
1149
1150 /* 11: Generic Interrupt (ACPI 5.0 + ACPI 6.0 changes) */
1151
1152 typedef struct acpi_madt_generic_interrupt
1153 {
1154 ACPI_SUBTABLE_HEADER Header;
1155 UINT16 Reserved; /* Reserved - must be zero */
1156 UINT32 CpuInterfaceNumber;
1157 UINT32 Uid;
1158 UINT32 Flags;
1159 UINT32 ParkingVersion;
1160 UINT32 PerformanceInterrupt;
1161 UINT64 ParkedAddress;
1162 UINT64 BaseAddress;
1163 UINT64 GicvBaseAddress;
1164 UINT64 GichBaseAddress;
1165 UINT32 VgicInterrupt;
1166 UINT64 GicrBaseAddress;
1167 UINT64 ArmMpidr;
1168 UINT8 EfficiencyClass;
1169 UINT8 Reserved2[3];
1170
1171 } ACPI_MADT_GENERIC_INTERRUPT;
1172
1173 /* Masks for Flags field above */
1174
1175 /* ACPI_MADT_ENABLED (1) Processor is usable if set */
1176 #define ACPI_MADT_PERFORMANCE_IRQ_MODE (1<<1) /* 01: Performance Interrupt Mode */
1177 #define ACPI_MADT_VGIC_IRQ_MODE (1<<2) /* 02: VGIC Maintenance Interrupt mode */
1178
1179
1180 /* 12: Generic Distributor (ACPI 5.0 + ACPI 6.0 changes) */
1181
1182 typedef struct acpi_madt_generic_distributor
1183 {
1184 ACPI_SUBTABLE_HEADER Header;
1185 UINT16 Reserved; /* Reserved - must be zero */
1186 UINT32 GicId;
1187 UINT64 BaseAddress;
1188 UINT32 GlobalIrqBase;
1189 UINT8 Version;
1190 UINT8 Reserved2[3]; /* Reserved - must be zero */
1191
1192 } ACPI_MADT_GENERIC_DISTRIBUTOR;
1193
1194 /* Values for Version field above */
1195
1196 enum AcpiMadtGicVersion
1197 {
1198 ACPI_MADT_GIC_VERSION_NONE = 0,
1199 ACPI_MADT_GIC_VERSION_V1 = 1,
1200 ACPI_MADT_GIC_VERSION_V2 = 2,
1201 ACPI_MADT_GIC_VERSION_V3 = 3,
1202 ACPI_MADT_GIC_VERSION_V4 = 4,
1203 ACPI_MADT_GIC_VERSION_RESERVED = 5 /* 5 and greater are reserved */
1204 };
1205
1206
1207 /* 13: Generic MSI Frame (ACPI 5.1) */
1208
1209 typedef struct acpi_madt_generic_msi_frame
1210 {
1211 ACPI_SUBTABLE_HEADER Header;
1212 UINT16 Reserved; /* Reserved - must be zero */
1213 UINT32 MsiFrameId;
1214 UINT64 BaseAddress;
1215 UINT32 Flags;
1216 UINT16 SpiCount;
1217 UINT16 SpiBase;
1218
1219 } ACPI_MADT_GENERIC_MSI_FRAME;
1220
1221 /* Masks for Flags field above */
1222
1223 #define ACPI_MADT_OVERRIDE_SPI_VALUES (1)
1224
1225
1226 /* 14: Generic Redistributor (ACPI 5.1) */
1227
1228 typedef struct acpi_madt_generic_redistributor
1229 {
1230 ACPI_SUBTABLE_HEADER Header;
1231 UINT16 Reserved; /* reserved - must be zero */
1232 UINT64 BaseAddress;
1233 UINT32 Length;
1234
1235 } ACPI_MADT_GENERIC_REDISTRIBUTOR;
1236
1237
1238 /* 15: Generic Translator (ACPI 6.0) */
1239
1240 typedef struct acpi_madt_generic_translator
1241 {
1242 ACPI_SUBTABLE_HEADER Header;
1243 UINT16 Reserved; /* reserved - must be zero */
1244 UINT32 TranslationId;
1245 UINT64 BaseAddress;
1246 UINT32 Reserved2;
1247
1248 } ACPI_MADT_GENERIC_TRANSLATOR;
1249
1250
1251 /*
1252 * Common flags fields for MADT subtables
1253 */
1254
1255 /* MADT Local APIC flags */
1256
1257 #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
1258
1259 /* MADT MPS INTI flags (IntiFlags) */
1260
1261 #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
1262 #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
1263
1264 /* Values for MPS INTI flags */
1265
1266 #define ACPI_MADT_POLARITY_CONFORMS 0
1267 #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
1268 #define ACPI_MADT_POLARITY_RESERVED 2
1269 #define ACPI_MADT_POLARITY_ACTIVE_LOW 3
1270
1271 #define ACPI_MADT_TRIGGER_CONFORMS (0)
1272 #define ACPI_MADT_TRIGGER_EDGE (1<<2)
1273 #define ACPI_MADT_TRIGGER_RESERVED (2<<2)
1274 #define ACPI_MADT_TRIGGER_LEVEL (3<<2)
1275
1276
1277 /*******************************************************************************
1278 *
1279 * MSCT - Maximum System Characteristics Table (ACPI 4.0)
1280 * Version 1
1281 *
1282 ******************************************************************************/
1283
1284 typedef struct acpi_table_msct
1285 {
1286 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1287 UINT32 ProximityOffset; /* Location of proximity info struct(s) */
1288 UINT32 MaxProximityDomains;/* Max number of proximity domains */
1289 UINT32 MaxClockDomains; /* Max number of clock domains */
1290 UINT64 MaxAddress; /* Max physical address in system */
1291
1292 } ACPI_TABLE_MSCT;
1293
1294
1295 /* Subtable - Maximum Proximity Domain Information. Version 1 */
1296
1297 typedef struct acpi_msct_proximity
1298 {
1299 UINT8 Revision;
1300 UINT8 Length;
1301 UINT32 RangeStart; /* Start of domain range */
1302 UINT32 RangeEnd; /* End of domain range */
1303 UINT32 ProcessorCapacity;
1304 UINT64 MemoryCapacity; /* In bytes */
1305
1306 } ACPI_MSCT_PROXIMITY;
1307
1308
1309 /*******************************************************************************
1310 *
1311 * NFIT - NVDIMM Interface Table (ACPI 6.0+)
1312 * Version 1
1313 *
1314 ******************************************************************************/
1315
1316 typedef struct acpi_table_nfit
1317 {
1318 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1319 UINT32 Reserved; /* Reserved, must be zero */
1320
1321 } ACPI_TABLE_NFIT;
1322
1323 /* Subtable header for NFIT */
1324
1325 typedef struct acpi_nfit_header
1326 {
1327 UINT16 Type;
1328 UINT16 Length;
1329
1330 } ACPI_NFIT_HEADER;
1331
1332
1333 /* Values for subtable type in ACPI_NFIT_HEADER */
1334
1335 enum AcpiNfitType
1336 {
1337 ACPI_NFIT_TYPE_SYSTEM_ADDRESS = 0,
1338 ACPI_NFIT_TYPE_MEMORY_MAP = 1,
1339 ACPI_NFIT_TYPE_INTERLEAVE = 2,
1340 ACPI_NFIT_TYPE_SMBIOS = 3,
1341 ACPI_NFIT_TYPE_CONTROL_REGION = 4,
1342 ACPI_NFIT_TYPE_DATA_REGION = 5,
1343 ACPI_NFIT_TYPE_FLUSH_ADDRESS = 6,
1344 ACPI_NFIT_TYPE_CAPABILITIES = 7,
1345 ACPI_NFIT_TYPE_RESERVED = 8 /* 8 and greater are reserved */
1346 };
1347
1348 /*
1349 * NFIT Subtables
1350 */
1351
1352 /* 0: System Physical Address Range Structure */
1353
1354 typedef struct acpi_nfit_system_address
1355 {
1356 ACPI_NFIT_HEADER Header;
1357 UINT16 RangeIndex;
1358 UINT16 Flags;
1359 UINT32 Reserved; /* Reserved, must be zero */
1360 UINT32 ProximityDomain;
1361 UINT8 RangeGuid[16];
1362 UINT64 Address;
1363 UINT64 Length;
1364 UINT64 MemoryMapping;
1365
1366 } ACPI_NFIT_SYSTEM_ADDRESS;
1367
1368 /* Flags */
1369
1370 #define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */
1371 #define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */
1372
1373 /* Range Type GUIDs appear in the include/acuuid.h file */
1374
1375
1376 /* 1: Memory Device to System Address Range Map Structure */
1377
1378 typedef struct acpi_nfit_memory_map
1379 {
1380 ACPI_NFIT_HEADER Header;
1381 UINT32 DeviceHandle;
1382 UINT16 PhysicalId;
1383 UINT16 RegionId;
1384 UINT16 RangeIndex;
1385 UINT16 RegionIndex;
1386 UINT64 RegionSize;
1387 UINT64 RegionOffset;
1388 UINT64 Address;
1389 UINT16 InterleaveIndex;
1390 UINT16 InterleaveWays;
1391 UINT16 Flags;
1392 UINT16 Reserved; /* Reserved, must be zero */
1393
1394 } ACPI_NFIT_MEMORY_MAP;
1395
1396 /* Flags */
1397
1398 #define ACPI_NFIT_MEM_SAVE_FAILED (1) /* 00: Last SAVE to Memory Device failed */
1399 #define ACPI_NFIT_MEM_RESTORE_FAILED (1<<1) /* 01: Last RESTORE from Memory Device failed */
1400 #define ACPI_NFIT_MEM_FLUSH_FAILED (1<<2) /* 02: Platform flush failed */
1401 #define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device is not armed */
1402 #define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device observed SMART/health events */
1403 #define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health events enabled */
1404 #define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to SPA failed */
1405
1406
1407 /* 2: Interleave Structure */
1408
1409 typedef struct acpi_nfit_interleave
1410 {
1411 ACPI_NFIT_HEADER Header;
1412 UINT16 InterleaveIndex;
1413 UINT16 Reserved; /* Reserved, must be zero */
1414 UINT32 LineCount;
1415 UINT32 LineSize;
1416 UINT32 LineOffset[1]; /* Variable length */
1417
1418 } ACPI_NFIT_INTERLEAVE;
1419
1420
1421 /* 3: SMBIOS Management Information Structure */
1422
1423 typedef struct acpi_nfit_smbios
1424 {
1425 ACPI_NFIT_HEADER Header;
1426 UINT32 Reserved; /* Reserved, must be zero */
1427 UINT8 Data[1]; /* Variable length */
1428
1429 } ACPI_NFIT_SMBIOS;
1430
1431
1432 /* 4: NVDIMM Control Region Structure */
1433
1434 typedef struct acpi_nfit_control_region
1435 {
1436 ACPI_NFIT_HEADER Header;
1437 UINT16 RegionIndex;
1438 UINT16 VendorId;
1439 UINT16 DeviceId;
1440 UINT16 RevisionId;
1441 UINT16 SubsystemVendorId;
1442 UINT16 SubsystemDeviceId;
1443 UINT16 SubsystemRevisionId;
1444 UINT8 ValidFields;
1445 UINT8 ManufacturingLocation;
1446 UINT16 ManufacturingDate;
1447 UINT8 Reserved[2]; /* Reserved, must be zero */
1448 UINT32 SerialNumber;
1449 UINT16 Code;
1450 UINT16 Windows;
1451 UINT64 WindowSize;
1452 UINT64 CommandOffset;
1453 UINT64 CommandSize;
1454 UINT64 StatusOffset;
1455 UINT64 StatusSize;
1456 UINT16 Flags;
1457 UINT8 Reserved1[6]; /* Reserved, must be zero */
1458
1459 } ACPI_NFIT_CONTROL_REGION;
1460
1461 /* Flags */
1462
1463 #define ACPI_NFIT_CONTROL_BUFFERED (1) /* Block Data Windows implementation is buffered */
1464
1465 /* ValidFields bits */
1466
1467 #define ACPI_NFIT_CONTROL_MFG_INFO_VALID (1) /* Manufacturing fields are valid */
1468
1469
1470 /* 5: NVDIMM Block Data Window Region Structure */
1471
1472 typedef struct acpi_nfit_data_region
1473 {
1474 ACPI_NFIT_HEADER Header;
1475 UINT16 RegionIndex;
1476 UINT16 Windows;
1477 UINT64 Offset;
1478 UINT64 Size;
1479 UINT64 Capacity;
1480 UINT64 StartAddress;
1481
1482 } ACPI_NFIT_DATA_REGION;
1483
1484
1485 /* 6: Flush Hint Address Structure */
1486
1487 typedef struct acpi_nfit_flush_address
1488 {
1489 ACPI_NFIT_HEADER Header;
1490 UINT32 DeviceHandle;
1491 UINT16 HintCount;
1492 UINT8 Reserved[6]; /* Reserved, must be zero */
1493 UINT64 HintAddress[1]; /* Variable length */
1494
1495 } ACPI_NFIT_FLUSH_ADDRESS;
1496
1497
1498 /* 7: Platform Capabilities Structure */
1499
1500 typedef struct acpi_nfit_capabilities
1501 {
1502 ACPI_NFIT_HEADER Header;
1503 UINT8 HighestCapability;
1504 UINT8 Reserved[3]; /* Reserved, must be zero */
1505 UINT32 Capabilities;
1506 UINT32 Reserved2;
1507
1508 } ACPI_NFIT_CAPABILITIES;
1509
1510 /* Capabilities Flags */
1511
1512 #define ACPI_NFIT_CAPABILITY_CACHE_FLUSH (1) /* 00: Cache Flush to NVDIMM capable */
1513 #define ACPI_NFIT_CAPABILITY_MEM_FLUSH (1<<1) /* 01: Memory Flush to NVDIMM capable */
1514 #define ACPI_NFIT_CAPABILITY_MEM_MIRRORING (1<<2) /* 02: Memory Mirroring capable */
1515
1516
1517 /*
1518 * NFIT/DVDIMM device handle support - used as the _ADR for each NVDIMM
1519 */
1520 typedef struct nfit_device_handle
1521 {
1522 UINT32 Handle;
1523
1524 } NFIT_DEVICE_HANDLE;
1525
1526 /* Device handle construction and extraction macros */
1527
1528 #define ACPI_NFIT_DIMM_NUMBER_MASK 0x0000000F
1529 #define ACPI_NFIT_CHANNEL_NUMBER_MASK 0x000000F0
1530 #define ACPI_NFIT_MEMORY_ID_MASK 0x00000F00
1531 #define ACPI_NFIT_SOCKET_ID_MASK 0x0000F000
1532 #define ACPI_NFIT_NODE_ID_MASK 0x0FFF0000
1533
1534 #define ACPI_NFIT_DIMM_NUMBER_OFFSET 0
1535 #define ACPI_NFIT_CHANNEL_NUMBER_OFFSET 4
1536 #define ACPI_NFIT_MEMORY_ID_OFFSET 8
1537 #define ACPI_NFIT_SOCKET_ID_OFFSET 12
1538 #define ACPI_NFIT_NODE_ID_OFFSET 16
1539
1540 /* Macro to construct a NFIT/NVDIMM device handle */
1541
1542 #define ACPI_NFIT_BUILD_DEVICE_HANDLE(dimm, channel, memory, socket, node) \
1543 ((dimm) | \
1544 ((channel) << ACPI_NFIT_CHANNEL_NUMBER_OFFSET) | \
1545 ((memory) << ACPI_NFIT_MEMORY_ID_OFFSET) | \
1546 ((socket) << ACPI_NFIT_SOCKET_ID_OFFSET) | \
1547 ((node) << ACPI_NFIT_NODE_ID_OFFSET))
1548
1549 /* Macros to extract individual fields from a NFIT/NVDIMM device handle */
1550
1551 #define ACPI_NFIT_GET_DIMM_NUMBER(handle) \
1552 ((handle) & ACPI_NFIT_DIMM_NUMBER_MASK)
1553
1554 #define ACPI_NFIT_GET_CHANNEL_NUMBER(handle) \
1555 (((handle) & ACPI_NFIT_CHANNEL_NUMBER_MASK) >> ACPI_NFIT_CHANNEL_NUMBER_OFFSET)
1556
1557 #define ACPI_NFIT_GET_MEMORY_ID(handle) \
1558 (((handle) & ACPI_NFIT_MEMORY_ID_MASK) >> ACPI_NFIT_MEMORY_ID_OFFSET)
1559
1560 #define ACPI_NFIT_GET_SOCKET_ID(handle) \
1561 (((handle) & ACPI_NFIT_SOCKET_ID_MASK) >> ACPI_NFIT_SOCKET_ID_OFFSET)
1562
1563 #define ACPI_NFIT_GET_NODE_ID(handle) \
1564 (((handle) & ACPI_NFIT_NODE_ID_MASK) >> ACPI_NFIT_NODE_ID_OFFSET)
1565
1566
1567 /*******************************************************************************
1568 *
1569 * PDTT - Platform Debug Trigger Table (ACPI 6.2)
1570 * Version 0
1571 *
1572 ******************************************************************************/
1573
1574 typedef struct acpi_table_pdtt
1575 {
1576 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1577 UINT8 TriggerCount;
1578 UINT8 Reserved[3];
1579 UINT32 ArrayOffset;
1580
1581 } ACPI_TABLE_PDTT;
1582
1583
1584 /*
1585 * PDTT Communication Channel Identifier Structure.
1586 * The number of these structures is defined by TriggerCount above,
1587 * starting at ArrayOffset.
1588 */
1589 typedef struct acpi_pdtt_channel
1590 {
1591 UINT8 SubchannelId;
1592 UINT8 Flags;
1593
1594 } ACPI_PDTT_CHANNEL;
1595
1596 /* Flags for above */
1597
1598 #define ACPI_PDTT_RUNTIME_TRIGGER (1)
1599 #define ACPI_PDTT_WAIT_COMPLETION (1<<1)
1600
1601
1602 /*******************************************************************************
1603 *
1604 * PPTT - Processor Properties Topology Table (ACPI 6.2)
1605 * Version 1
1606 *
1607 ******************************************************************************/
1608
1609 typedef struct acpi_table_pptt
1610 {
1611 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1612
1613 } ACPI_TABLE_PPTT;
1614
1615 /* Values for Type field above */
1616
1617 enum AcpiPpttType
1618 {
1619 ACPI_PPTT_TYPE_PROCESSOR = 0,
1620 ACPI_PPTT_TYPE_CACHE = 1,
1621 ACPI_PPTT_TYPE_ID = 2,
1622 ACPI_PPTT_TYPE_RESERVED = 3
1623 };
1624
1625
1626 /* 0: Processor Hierarchy Node Structure */
1627
1628 typedef struct acpi_pptt_processor
1629 {
1630 ACPI_SUBTABLE_HEADER Header;
1631 UINT16 Reserved;
1632 UINT32 Flags;
1633 UINT32 Parent;
1634 UINT32 AcpiProcessorId;
1635 UINT32 NumberOfPrivResources;
1636
1637 } ACPI_PPTT_PROCESSOR;
1638
1639 /* Flags */
1640
1641 #define ACPI_PPTT_PHYSICAL_PACKAGE (1) /* Physical package */
1642 #define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (2) /* ACPI Processor ID valid */
1643
1644
1645 /* 1: Cache Type Structure */
1646
1647 typedef struct acpi_pptt_cache
1648 {
1649 ACPI_SUBTABLE_HEADER Header;
1650 UINT16 Reserved;
1651 UINT32 Flags;
1652 UINT32 NextLevelOfCache;
1653 UINT32 Size;
1654 UINT32 NumberOfSets;
1655 UINT8 Associativity;
1656 UINT8 Attributes;
1657 UINT16 LineSize;
1658
1659 } ACPI_PPTT_CACHE;
1660
1661 /* Flags */
1662
1663 #define ACPI_PPTT_SIZE_PROPERTY_VALID (1) /* Physical property valid */
1664 #define ACPI_PPTT_NUMBER_OF_SETS_VALID (1<<1) /* Number of sets valid */
1665 #define ACPI_PPTT_ASSOCIATIVITY_VALID (1<<2) /* Associativity valid */
1666 #define ACPI_PPTT_ALLOCATION_TYPE_VALID (1<<3) /* Allocation type valid */
1667 #define ACPI_PPTT_CACHE_TYPE_VALID (1<<4) /* Cache type valid */
1668 #define ACPI_PPTT_WRITE_POLICY_VALID (1<<5) /* Write policy valid */
1669 #define ACPI_PPTT_LINE_SIZE_VALID (1<<6) /* Line size valid */
1670
1671 /* Masks for Attributes */
1672
1673 #define ACPI_PPTT_MASK_ALLOCATION_TYPE (0x03) /* Allocation type */
1674 #define ACPI_PPTT_MASK_CACHE_TYPE (0x0C) /* Cache type */
1675 #define ACPI_PPTT_MASK_WRITE_POLICY (0x10) /* Write policy */
1676
1677 /* Attributes describing cache */
1678 #define ACPI_PPTT_CACHE_READ_ALLOCATE (0x0) /* Cache line is allocated on read */
1679 #define ACPI_PPTT_CACHE_WRITE_ALLOCATE (0x01) /* Cache line is allocated on write */
1680 #define ACPI_PPTT_CACHE_RW_ALLOCATE (0x02) /* Cache line is allocated on read and write */
1681 #define ACPI_PPTT_CACHE_RW_ALLOCATE_ALT (0x03) /* Alternate representation of above */
1682
1683 #define ACPI_PPTT_CACHE_TYPE_DATA (0x0) /* Data cache */
1684 #define ACPI_PPTT_CACHE_TYPE_INSTR (1<<2) /* Instruction cache */
1685 #define ACPI_PPTT_CACHE_TYPE_UNIFIED (2<<2) /* Unified I & D cache */
1686 #define ACPI_PPTT_CACHE_TYPE_UNIFIED_ALT (3<<2) /* Alternate representation of above */
1687
1688 #define ACPI_PPTT_CACHE_POLICY_WB (0x0) /* Cache is write back */
1689 #define ACPI_PPTT_CACHE_POLICY_WT (1<<4) /* Cache is write through */
1690
1691 /* 2: ID Structure */
1692
1693 typedef struct acpi_pptt_id
1694 {
1695 ACPI_SUBTABLE_HEADER Header;
1696 UINT16 Reserved;
1697 UINT32 VendorId;
1698 UINT64 Level1Id;
1699 UINT64 Level2Id;
1700 UINT16 MajorRev;
1701 UINT16 MinorRev;
1702 UINT16 SpinRev;
1703
1704 } ACPI_PPTT_ID;
1705
1706
1707 /*******************************************************************************
1708 *
1709 * SBST - Smart Battery Specification Table
1710 * Version 1
1711 *
1712 ******************************************************************************/
1713
1714 typedef struct acpi_table_sbst
1715 {
1716 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1717 UINT32 WarningLevel;
1718 UINT32 LowLevel;
1719 UINT32 CriticalLevel;
1720
1721 } ACPI_TABLE_SBST;
1722
1723
1724 /*******************************************************************************
1725 *
1726 * SDEV - Secure Devices Table (ACPI 6.2)
1727 * Version 1
1728 *
1729 ******************************************************************************/
1730
1731 typedef struct acpi_table_sdev
1732 {
1733 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1734
1735 } ACPI_TABLE_SDEV;
1736
1737
1738 typedef struct acpi_sdev_header
1739 {
1740 UINT8 Type;
1741 UINT8 Flags;
1742 UINT16 Length;
1743
1744 } ACPI_SDEV_HEADER;
1745
1746
1747 /* Values for subtable type above */
1748
1749 enum AcpiSdevType
1750 {
1751 ACPI_SDEV_TYPE_NAMESPACE_DEVICE = 0,
1752 ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE = 1,
1753 ACPI_SDEV_TYPE_RESERVED = 2 /* 2 and greater are reserved */
1754 };
1755
1756 /* Values for flags above */
1757
1758 #define ACPI_SDEV_HANDOFF_TO_UNSECURE_OS (1)
1759
1760 /*
1761 * SDEV subtables
1762 */
1763
1764 /* 0: Namespace Device Based Secure Device Structure */
1765
1766 typedef struct acpi_sdev_namespace
1767 {
1768 ACPI_SDEV_HEADER Header;
1769 UINT16 DeviceIdOffset;
1770 UINT16 DeviceIdLength;
1771 UINT16 VendorDataOffset;
1772 UINT16 VendorDataLength;
1773
1774 } ACPI_SDEV_NAMESPACE;
1775
1776 /* 1: PCIe Endpoint Device Based Device Structure */
1777
1778 typedef struct acpi_sdev_pcie
1779 {
1780 ACPI_SDEV_HEADER Header;
1781 UINT16 Segment;
1782 UINT16 StartBus;
1783 UINT16 PathOffset;
1784 UINT16 PathLength;
1785 UINT16 VendorDataOffset;
1786 UINT16 VendorDataLength;
1787
1788 } ACPI_SDEV_PCIE;
1789
1790 /* 1a: PCIe Endpoint path entry */
1791
1792 typedef struct acpi_sdev_pcie_path
1793 {
1794 UINT8 Device;
1795 UINT8 Function;
1796
1797 } ACPI_SDEV_PCIE_PATH;
1798
1799
1800 /*******************************************************************************
1801 *
1802 * SLIT - System Locality Distance Information Table
1803 * Version 1
1804 *
1805 ******************************************************************************/
1806
1807 typedef struct acpi_table_slit
1808 {
1809 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1810 UINT64 LocalityCount;
1811 UINT8 Entry[1]; /* Real size = localities^2 */
1812
1813 } ACPI_TABLE_SLIT;
1814
1815
1816 /*******************************************************************************
1817 *
1818 * SRAT - System Resource Affinity Table
1819 * Version 3
1820 *
1821 ******************************************************************************/
1822
1823 typedef struct acpi_table_srat
1824 {
1825 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1826 UINT32 TableRevision; /* Must be value '1' */
1827 UINT64 Reserved; /* Reserved, must be zero */
1828
1829 } ACPI_TABLE_SRAT;
1830
1831 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
1832
1833 enum AcpiSratType
1834 {
1835 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
1836 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
1837 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
1838 ACPI_SRAT_TYPE_GICC_AFFINITY = 3,
1839 ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */
1840 ACPI_SRAT_TYPE_RESERVED = 5 /* 5 and greater are reserved */
1841 };
1842
1843 /*
1844 * SRAT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
1845 */
1846
1847 /* 0: Processor Local APIC/SAPIC Affinity */
1848
1849 typedef struct acpi_srat_cpu_affinity
1850 {
1851 ACPI_SUBTABLE_HEADER Header;
1852 UINT8 ProximityDomainLo;
1853 UINT8 ApicId;
1854 UINT32 Flags;
1855 UINT8 LocalSapicEid;
1856 UINT8 ProximityDomainHi[3];
1857 UINT32 ClockDomain;
1858
1859 } ACPI_SRAT_CPU_AFFINITY;
1860
1861 /* Flags */
1862
1863 #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */
1864
1865
1866 /* 1: Memory Affinity */
1867
1868 typedef struct acpi_srat_mem_affinity
1869 {
1870 ACPI_SUBTABLE_HEADER Header;
1871 UINT32 ProximityDomain;
1872 UINT16 Reserved; /* Reserved, must be zero */
1873 UINT64 BaseAddress;
1874 UINT64 Length;
1875 UINT32 Reserved1;
1876 UINT32 Flags;
1877 UINT64 Reserved2; /* Reserved, must be zero */
1878
1879 } ACPI_SRAT_MEM_AFFINITY;
1880
1881 /* Flags */
1882
1883 #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
1884 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
1885 #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
1886
1887
1888 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
1889
1890 typedef struct acpi_srat_x2apic_cpu_affinity
1891 {
1892 ACPI_SUBTABLE_HEADER Header;
1893 UINT16 Reserved; /* Reserved, must be zero */
1894 UINT32 ProximityDomain;
1895 UINT32 ApicId;
1896 UINT32 Flags;
1897 UINT32 ClockDomain;
1898 UINT32 Reserved2;
1899
1900 } ACPI_SRAT_X2APIC_CPU_AFFINITY;
1901
1902 /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
1903
1904 #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1905
1906
1907 /* 3: GICC Affinity (ACPI 5.1) */
1908
1909 typedef struct acpi_srat_gicc_affinity
1910 {
1911 ACPI_SUBTABLE_HEADER Header;
1912 UINT32 ProximityDomain;
1913 UINT32 AcpiProcessorUid;
1914 UINT32 Flags;
1915 UINT32 ClockDomain;
1916
1917 } ACPI_SRAT_GICC_AFFINITY;
1918
1919 /* Flags for ACPI_SRAT_GICC_AFFINITY */
1920
1921 #define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */
1922
1923
1924 /* 4: GCC ITS Affinity (ACPI 6.2) */
1925
1926 typedef struct acpi_srat_gic_its_affinity
1927 {
1928 ACPI_SUBTABLE_HEADER Header;
1929 UINT32 ProximityDomain;
1930 UINT16 Reserved;
1931 UINT32 ItsId;
1932
1933 } ACPI_SRAT_GIC_ITS_AFFINITY;
1934
1935
1936 /* Reset to default packing */
1937
1938 #pragma pack()
1939
1940 #endif /* __ACTBL1_H__ */