sd: remove 'ssd' driver support
[unleashed/tickless.git] / arch / x86 / include / sys / acpi / actbl1.h
blob0fe925a84bf502d7a113be4747b3b29183fcc456
1 /******************************************************************************
3 * Name: actbl1.h - Additional ACPI table definitions
5 *****************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2016, Intel Corp.
9 * All rights reserved.
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.
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.
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.
44 #ifndef __ACTBL1_H__
45 #define __ACTBL1_H__
48 /*******************************************************************************
50 * Additional ACPI Tables (1)
52 * These tables are not consumed directly by the ACPICA subsystem, but are
53 * included here to support device drivers and the AML disassembler.
55 * The tables in this file are fully defined within the ACPI specification.
57 ******************************************************************************/
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.
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_HEST "HEST" /* Hardware Error Source Table */
71 #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
72 #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */
73 #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
74 #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
75 #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
76 #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
80 * All tables must be byte-packed to match the ACPI specification, since
81 * the tables are provided by the system BIOS.
83 #pragma pack(1)
86 * Note: C bitfields are not used for this reason:
88 * "Bitfields are great and easy to read, but unfortunately the C language
89 * does not specify the layout of bitfields in memory, which means they are
90 * essentially useless for dealing with packed data in on-disk formats or
91 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
92 * this decision was a design error in C. Ritchie could have picked an order
93 * and stuck with it." Norman Ramsey.
94 * See http://stackoverflow.com/a/1053662/41661
98 /*******************************************************************************
100 * Common subtable headers
102 ******************************************************************************/
104 /* Generic subtable header (used in MADT, SRAT, etc.) */
106 typedef struct acpi_subtable_header
108 UINT8 Type;
109 UINT8 Length;
111 } ACPI_SUBTABLE_HEADER;
114 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
116 typedef struct acpi_whea_header
118 UINT8 Action;
119 UINT8 Instruction;
120 UINT8 Flags;
121 UINT8 Reserved;
122 ACPI_GENERIC_ADDRESS RegisterRegion;
123 UINT64 Value; /* Value used with Read/Write register */
124 UINT64 Mask; /* Bitmask required for this register instruction */
126 } ACPI_WHEA_HEADER;
129 /*******************************************************************************
131 * BERT - Boot Error Record Table (ACPI 4.0)
132 * Version 1
134 ******************************************************************************/
136 typedef struct acpi_table_bert
138 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
139 UINT32 RegionLength; /* Length of the boot error region */
140 UINT64 Address; /* Physical address of the error region */
142 } ACPI_TABLE_BERT;
145 /* Boot Error Region (not a subtable, pointed to by Address field above) */
147 typedef struct acpi_bert_region
149 UINT32 BlockStatus; /* Type of error information */
150 UINT32 RawDataOffset; /* Offset to raw error data */
151 UINT32 RawDataLength; /* Length of raw error data */
152 UINT32 DataLength; /* Length of generic error data */
153 UINT32 ErrorSeverity; /* Severity code */
155 } ACPI_BERT_REGION;
157 /* Values for BlockStatus flags above */
159 #define ACPI_BERT_UNCORRECTABLE (1)
160 #define ACPI_BERT_CORRECTABLE (1<<1)
161 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
162 #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
163 #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
165 /* Values for ErrorSeverity above */
167 enum AcpiBertErrorSeverity
169 ACPI_BERT_ERROR_CORRECTABLE = 0,
170 ACPI_BERT_ERROR_FATAL = 1,
171 ACPI_BERT_ERROR_CORRECTED = 2,
172 ACPI_BERT_ERROR_NONE = 3,
173 ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */
177 * Note: The generic error data that follows the ErrorSeverity field above
178 * uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below
182 /*******************************************************************************
184 * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
185 * Version 1
187 ******************************************************************************/
189 typedef struct acpi_table_cpep
191 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
192 UINT64 Reserved;
194 } ACPI_TABLE_CPEP;
197 /* Subtable */
199 typedef struct acpi_cpep_polling
201 ACPI_SUBTABLE_HEADER Header;
202 UINT8 Id; /* Processor ID */
203 UINT8 Eid; /* Processor EID */
204 UINT32 Interval; /* Polling interval (msec) */
206 } ACPI_CPEP_POLLING;
209 /*******************************************************************************
211 * ECDT - Embedded Controller Boot Resources Table
212 * Version 1
214 ******************************************************************************/
216 typedef struct acpi_table_ecdt
218 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
219 ACPI_GENERIC_ADDRESS Control; /* Address of EC command/status register */
220 ACPI_GENERIC_ADDRESS Data; /* Address of EC data register */
221 UINT32 Uid; /* Unique ID - must be same as the EC _UID method */
222 UINT8 Gpe; /* The GPE for the EC */
223 UINT8 Id[1]; /* Full namepath of the EC in the ACPI namespace */
225 } ACPI_TABLE_ECDT;
228 /*******************************************************************************
230 * EINJ - Error Injection Table (ACPI 4.0)
231 * Version 1
233 ******************************************************************************/
235 typedef struct acpi_table_einj
237 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
238 UINT32 HeaderLength;
239 UINT8 Flags;
240 UINT8 Reserved[3];
241 UINT32 Entries;
243 } ACPI_TABLE_EINJ;
246 /* EINJ Injection Instruction Entries (actions) */
248 typedef struct acpi_einj_entry
250 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
252 } ACPI_EINJ_ENTRY;
254 /* Masks for Flags field above */
256 #define ACPI_EINJ_PRESERVE (1)
258 /* Values for Action field above */
260 enum AcpiEinjActions
262 ACPI_EINJ_BEGIN_OPERATION = 0,
263 ACPI_EINJ_GET_TRIGGER_TABLE = 1,
264 ACPI_EINJ_SET_ERROR_TYPE = 2,
265 ACPI_EINJ_GET_ERROR_TYPE = 3,
266 ACPI_EINJ_END_OPERATION = 4,
267 ACPI_EINJ_EXECUTE_OPERATION = 5,
268 ACPI_EINJ_CHECK_BUSY_STATUS = 6,
269 ACPI_EINJ_GET_COMMAND_STATUS = 7,
270 ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
271 ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
272 ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */
273 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
276 /* Values for Instruction field above */
278 enum AcpiEinjInstructions
280 ACPI_EINJ_READ_REGISTER = 0,
281 ACPI_EINJ_READ_REGISTER_VALUE = 1,
282 ACPI_EINJ_WRITE_REGISTER = 2,
283 ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
284 ACPI_EINJ_NOOP = 4,
285 ACPI_EINJ_FLUSH_CACHELINE = 5,
286 ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */
289 typedef struct acpi_einj_error_type_with_addr
291 UINT32 ErrorType;
292 UINT32 VendorStructOffset;
293 UINT32 Flags;
294 UINT32 ApicId;
295 UINT64 Address;
296 UINT64 Range;
297 UINT32 PcieId;
299 } ACPI_EINJ_ERROR_TYPE_WITH_ADDR;
301 typedef struct acpi_einj_vendor
303 UINT32 Length;
304 UINT32 PcieId;
305 UINT16 VendorId;
306 UINT16 DeviceId;
307 UINT8 RevisionId;
308 UINT8 Reserved[3];
310 } ACPI_EINJ_VENDOR;
313 /* EINJ Trigger Error Action Table */
315 typedef struct acpi_einj_trigger
317 UINT32 HeaderSize;
318 UINT32 Revision;
319 UINT32 TableSize;
320 UINT32 EntryCount;
322 } ACPI_EINJ_TRIGGER;
324 /* Command status return values */
326 enum AcpiEinjCommandStatus
328 ACPI_EINJ_SUCCESS = 0,
329 ACPI_EINJ_FAILURE = 1,
330 ACPI_EINJ_INVALID_ACCESS = 2,
331 ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */
335 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
337 #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
338 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
339 #define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
340 #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
341 #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
342 #define ACPI_EINJ_MEMORY_FATAL (1<<5)
343 #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
344 #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
345 #define ACPI_EINJ_PCIX_FATAL (1<<8)
346 #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
347 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
348 #define ACPI_EINJ_PLATFORM_FATAL (1<<11)
349 #define ACPI_EINJ_VENDOR_DEFINED (1<<31)
352 /*******************************************************************************
354 * ERST - Error Record Serialization Table (ACPI 4.0)
355 * Version 1
357 ******************************************************************************/
359 typedef struct acpi_table_erst
361 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
362 UINT32 HeaderLength;
363 UINT32 Reserved;
364 UINT32 Entries;
366 } ACPI_TABLE_ERST;
369 /* ERST Serialization Entries (actions) */
371 typedef struct acpi_erst_entry
373 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
375 } ACPI_ERST_ENTRY;
377 /* Masks for Flags field above */
379 #define ACPI_ERST_PRESERVE (1)
381 /* Values for Action field above */
383 enum AcpiErstActions
385 ACPI_ERST_BEGIN_WRITE = 0,
386 ACPI_ERST_BEGIN_READ = 1,
387 ACPI_ERST_BEGIN_CLEAR = 2,
388 ACPI_ERST_END = 3,
389 ACPI_ERST_SET_RECORD_OFFSET = 4,
390 ACPI_ERST_EXECUTE_OPERATION = 5,
391 ACPI_ERST_CHECK_BUSY_STATUS = 6,
392 ACPI_ERST_GET_COMMAND_STATUS = 7,
393 ACPI_ERST_GET_RECORD_ID = 8,
394 ACPI_ERST_SET_RECORD_ID = 9,
395 ACPI_ERST_GET_RECORD_COUNT = 10,
396 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
397 ACPI_ERST_NOT_USED = 12,
398 ACPI_ERST_GET_ERROR_RANGE = 13,
399 ACPI_ERST_GET_ERROR_LENGTH = 14,
400 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
401 ACPI_ERST_EXECUTE_TIMINGS = 16,
402 ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */
405 /* Values for Instruction field above */
407 enum AcpiErstInstructions
409 ACPI_ERST_READ_REGISTER = 0,
410 ACPI_ERST_READ_REGISTER_VALUE = 1,
411 ACPI_ERST_WRITE_REGISTER = 2,
412 ACPI_ERST_WRITE_REGISTER_VALUE = 3,
413 ACPI_ERST_NOOP = 4,
414 ACPI_ERST_LOAD_VAR1 = 5,
415 ACPI_ERST_LOAD_VAR2 = 6,
416 ACPI_ERST_STORE_VAR1 = 7,
417 ACPI_ERST_ADD = 8,
418 ACPI_ERST_SUBTRACT = 9,
419 ACPI_ERST_ADD_VALUE = 10,
420 ACPI_ERST_SUBTRACT_VALUE = 11,
421 ACPI_ERST_STALL = 12,
422 ACPI_ERST_STALL_WHILE_TRUE = 13,
423 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
424 ACPI_ERST_GOTO = 15,
425 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
426 ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
427 ACPI_ERST_MOVE_DATA = 18,
428 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
431 /* Command status return values */
433 enum AcpiErstCommandStatus
435 ACPI_ERST_SUCESS = 0,
436 ACPI_ERST_NO_SPACE = 1,
437 ACPI_ERST_NOT_AVAILABLE = 2,
438 ACPI_ERST_FAILURE = 3,
439 ACPI_ERST_RECORD_EMPTY = 4,
440 ACPI_ERST_NOT_FOUND = 5,
441 ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */
445 /* Error Record Serialization Information */
447 typedef struct acpi_erst_info
449 UINT16 Signature; /* Should be "ER" */
450 UINT8 Data[48];
452 } ACPI_ERST_INFO;
455 /*******************************************************************************
457 * HEST - Hardware Error Source Table (ACPI 4.0)
458 * Version 1
460 ******************************************************************************/
462 typedef struct acpi_table_hest
464 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
465 UINT32 ErrorSourceCount;
467 } ACPI_TABLE_HEST;
470 /* HEST subtable header */
472 typedef struct acpi_hest_header
474 UINT16 Type;
475 UINT16 SourceId;
477 } ACPI_HEST_HEADER;
480 /* Values for Type field above for subtables */
482 enum AcpiHestTypes
484 ACPI_HEST_TYPE_IA32_CHECK = 0,
485 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
486 ACPI_HEST_TYPE_IA32_NMI = 2,
487 ACPI_HEST_TYPE_NOT_USED3 = 3,
488 ACPI_HEST_TYPE_NOT_USED4 = 4,
489 ACPI_HEST_TYPE_NOT_USED5 = 5,
490 ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
491 ACPI_HEST_TYPE_AER_ENDPOINT = 7,
492 ACPI_HEST_TYPE_AER_BRIDGE = 8,
493 ACPI_HEST_TYPE_GENERIC_ERROR = 9,
494 ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
495 ACPI_HEST_TYPE_RESERVED = 11 /* 11 and greater are reserved */
500 * HEST substructures contained in subtables
504 * IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and
505 * ACPI_HEST_IA_CORRECTED structures.
507 typedef struct acpi_hest_ia_error_bank
509 UINT8 BankNumber;
510 UINT8 ClearStatusOnInit;
511 UINT8 StatusFormat;
512 UINT8 Reserved;
513 UINT32 ControlRegister;
514 UINT64 ControlData;
515 UINT32 StatusRegister;
516 UINT32 AddressRegister;
517 UINT32 MiscRegister;
519 } ACPI_HEST_IA_ERROR_BANK;
522 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
524 typedef struct acpi_hest_aer_common
526 UINT16 Reserved1;
527 UINT8 Flags;
528 UINT8 Enabled;
529 UINT32 RecordsToPreallocate;
530 UINT32 MaxSectionsPerRecord;
531 UINT32 Bus; /* Bus and Segment numbers */
532 UINT16 Device;
533 UINT16 Function;
534 UINT16 DeviceControl;
535 UINT16 Reserved2;
536 UINT32 UncorrectableMask;
537 UINT32 UncorrectableSeverity;
538 UINT32 CorrectableMask;
539 UINT32 AdvancedCapabilities;
541 } ACPI_HEST_AER_COMMON;
543 /* Masks for HEST Flags fields */
545 #define ACPI_HEST_FIRMWARE_FIRST (1)
546 #define ACPI_HEST_GLOBAL (1<<1)
549 * Macros to access the bus/segment numbers in Bus field above:
550 * Bus number is encoded in bits 7:0
551 * Segment number is encoded in bits 23:8
553 #define ACPI_HEST_BUS(Bus) ((Bus) & 0xFF)
554 #define ACPI_HEST_SEGMENT(Bus) (((Bus) >> 8) & 0xFFFF)
557 /* Hardware Error Notification */
559 typedef struct acpi_hest_notify
561 UINT8 Type;
562 UINT8 Length;
563 UINT16 ConfigWriteEnable;
564 UINT32 PollInterval;
565 UINT32 Vector;
566 UINT32 PollingThresholdValue;
567 UINT32 PollingThresholdWindow;
568 UINT32 ErrorThresholdValue;
569 UINT32 ErrorThresholdWindow;
571 } ACPI_HEST_NOTIFY;
573 /* Values for Notify Type field above */
575 enum AcpiHestNotifyTypes
577 ACPI_HEST_NOTIFY_POLLED = 0,
578 ACPI_HEST_NOTIFY_EXTERNAL = 1,
579 ACPI_HEST_NOTIFY_LOCAL = 2,
580 ACPI_HEST_NOTIFY_SCI = 3,
581 ACPI_HEST_NOTIFY_NMI = 4,
582 ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */
583 ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */
584 ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */
585 ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */
586 ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */
587 ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */
588 ACPI_HEST_NOTIFY_RESERVED = 11 /* 11 and greater are reserved */
591 /* Values for ConfigWriteEnable bitfield above */
593 #define ACPI_HEST_TYPE (1)
594 #define ACPI_HEST_POLL_INTERVAL (1<<1)
595 #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
596 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
597 #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
598 #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
602 * HEST subtables
605 /* 0: IA32 Machine Check Exception */
607 typedef struct acpi_hest_ia_machine_check
609 ACPI_HEST_HEADER Header;
610 UINT16 Reserved1;
611 UINT8 Flags;
612 UINT8 Enabled;
613 UINT32 RecordsToPreallocate;
614 UINT32 MaxSectionsPerRecord;
615 UINT64 GlobalCapabilityData;
616 UINT64 GlobalControlData;
617 UINT8 NumHardwareBanks;
618 UINT8 Reserved3[7];
620 } ACPI_HEST_IA_MACHINE_CHECK;
623 /* 1: IA32 Corrected Machine Check */
625 typedef struct acpi_hest_ia_corrected
627 ACPI_HEST_HEADER Header;
628 UINT16 Reserved1;
629 UINT8 Flags;
630 UINT8 Enabled;
631 UINT32 RecordsToPreallocate;
632 UINT32 MaxSectionsPerRecord;
633 ACPI_HEST_NOTIFY Notify;
634 UINT8 NumHardwareBanks;
635 UINT8 Reserved2[3];
637 } ACPI_HEST_IA_CORRECTED;
640 /* 2: IA32 Non-Maskable Interrupt */
642 typedef struct acpi_hest_ia_nmi
644 ACPI_HEST_HEADER Header;
645 UINT32 Reserved;
646 UINT32 RecordsToPreallocate;
647 UINT32 MaxSectionsPerRecord;
648 UINT32 MaxRawDataLength;
650 } ACPI_HEST_IA_NMI;
653 /* 3,4,5: Not used */
655 /* 6: PCI Express Root Port AER */
657 typedef struct acpi_hest_aer_root
659 ACPI_HEST_HEADER Header;
660 ACPI_HEST_AER_COMMON Aer;
661 UINT32 RootErrorCommand;
663 } ACPI_HEST_AER_ROOT;
666 /* 7: PCI Express AER (AER Endpoint) */
668 typedef struct acpi_hest_aer
670 ACPI_HEST_HEADER Header;
671 ACPI_HEST_AER_COMMON Aer;
673 } ACPI_HEST_AER;
676 /* 8: PCI Express/PCI-X Bridge AER */
678 typedef struct acpi_hest_aer_bridge
680 ACPI_HEST_HEADER Header;
681 ACPI_HEST_AER_COMMON Aer;
682 UINT32 UncorrectableMask2;
683 UINT32 UncorrectableSeverity2;
684 UINT32 AdvancedCapabilities2;
686 } ACPI_HEST_AER_BRIDGE;
689 /* 9: Generic Hardware Error Source */
691 typedef struct acpi_hest_generic
693 ACPI_HEST_HEADER Header;
694 UINT16 RelatedSourceId;
695 UINT8 Reserved;
696 UINT8 Enabled;
697 UINT32 RecordsToPreallocate;
698 UINT32 MaxSectionsPerRecord;
699 UINT32 MaxRawDataLength;
700 ACPI_GENERIC_ADDRESS ErrorStatusAddress;
701 ACPI_HEST_NOTIFY Notify;
702 UINT32 ErrorBlockLength;
704 } ACPI_HEST_GENERIC;
707 /* 10: Generic Hardware Error Source, version 2 */
709 typedef struct acpi_hest_generic_v2
711 ACPI_HEST_HEADER Header;
712 UINT16 RelatedSourceId;
713 UINT8 Reserved;
714 UINT8 Enabled;
715 UINT32 RecordsToPreallocate;
716 UINT32 MaxSectionsPerRecord;
717 UINT32 MaxRawDataLength;
718 ACPI_GENERIC_ADDRESS ErrorStatusAddress;
719 ACPI_HEST_NOTIFY Notify;
720 UINT32 ErrorBlockLength;
721 ACPI_GENERIC_ADDRESS ReadAckRegister;
722 UINT64 ReadAckPreserve;
723 UINT64 ReadAckWrite;
725 } ACPI_HEST_GENERIC_V2;
728 /* Generic Error Status block */
730 typedef struct acpi_hest_generic_status
732 UINT32 BlockStatus;
733 UINT32 RawDataOffset;
734 UINT32 RawDataLength;
735 UINT32 DataLength;
736 UINT32 ErrorSeverity;
738 } ACPI_HEST_GENERIC_STATUS;
740 /* Values for BlockStatus flags above */
742 #define ACPI_HEST_UNCORRECTABLE (1)
743 #define ACPI_HEST_CORRECTABLE (1<<1)
744 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
745 #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
746 #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
749 /* Generic Error Data entry */
751 typedef struct acpi_hest_generic_data
753 UINT8 SectionType[16];
754 UINT32 ErrorSeverity;
755 UINT16 Revision;
756 UINT8 ValidationBits;
757 UINT8 Flags;
758 UINT32 ErrorDataLength;
759 UINT8 FruId[16];
760 UINT8 FruText[20];
762 } ACPI_HEST_GENERIC_DATA;
764 /* Extension for revision 0x0300 */
766 typedef struct acpi_hest_generic_data_v300
768 UINT8 SectionType[16];
769 UINT32 ErrorSeverity;
770 UINT16 Revision;
771 UINT8 ValidationBits;
772 UINT8 Flags;
773 UINT32 ErrorDataLength;
774 UINT8 FruId[16];
775 UINT8 FruText[20];
776 UINT64 TimeStamp;
778 } ACPI_HEST_GENERIC_DATA_V300;
780 /* Values for ErrorSeverity above */
782 #define ACPI_HEST_GEN_ERROR_RECOVERABLE 0
783 #define ACPI_HEST_GEN_ERROR_FATAL 1
784 #define ACPI_HEST_GEN_ERROR_CORRECTED 2
785 #define ACPI_HEST_GEN_ERROR_NONE 3
787 /* Flags for ValidationBits above */
789 #define ACPI_HEST_GEN_VALID_FRU_ID (1)
790 #define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1)
791 #define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2)
794 /*******************************************************************************
796 * MADT - Multiple APIC Description Table
797 * Version 3
799 ******************************************************************************/
801 typedef struct acpi_table_madt
803 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
804 UINT32 Address; /* Physical address of local APIC */
805 UINT32 Flags;
807 } ACPI_TABLE_MADT;
809 /* Masks for Flags field above */
811 #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
813 /* Values for PCATCompat flag */
815 #define ACPI_MADT_DUAL_PIC 0
816 #define ACPI_MADT_MULTIPLE_APIC 1
819 /* Values for MADT subtable type in ACPI_SUBTABLE_HEADER */
821 enum AcpiMadtType
823 ACPI_MADT_TYPE_LOCAL_APIC = 0,
824 ACPI_MADT_TYPE_IO_APIC = 1,
825 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,
826 ACPI_MADT_TYPE_NMI_SOURCE = 3,
827 ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,
828 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,
829 ACPI_MADT_TYPE_IO_SAPIC = 6,
830 ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
831 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
832 ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
833 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
834 ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11,
835 ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12,
836 ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13,
837 ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14,
838 ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15,
839 ACPI_MADT_TYPE_RESERVED = 16 /* 16 and greater are reserved */
844 * MADT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
847 /* 0: Processor Local APIC */
849 typedef struct acpi_madt_local_apic
851 ACPI_SUBTABLE_HEADER Header;
852 UINT8 ProcessorId; /* ACPI processor id */
853 UINT8 Id; /* Processor's local APIC id */
854 UINT32 LapicFlags;
856 } ACPI_MADT_LOCAL_APIC;
859 /* 1: IO APIC */
861 typedef struct acpi_madt_io_apic
863 ACPI_SUBTABLE_HEADER Header;
864 UINT8 Id; /* I/O APIC ID */
865 UINT8 Reserved; /* Reserved - must be zero */
866 UINT32 Address; /* APIC physical address */
867 UINT32 GlobalIrqBase; /* Global system interrupt where INTI lines start */
869 } ACPI_MADT_IO_APIC;
872 /* 2: Interrupt Override */
874 typedef struct acpi_madt_interrupt_override
876 ACPI_SUBTABLE_HEADER Header;
877 UINT8 Bus; /* 0 - ISA */
878 UINT8 SourceIrq; /* Interrupt source (IRQ) */
879 UINT32 GlobalIrq; /* Global system interrupt */
880 UINT16 IntiFlags;
882 } ACPI_MADT_INTERRUPT_OVERRIDE;
885 /* 3: NMI Source */
887 typedef struct acpi_madt_nmi_source
889 ACPI_SUBTABLE_HEADER Header;
890 UINT16 IntiFlags;
891 UINT32 GlobalIrq; /* Global system interrupt */
893 } ACPI_MADT_NMI_SOURCE;
896 /* 4: Local APIC NMI */
898 typedef struct acpi_madt_local_apic_nmi
900 ACPI_SUBTABLE_HEADER Header;
901 UINT8 ProcessorId; /* ACPI processor id */
902 UINT16 IntiFlags;
903 UINT8 Lint; /* LINTn to which NMI is connected */
905 } ACPI_MADT_LOCAL_APIC_NMI;
908 /* 5: Address Override */
910 typedef struct acpi_madt_local_apic_override
912 ACPI_SUBTABLE_HEADER Header;
913 UINT16 Reserved; /* Reserved, must be zero */
914 UINT64 Address; /* APIC physical address */
916 } ACPI_MADT_LOCAL_APIC_OVERRIDE;
919 /* 6: I/O Sapic */
921 typedef struct acpi_madt_io_sapic
923 ACPI_SUBTABLE_HEADER Header;
924 UINT8 Id; /* I/O SAPIC ID */
925 UINT8 Reserved; /* Reserved, must be zero */
926 UINT32 GlobalIrqBase; /* Global interrupt for SAPIC start */
927 UINT64 Address; /* SAPIC physical address */
929 } ACPI_MADT_IO_SAPIC;
932 /* 7: Local Sapic */
934 typedef struct acpi_madt_local_sapic
936 ACPI_SUBTABLE_HEADER Header;
937 UINT8 ProcessorId; /* ACPI processor id */
938 UINT8 Id; /* SAPIC ID */
939 UINT8 Eid; /* SAPIC EID */
940 UINT8 Reserved[3]; /* Reserved, must be zero */
941 UINT32 LapicFlags;
942 UINT32 Uid; /* Numeric UID - ACPI 3.0 */
943 char UidString[1]; /* String UID - ACPI 3.0 */
945 } ACPI_MADT_LOCAL_SAPIC;
948 /* 8: Platform Interrupt Source */
950 typedef struct acpi_madt_interrupt_source
952 ACPI_SUBTABLE_HEADER Header;
953 UINT16 IntiFlags;
954 UINT8 Type; /* 1=PMI, 2=INIT, 3=corrected */
955 UINT8 Id; /* Processor ID */
956 UINT8 Eid; /* Processor EID */
957 UINT8 IoSapicVector; /* Vector value for PMI interrupts */
958 UINT32 GlobalIrq; /* Global system interrupt */
959 UINT32 Flags; /* Interrupt Source Flags */
961 } ACPI_MADT_INTERRUPT_SOURCE;
963 /* Masks for Flags field above */
965 #define ACPI_MADT_CPEI_OVERRIDE (1)
968 /* 9: Processor Local X2APIC (ACPI 4.0) */
970 typedef struct acpi_madt_local_x2apic
972 ACPI_SUBTABLE_HEADER Header;
973 UINT16 Reserved; /* Reserved - must be zero */
974 UINT32 LocalApicId; /* Processor x2APIC ID */
975 UINT32 LapicFlags;
976 UINT32 Uid; /* ACPI processor UID */
978 } ACPI_MADT_LOCAL_X2APIC;
981 /* 10: Local X2APIC NMI (ACPI 4.0) */
983 typedef struct acpi_madt_local_x2apic_nmi
985 ACPI_SUBTABLE_HEADER Header;
986 UINT16 IntiFlags;
987 UINT32 Uid; /* ACPI processor UID */
988 UINT8 Lint; /* LINTn to which NMI is connected */
989 UINT8 Reserved[3]; /* Reserved - must be zero */
991 } ACPI_MADT_LOCAL_X2APIC_NMI;
994 /* 11: Generic Interrupt (ACPI 5.0 + ACPI 6.0 changes) */
996 typedef struct acpi_madt_generic_interrupt
998 ACPI_SUBTABLE_HEADER Header;
999 UINT16 Reserved; /* Reserved - must be zero */
1000 UINT32 CpuInterfaceNumber;
1001 UINT32 Uid;
1002 UINT32 Flags;
1003 UINT32 ParkingVersion;
1004 UINT32 PerformanceInterrupt;
1005 UINT64 ParkedAddress;
1006 UINT64 BaseAddress;
1007 UINT64 GicvBaseAddress;
1008 UINT64 GichBaseAddress;
1009 UINT32 VgicInterrupt;
1010 UINT64 GicrBaseAddress;
1011 UINT64 ArmMpidr;
1012 UINT8 EfficiencyClass;
1013 UINT8 Reserved2[3];
1015 } ACPI_MADT_GENERIC_INTERRUPT;
1017 /* Masks for Flags field above */
1019 /* ACPI_MADT_ENABLED (1) Processor is usable if set */
1020 #define ACPI_MADT_PERFORMANCE_IRQ_MODE (1<<1) /* 01: Performance Interrupt Mode */
1021 #define ACPI_MADT_VGIC_IRQ_MODE (1<<2) /* 02: VGIC Maintenance Interrupt mode */
1024 /* 12: Generic Distributor (ACPI 5.0 + ACPI 6.0 changes) */
1026 typedef struct acpi_madt_generic_distributor
1028 ACPI_SUBTABLE_HEADER Header;
1029 UINT16 Reserved; /* Reserved - must be zero */
1030 UINT32 GicId;
1031 UINT64 BaseAddress;
1032 UINT32 GlobalIrqBase;
1033 UINT8 Version;
1034 UINT8 Reserved2[3]; /* Reserved - must be zero */
1036 } ACPI_MADT_GENERIC_DISTRIBUTOR;
1038 /* Values for Version field above */
1040 enum AcpiMadtGicVersion
1042 ACPI_MADT_GIC_VERSION_NONE = 0,
1043 ACPI_MADT_GIC_VERSION_V1 = 1,
1044 ACPI_MADT_GIC_VERSION_V2 = 2,
1045 ACPI_MADT_GIC_VERSION_V3 = 3,
1046 ACPI_MADT_GIC_VERSION_V4 = 4,
1047 ACPI_MADT_GIC_VERSION_RESERVED = 5 /* 5 and greater are reserved */
1051 /* 13: Generic MSI Frame (ACPI 5.1) */
1053 typedef struct acpi_madt_generic_msi_frame
1055 ACPI_SUBTABLE_HEADER Header;
1056 UINT16 Reserved; /* Reserved - must be zero */
1057 UINT32 MsiFrameId;
1058 UINT64 BaseAddress;
1059 UINT32 Flags;
1060 UINT16 SpiCount;
1061 UINT16 SpiBase;
1063 } ACPI_MADT_GENERIC_MSI_FRAME;
1065 /* Masks for Flags field above */
1067 #define ACPI_MADT_OVERRIDE_SPI_VALUES (1)
1070 /* 14: Generic Redistributor (ACPI 5.1) */
1072 typedef struct acpi_madt_generic_redistributor
1074 ACPI_SUBTABLE_HEADER Header;
1075 UINT16 Reserved; /* reserved - must be zero */
1076 UINT64 BaseAddress;
1077 UINT32 Length;
1079 } ACPI_MADT_GENERIC_REDISTRIBUTOR;
1082 /* 15: Generic Translator (ACPI 6.0) */
1084 typedef struct acpi_madt_generic_translator
1086 ACPI_SUBTABLE_HEADER Header;
1087 UINT16 Reserved; /* reserved - must be zero */
1088 UINT32 TranslationId;
1089 UINT64 BaseAddress;
1090 UINT32 Reserved2;
1092 } ACPI_MADT_GENERIC_TRANSLATOR;
1096 * Common flags fields for MADT subtables
1099 /* MADT Local APIC flags */
1101 #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
1103 /* MADT MPS INTI flags (IntiFlags) */
1105 #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
1106 #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
1108 /* Values for MPS INTI flags */
1110 #define ACPI_MADT_POLARITY_CONFORMS 0
1111 #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
1112 #define ACPI_MADT_POLARITY_RESERVED 2
1113 #define ACPI_MADT_POLARITY_ACTIVE_LOW 3
1115 #define ACPI_MADT_TRIGGER_CONFORMS (0)
1116 #define ACPI_MADT_TRIGGER_EDGE (1<<2)
1117 #define ACPI_MADT_TRIGGER_RESERVED (2<<2)
1118 #define ACPI_MADT_TRIGGER_LEVEL (3<<2)
1121 /*******************************************************************************
1123 * MSCT - Maximum System Characteristics Table (ACPI 4.0)
1124 * Version 1
1126 ******************************************************************************/
1128 typedef struct acpi_table_msct
1130 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1131 UINT32 ProximityOffset; /* Location of proximity info struct(s) */
1132 UINT32 MaxProximityDomains;/* Max number of proximity domains */
1133 UINT32 MaxClockDomains; /* Max number of clock domains */
1134 UINT64 MaxAddress; /* Max physical address in system */
1136 } ACPI_TABLE_MSCT;
1139 /* Subtable - Maximum Proximity Domain Information. Version 1 */
1141 typedef struct acpi_msct_proximity
1143 UINT8 Revision;
1144 UINT8 Length;
1145 UINT32 RangeStart; /* Start of domain range */
1146 UINT32 RangeEnd; /* End of domain range */
1147 UINT32 ProcessorCapacity;
1148 UINT64 MemoryCapacity; /* In bytes */
1150 } ACPI_MSCT_PROXIMITY;
1153 /*******************************************************************************
1155 * NFIT - NVDIMM Interface Table (ACPI 6.0+)
1156 * Version 1
1158 ******************************************************************************/
1160 typedef struct acpi_table_nfit
1162 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1163 UINT32 Reserved; /* Reserved, must be zero */
1165 } ACPI_TABLE_NFIT;
1167 /* Subtable header for NFIT */
1169 typedef struct acpi_nfit_header
1171 UINT16 Type;
1172 UINT16 Length;
1174 } ACPI_NFIT_HEADER;
1177 /* Values for subtable type in ACPI_NFIT_HEADER */
1179 enum AcpiNfitType
1181 ACPI_NFIT_TYPE_SYSTEM_ADDRESS = 0,
1182 ACPI_NFIT_TYPE_MEMORY_MAP = 1,
1183 ACPI_NFIT_TYPE_INTERLEAVE = 2,
1184 ACPI_NFIT_TYPE_SMBIOS = 3,
1185 ACPI_NFIT_TYPE_CONTROL_REGION = 4,
1186 ACPI_NFIT_TYPE_DATA_REGION = 5,
1187 ACPI_NFIT_TYPE_FLUSH_ADDRESS = 6,
1188 ACPI_NFIT_TYPE_RESERVED = 7 /* 7 and greater are reserved */
1192 * NFIT Subtables
1195 /* 0: System Physical Address Range Structure */
1197 typedef struct acpi_nfit_system_address
1199 ACPI_NFIT_HEADER Header;
1200 UINT16 RangeIndex;
1201 UINT16 Flags;
1202 UINT32 Reserved; /* Reseved, must be zero */
1203 UINT32 ProximityDomain;
1204 UINT8 RangeGuid[16];
1205 UINT64 Address;
1206 UINT64 Length;
1207 UINT64 MemoryMapping;
1209 } ACPI_NFIT_SYSTEM_ADDRESS;
1211 /* Flags */
1213 #define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */
1214 #define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */
1216 /* Range Type GUIDs appear in the include/acuuid.h file */
1219 /* 1: Memory Device to System Address Range Map Structure */
1221 typedef struct acpi_nfit_memory_map
1223 ACPI_NFIT_HEADER Header;
1224 UINT32 DeviceHandle;
1225 UINT16 PhysicalId;
1226 UINT16 RegionId;
1227 UINT16 RangeIndex;
1228 UINT16 RegionIndex;
1229 UINT64 RegionSize;
1230 UINT64 RegionOffset;
1231 UINT64 Address;
1232 UINT16 InterleaveIndex;
1233 UINT16 InterleaveWays;
1234 UINT16 Flags;
1235 UINT16 Reserved; /* Reserved, must be zero */
1237 } ACPI_NFIT_MEMORY_MAP;
1239 /* Flags */
1241 #define ACPI_NFIT_MEM_SAVE_FAILED (1) /* 00: Last SAVE to Memory Device failed */
1242 #define ACPI_NFIT_MEM_RESTORE_FAILED (1<<1) /* 01: Last RESTORE from Memory Device failed */
1243 #define ACPI_NFIT_MEM_FLUSH_FAILED (1<<2) /* 02: Platform flush failed */
1244 #define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device is not armed */
1245 #define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device observed SMART/health events */
1246 #define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health events enabled */
1247 #define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to SPA failed */
1250 /* 2: Interleave Structure */
1252 typedef struct acpi_nfit_interleave
1254 ACPI_NFIT_HEADER Header;
1255 UINT16 InterleaveIndex;
1256 UINT16 Reserved; /* Reserved, must be zero */
1257 UINT32 LineCount;
1258 UINT32 LineSize;
1259 UINT32 LineOffset[1]; /* Variable length */
1261 } ACPI_NFIT_INTERLEAVE;
1264 /* 3: SMBIOS Management Information Structure */
1266 typedef struct acpi_nfit_smbios
1268 ACPI_NFIT_HEADER Header;
1269 UINT32 Reserved; /* Reserved, must be zero */
1270 UINT8 Data[1]; /* Variable length */
1272 } ACPI_NFIT_SMBIOS;
1275 /* 4: NVDIMM Control Region Structure */
1277 typedef struct acpi_nfit_control_region
1279 ACPI_NFIT_HEADER Header;
1280 UINT16 RegionIndex;
1281 UINT16 VendorId;
1282 UINT16 DeviceId;
1283 UINT16 RevisionId;
1284 UINT16 SubsystemVendorId;
1285 UINT16 SubsystemDeviceId;
1286 UINT16 SubsystemRevisionId;
1287 UINT8 ValidFields;
1288 UINT8 ManufacturingLocation;
1289 UINT16 ManufacturingDate;
1290 UINT8 Reserved[2]; /* Reserved, must be zero */
1291 UINT32 SerialNumber;
1292 UINT16 Code;
1293 UINT16 Windows;
1294 UINT64 WindowSize;
1295 UINT64 CommandOffset;
1296 UINT64 CommandSize;
1297 UINT64 StatusOffset;
1298 UINT64 StatusSize;
1299 UINT16 Flags;
1300 UINT8 Reserved1[6]; /* Reserved, must be zero */
1302 } ACPI_NFIT_CONTROL_REGION;
1304 /* Flags */
1306 #define ACPI_NFIT_CONTROL_BUFFERED (1) /* Block Data Windows implementation is buffered */
1308 /* ValidFields bits */
1310 #define ACPI_NFIT_CONTROL_MFG_INFO_VALID (1) /* Manufacturing fields are valid */
1313 /* 5: NVDIMM Block Data Window Region Structure */
1315 typedef struct acpi_nfit_data_region
1317 ACPI_NFIT_HEADER Header;
1318 UINT16 RegionIndex;
1319 UINT16 Windows;
1320 UINT64 Offset;
1321 UINT64 Size;
1322 UINT64 Capacity;
1323 UINT64 StartAddress;
1325 } ACPI_NFIT_DATA_REGION;
1328 /* 6: Flush Hint Address Structure */
1330 typedef struct acpi_nfit_flush_address
1332 ACPI_NFIT_HEADER Header;
1333 UINT32 DeviceHandle;
1334 UINT16 HintCount;
1335 UINT8 Reserved[6]; /* Reserved, must be zero */
1336 UINT64 HintAddress[1]; /* Variable length */
1338 } ACPI_NFIT_FLUSH_ADDRESS;
1341 /*******************************************************************************
1343 * SBST - Smart Battery Specification Table
1344 * Version 1
1346 ******************************************************************************/
1348 typedef struct acpi_table_sbst
1350 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1351 UINT32 WarningLevel;
1352 UINT32 LowLevel;
1353 UINT32 CriticalLevel;
1355 } ACPI_TABLE_SBST;
1358 /*******************************************************************************
1360 * SLIT - System Locality Distance Information Table
1361 * Version 1
1363 ******************************************************************************/
1365 typedef struct acpi_table_slit
1367 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1368 UINT64 LocalityCount;
1369 UINT8 Entry[1]; /* Real size = localities^2 */
1371 } ACPI_TABLE_SLIT;
1374 /*******************************************************************************
1376 * SRAT - System Resource Affinity Table
1377 * Version 3
1379 ******************************************************************************/
1381 typedef struct acpi_table_srat
1383 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1384 UINT32 TableRevision; /* Must be value '1' */
1385 UINT64 Reserved; /* Reserved, must be zero */
1387 } ACPI_TABLE_SRAT;
1389 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
1391 enum AcpiSratType
1393 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
1394 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
1395 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
1396 ACPI_SRAT_TYPE_GICC_AFFINITY = 3,
1397 ACPI_SRAT_TYPE_RESERVED = 4 /* 4 and greater are reserved */
1401 * SRAT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
1404 /* 0: Processor Local APIC/SAPIC Affinity */
1406 typedef struct acpi_srat_cpu_affinity
1408 ACPI_SUBTABLE_HEADER Header;
1409 UINT8 ProximityDomainLo;
1410 UINT8 ApicId;
1411 UINT32 Flags;
1412 UINT8 LocalSapicEid;
1413 UINT8 ProximityDomainHi[3];
1414 UINT32 ClockDomain;
1416 } ACPI_SRAT_CPU_AFFINITY;
1418 /* Flags */
1420 #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */
1423 /* 1: Memory Affinity */
1425 typedef struct acpi_srat_mem_affinity
1427 ACPI_SUBTABLE_HEADER Header;
1428 UINT32 ProximityDomain;
1429 UINT16 Reserved; /* Reserved, must be zero */
1430 UINT64 BaseAddress;
1431 UINT64 Length;
1432 UINT32 Reserved1;
1433 UINT32 Flags;
1434 UINT64 Reserved2; /* Reserved, must be zero */
1436 } ACPI_SRAT_MEM_AFFINITY;
1438 /* Flags */
1440 #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
1441 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
1442 #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
1445 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
1447 typedef struct acpi_srat_x2apic_cpu_affinity
1449 ACPI_SUBTABLE_HEADER Header;
1450 UINT16 Reserved; /* Reserved, must be zero */
1451 UINT32 ProximityDomain;
1452 UINT32 ApicId;
1453 UINT32 Flags;
1454 UINT32 ClockDomain;
1455 UINT32 Reserved2;
1457 } ACPI_SRAT_X2APIC_CPU_AFFINITY;
1459 /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
1461 #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1464 /* 3: GICC Affinity (ACPI 5.1) */
1466 typedef struct acpi_srat_gicc_affinity
1468 ACPI_SUBTABLE_HEADER Header;
1469 UINT32 ProximityDomain;
1470 UINT32 AcpiProcessorUid;
1471 UINT32 Flags;
1472 UINT32 ClockDomain;
1474 } ACPI_SRAT_GICC_AFFINITY;
1476 /* Flags for ACPI_SRAT_GICC_AFFINITY */
1478 #define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */
1481 /* Reset to default packing */
1483 #pragma pack()
1485 #endif /* __ACTBL1_H__ */