Fixed compatibility of output.
[AROS.git] / arch / all-pc / acpica / source / include / actbl1.h
blob67579da49b83e77ccb58a96f34028c088de1882b
1 /******************************************************************************
3 * Name: actbl1.h - Additional ACPI table definitions
5 *****************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2013, 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 */
79 * All tables must be byte-packed to match the ACPI specification, since
80 * the tables are provided by the system BIOS.
82 #pragma pack(1)
85 * Note: C bitfields are not used for this reason:
87 * "Bitfields are great and easy to read, but unfortunately the C language
88 * does not specify the layout of bitfields in memory, which means they are
89 * essentially useless for dealing with packed data in on-disk formats or
90 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
91 * this decision was a design error in C. Ritchie could have picked an order
92 * and stuck with it." Norman Ramsey.
93 * See http://stackoverflow.com/a/1053662/41661
97 /*******************************************************************************
99 * Common subtable headers
101 ******************************************************************************/
103 /* Generic subtable header (used in MADT, SRAT, etc.) */
105 typedef struct acpi_subtable_header
107 UINT8 Type;
108 UINT8 Length;
110 } ACPI_SUBTABLE_HEADER;
113 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
115 typedef struct acpi_whea_header
117 UINT8 Action;
118 UINT8 Instruction;
119 UINT8 Flags;
120 UINT8 Reserved;
121 ACPI_GENERIC_ADDRESS RegisterRegion;
122 UINT64 Value; /* Value used with Read/Write register */
123 UINT64 Mask; /* Bitmask required for this register instruction */
125 } ACPI_WHEA_HEADER;
128 /*******************************************************************************
130 * BERT - Boot Error Record Table (ACPI 4.0)
131 * Version 1
133 ******************************************************************************/
135 typedef struct acpi_table_bert
137 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
138 UINT32 RegionLength; /* Length of the boot error region */
139 UINT64 Address; /* Physical address of the error region */
141 } ACPI_TABLE_BERT;
144 /* Boot Error Region (not a subtable, pointed to by Address field above) */
146 typedef struct acpi_bert_region
148 UINT32 BlockStatus; /* Type of error information */
149 UINT32 RawDataOffset; /* Offset to raw error data */
150 UINT32 RawDataLength; /* Length of raw error data */
151 UINT32 DataLength; /* Length of generic error data */
152 UINT32 ErrorSeverity; /* Severity code */
154 } ACPI_BERT_REGION;
156 /* Values for BlockStatus flags above */
158 #define ACPI_BERT_UNCORRECTABLE (1)
159 #define ACPI_BERT_CORRECTABLE (1<<1)
160 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
161 #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
162 #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
164 /* Values for ErrorSeverity above */
166 enum AcpiBertErrorSeverity
168 ACPI_BERT_ERROR_CORRECTABLE = 0,
169 ACPI_BERT_ERROR_FATAL = 1,
170 ACPI_BERT_ERROR_CORRECTED = 2,
171 ACPI_BERT_ERROR_NONE = 3,
172 ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */
176 * Note: The generic error data that follows the ErrorSeverity field above
177 * uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below
181 /*******************************************************************************
183 * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
184 * Version 1
186 ******************************************************************************/
188 typedef struct acpi_table_cpep
190 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
191 UINT64 Reserved;
193 } ACPI_TABLE_CPEP;
196 /* Subtable */
198 typedef struct acpi_cpep_polling
200 ACPI_SUBTABLE_HEADER Header;
201 UINT8 Id; /* Processor ID */
202 UINT8 Eid; /* Processor EID */
203 UINT32 Interval; /* Polling interval (msec) */
205 } ACPI_CPEP_POLLING;
208 /*******************************************************************************
210 * ECDT - Embedded Controller Boot Resources Table
211 * Version 1
213 ******************************************************************************/
215 typedef struct acpi_table_ecdt
217 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
218 ACPI_GENERIC_ADDRESS Control; /* Address of EC command/status register */
219 ACPI_GENERIC_ADDRESS Data; /* Address of EC data register */
220 UINT32 Uid; /* Unique ID - must be same as the EC _UID method */
221 UINT8 Gpe; /* The GPE for the EC */
222 UINT8 Id[1]; /* Full namepath of the EC in the ACPI namespace */
224 } ACPI_TABLE_ECDT;
227 /*******************************************************************************
229 * EINJ - Error Injection Table (ACPI 4.0)
230 * Version 1
232 ******************************************************************************/
234 typedef struct acpi_table_einj
236 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
237 UINT32 HeaderLength;
238 UINT8 Flags;
239 UINT8 Reserved[3];
240 UINT32 Entries;
242 } ACPI_TABLE_EINJ;
245 /* EINJ Injection Instruction Entries (actions) */
247 typedef struct acpi_einj_entry
249 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
251 } ACPI_EINJ_ENTRY;
253 /* Masks for Flags field above */
255 #define ACPI_EINJ_PRESERVE (1)
257 /* Values for Action field above */
259 enum AcpiEinjActions
261 ACPI_EINJ_BEGIN_OPERATION = 0,
262 ACPI_EINJ_GET_TRIGGER_TABLE = 1,
263 ACPI_EINJ_SET_ERROR_TYPE = 2,
264 ACPI_EINJ_GET_ERROR_TYPE = 3,
265 ACPI_EINJ_END_OPERATION = 4,
266 ACPI_EINJ_EXECUTE_OPERATION = 5,
267 ACPI_EINJ_CHECK_BUSY_STATUS = 6,
268 ACPI_EINJ_GET_COMMAND_STATUS = 7,
269 ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
270 ACPI_EINJ_ACTION_RESERVED = 9, /* 9 and greater are reserved */
271 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
274 /* Values for Instruction field above */
276 enum AcpiEinjInstructions
278 ACPI_EINJ_READ_REGISTER = 0,
279 ACPI_EINJ_READ_REGISTER_VALUE = 1,
280 ACPI_EINJ_WRITE_REGISTER = 2,
281 ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
282 ACPI_EINJ_NOOP = 4,
283 ACPI_EINJ_FLUSH_CACHELINE = 5,
284 ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */
287 typedef struct acpi_einj_error_type_with_addr
289 UINT32 ErrorType;
290 UINT32 VendorStructOffset;
291 UINT32 Flags;
292 UINT32 ApicId;
293 UINT64 Address;
294 UINT64 Range;
295 UINT32 PcieId;
297 } ACPI_EINJ_ERROR_TYPE_WITH_ADDR;
299 typedef struct acpi_einj_vendor
301 UINT32 Length;
302 UINT32 PcieId;
303 UINT16 VendorId;
304 UINT16 DeviceId;
305 UINT8 RevisionId;
306 UINT8 Reserved[3];
308 } ACPI_EINJ_VENDOR;
311 /* EINJ Trigger Error Action Table */
313 typedef struct acpi_einj_trigger
315 UINT32 HeaderSize;
316 UINT32 Revision;
317 UINT32 TableSize;
318 UINT32 EntryCount;
320 } ACPI_EINJ_TRIGGER;
322 /* Command status return values */
324 enum AcpiEinjCommandStatus
326 ACPI_EINJ_SUCCESS = 0,
327 ACPI_EINJ_FAILURE = 1,
328 ACPI_EINJ_INVALID_ACCESS = 2,
329 ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */
333 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
335 #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
336 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
337 #define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
338 #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
339 #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
340 #define ACPI_EINJ_MEMORY_FATAL (1<<5)
341 #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
342 #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
343 #define ACPI_EINJ_PCIX_FATAL (1<<8)
344 #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
345 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
346 #define ACPI_EINJ_PLATFORM_FATAL (1<<11)
347 #define ACPI_EINJ_VENDOR_DEFINED (1<<31)
350 /*******************************************************************************
352 * ERST - Error Record Serialization Table (ACPI 4.0)
353 * Version 1
355 ******************************************************************************/
357 typedef struct acpi_table_erst
359 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
360 UINT32 HeaderLength;
361 UINT32 Reserved;
362 UINT32 Entries;
364 } ACPI_TABLE_ERST;
367 /* ERST Serialization Entries (actions) */
369 typedef struct acpi_erst_entry
371 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
373 } ACPI_ERST_ENTRY;
375 /* Masks for Flags field above */
377 #define ACPI_ERST_PRESERVE (1)
379 /* Values for Action field above */
381 enum AcpiErstActions
383 ACPI_ERST_BEGIN_WRITE = 0,
384 ACPI_ERST_BEGIN_READ = 1,
385 ACPI_ERST_BEGIN_CLEAR = 2,
386 ACPI_ERST_END = 3,
387 ACPI_ERST_SET_RECORD_OFFSET = 4,
388 ACPI_ERST_EXECUTE_OPERATION = 5,
389 ACPI_ERST_CHECK_BUSY_STATUS = 6,
390 ACPI_ERST_GET_COMMAND_STATUS = 7,
391 ACPI_ERST_GET_RECORD_ID = 8,
392 ACPI_ERST_SET_RECORD_ID = 9,
393 ACPI_ERST_GET_RECORD_COUNT = 10,
394 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
395 ACPI_ERST_NOT_USED = 12,
396 ACPI_ERST_GET_ERROR_RANGE = 13,
397 ACPI_ERST_GET_ERROR_LENGTH = 14,
398 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
399 ACPI_ERST_ACTION_RESERVED = 16 /* 16 and greater are reserved */
402 /* Values for Instruction field above */
404 enum AcpiErstInstructions
406 ACPI_ERST_READ_REGISTER = 0,
407 ACPI_ERST_READ_REGISTER_VALUE = 1,
408 ACPI_ERST_WRITE_REGISTER = 2,
409 ACPI_ERST_WRITE_REGISTER_VALUE = 3,
410 ACPI_ERST_NOOP = 4,
411 ACPI_ERST_LOAD_VAR1 = 5,
412 ACPI_ERST_LOAD_VAR2 = 6,
413 ACPI_ERST_STORE_VAR1 = 7,
414 ACPI_ERST_ADD = 8,
415 ACPI_ERST_SUBTRACT = 9,
416 ACPI_ERST_ADD_VALUE = 10,
417 ACPI_ERST_SUBTRACT_VALUE = 11,
418 ACPI_ERST_STALL = 12,
419 ACPI_ERST_STALL_WHILE_TRUE = 13,
420 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
421 ACPI_ERST_GOTO = 15,
422 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
423 ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
424 ACPI_ERST_MOVE_DATA = 18,
425 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
428 /* Command status return values */
430 enum AcpiErstCommandStatus
432 ACPI_ERST_SUCESS = 0,
433 ACPI_ERST_NO_SPACE = 1,
434 ACPI_ERST_NOT_AVAILABLE = 2,
435 ACPI_ERST_FAILURE = 3,
436 ACPI_ERST_RECORD_EMPTY = 4,
437 ACPI_ERST_NOT_FOUND = 5,
438 ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */
442 /* Error Record Serialization Information */
444 typedef struct acpi_erst_info
446 UINT16 Signature; /* Should be "ER" */
447 UINT8 Data[48];
449 } ACPI_ERST_INFO;
452 /*******************************************************************************
454 * HEST - Hardware Error Source Table (ACPI 4.0)
455 * Version 1
457 ******************************************************************************/
459 typedef struct acpi_table_hest
461 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
462 UINT32 ErrorSourceCount;
464 } ACPI_TABLE_HEST;
467 /* HEST subtable header */
469 typedef struct acpi_hest_header
471 UINT16 Type;
472 UINT16 SourceId;
474 } ACPI_HEST_HEADER;
477 /* Values for Type field above for subtables */
479 enum AcpiHestTypes
481 ACPI_HEST_TYPE_IA32_CHECK = 0,
482 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
483 ACPI_HEST_TYPE_IA32_NMI = 2,
484 ACPI_HEST_TYPE_NOT_USED3 = 3,
485 ACPI_HEST_TYPE_NOT_USED4 = 4,
486 ACPI_HEST_TYPE_NOT_USED5 = 5,
487 ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
488 ACPI_HEST_TYPE_AER_ENDPOINT = 7,
489 ACPI_HEST_TYPE_AER_BRIDGE = 8,
490 ACPI_HEST_TYPE_GENERIC_ERROR = 9,
491 ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */
496 * HEST substructures contained in subtables
500 * IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and
501 * ACPI_HEST_IA_CORRECTED structures.
503 typedef struct acpi_hest_ia_error_bank
505 UINT8 BankNumber;
506 UINT8 ClearStatusOnInit;
507 UINT8 StatusFormat;
508 UINT8 Reserved;
509 UINT32 ControlRegister;
510 UINT64 ControlData;
511 UINT32 StatusRegister;
512 UINT32 AddressRegister;
513 UINT32 MiscRegister;
515 } ACPI_HEST_IA_ERROR_BANK;
518 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
520 typedef struct acpi_hest_aer_common
522 UINT16 Reserved1;
523 UINT8 Flags;
524 UINT8 Enabled;
525 UINT32 RecordsToPreallocate;
526 UINT32 MaxSectionsPerRecord;
527 UINT32 Bus;
528 UINT16 Device;
529 UINT16 Function;
530 UINT16 DeviceControl;
531 UINT16 Reserved2;
532 UINT32 UncorrectableMask;
533 UINT32 UncorrectableSeverity;
534 UINT32 CorrectableMask;
535 UINT32 AdvancedCapabilities;
537 } ACPI_HEST_AER_COMMON;
539 /* Masks for HEST Flags fields */
541 #define ACPI_HEST_FIRMWARE_FIRST (1)
542 #define ACPI_HEST_GLOBAL (1<<1)
545 /* Hardware Error Notification */
547 typedef struct acpi_hest_notify
549 UINT8 Type;
550 UINT8 Length;
551 UINT16 ConfigWriteEnable;
552 UINT32 PollInterval;
553 UINT32 Vector;
554 UINT32 PollingThresholdValue;
555 UINT32 PollingThresholdWindow;
556 UINT32 ErrorThresholdValue;
557 UINT32 ErrorThresholdWindow;
559 } ACPI_HEST_NOTIFY;
561 /* Values for Notify Type field above */
563 enum AcpiHestNotifyTypes
565 ACPI_HEST_NOTIFY_POLLED = 0,
566 ACPI_HEST_NOTIFY_EXTERNAL = 1,
567 ACPI_HEST_NOTIFY_LOCAL = 2,
568 ACPI_HEST_NOTIFY_SCI = 3,
569 ACPI_HEST_NOTIFY_NMI = 4,
570 ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */
571 ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */
572 ACPI_HEST_NOTIFY_RESERVED = 7 /* 7 and greater are reserved */
575 /* Values for ConfigWriteEnable bitfield above */
577 #define ACPI_HEST_TYPE (1)
578 #define ACPI_HEST_POLL_INTERVAL (1<<1)
579 #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
580 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
581 #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
582 #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
586 * HEST subtables
589 /* 0: IA32 Machine Check Exception */
591 typedef struct acpi_hest_ia_machine_check
593 ACPI_HEST_HEADER Header;
594 UINT16 Reserved1;
595 UINT8 Flags;
596 UINT8 Enabled;
597 UINT32 RecordsToPreallocate;
598 UINT32 MaxSectionsPerRecord;
599 UINT64 GlobalCapabilityData;
600 UINT64 GlobalControlData;
601 UINT8 NumHardwareBanks;
602 UINT8 Reserved3[7];
604 } ACPI_HEST_IA_MACHINE_CHECK;
607 /* 1: IA32 Corrected Machine Check */
609 typedef struct acpi_hest_ia_corrected
611 ACPI_HEST_HEADER Header;
612 UINT16 Reserved1;
613 UINT8 Flags;
614 UINT8 Enabled;
615 UINT32 RecordsToPreallocate;
616 UINT32 MaxSectionsPerRecord;
617 ACPI_HEST_NOTIFY Notify;
618 UINT8 NumHardwareBanks;
619 UINT8 Reserved2[3];
621 } ACPI_HEST_IA_CORRECTED;
624 /* 2: IA32 Non-Maskable Interrupt */
626 typedef struct acpi_hest_ia_nmi
628 ACPI_HEST_HEADER Header;
629 UINT32 Reserved;
630 UINT32 RecordsToPreallocate;
631 UINT32 MaxSectionsPerRecord;
632 UINT32 MaxRawDataLength;
634 } ACPI_HEST_IA_NMI;
637 /* 3,4,5: Not used */
639 /* 6: PCI Express Root Port AER */
641 typedef struct acpi_hest_aer_root
643 ACPI_HEST_HEADER Header;
644 ACPI_HEST_AER_COMMON Aer;
645 UINT32 RootErrorCommand;
647 } ACPI_HEST_AER_ROOT;
650 /* 7: PCI Express AER (AER Endpoint) */
652 typedef struct acpi_hest_aer
654 ACPI_HEST_HEADER Header;
655 ACPI_HEST_AER_COMMON Aer;
657 } ACPI_HEST_AER;
660 /* 8: PCI Express/PCI-X Bridge AER */
662 typedef struct acpi_hest_aer_bridge
664 ACPI_HEST_HEADER Header;
665 ACPI_HEST_AER_COMMON Aer;
666 UINT32 UncorrectableMask2;
667 UINT32 UncorrectableSeverity2;
668 UINT32 AdvancedCapabilities2;
670 } ACPI_HEST_AER_BRIDGE;
673 /* 9: Generic Hardware Error Source */
675 typedef struct acpi_hest_generic
677 ACPI_HEST_HEADER Header;
678 UINT16 RelatedSourceId;
679 UINT8 Reserved;
680 UINT8 Enabled;
681 UINT32 RecordsToPreallocate;
682 UINT32 MaxSectionsPerRecord;
683 UINT32 MaxRawDataLength;
684 ACPI_GENERIC_ADDRESS ErrorStatusAddress;
685 ACPI_HEST_NOTIFY Notify;
686 UINT32 ErrorBlockLength;
688 } ACPI_HEST_GENERIC;
691 /* Generic Error Status block */
693 typedef struct acpi_hest_generic_status
695 UINT32 BlockStatus;
696 UINT32 RawDataOffset;
697 UINT32 RawDataLength;
698 UINT32 DataLength;
699 UINT32 ErrorSeverity;
701 } ACPI_HEST_GENERIC_STATUS;
703 /* Values for BlockStatus flags above */
705 #define ACPI_HEST_UNCORRECTABLE (1)
706 #define ACPI_HEST_CORRECTABLE (1<<1)
707 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
708 #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
709 #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
712 /* Generic Error Data entry */
714 typedef struct acpi_hest_generic_data
716 UINT8 SectionType[16];
717 UINT32 ErrorSeverity;
718 UINT16 Revision;
719 UINT8 ValidationBits;
720 UINT8 Flags;
721 UINT32 ErrorDataLength;
722 UINT8 FruId[16];
723 UINT8 FruText[20];
725 } ACPI_HEST_GENERIC_DATA;
728 /*******************************************************************************
730 * MADT - Multiple APIC Description Table
731 * Version 3
733 ******************************************************************************/
735 typedef struct acpi_table_madt
737 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
738 UINT32 Address; /* Physical address of local APIC */
739 UINT32 Flags;
741 } ACPI_TABLE_MADT;
743 /* Masks for Flags field above */
745 #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
747 /* Values for PCATCompat flag */
749 #define ACPI_MADT_DUAL_PIC 0
750 #define ACPI_MADT_MULTIPLE_APIC 1
753 /* Values for MADT subtable type in ACPI_SUBTABLE_HEADER */
755 enum AcpiMadtType
757 ACPI_MADT_TYPE_LOCAL_APIC = 0,
758 ACPI_MADT_TYPE_IO_APIC = 1,
759 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,
760 ACPI_MADT_TYPE_NMI_SOURCE = 3,
761 ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,
762 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,
763 ACPI_MADT_TYPE_IO_SAPIC = 6,
764 ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
765 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
766 ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
767 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
768 ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11,
769 ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12,
770 ACPI_MADT_TYPE_RESERVED = 13 /* 13 and greater are reserved */
775 * MADT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
778 /* 0: Processor Local APIC */
780 typedef struct acpi_madt_local_apic
782 ACPI_SUBTABLE_HEADER Header;
783 UINT8 ProcessorId; /* ACPI processor id */
784 UINT8 Id; /* Processor's local APIC id */
785 UINT32 LapicFlags;
787 } ACPI_MADT_LOCAL_APIC;
790 /* 1: IO APIC */
792 typedef struct acpi_madt_io_apic
794 ACPI_SUBTABLE_HEADER Header;
795 UINT8 Id; /* I/O APIC ID */
796 UINT8 Reserved; /* Reserved - must be zero */
797 UINT32 Address; /* APIC physical address */
798 UINT32 GlobalIrqBase; /* Global system interrupt where INTI lines start */
800 } ACPI_MADT_IO_APIC;
803 /* 2: Interrupt Override */
805 typedef struct acpi_madt_interrupt_override
807 ACPI_SUBTABLE_HEADER Header;
808 UINT8 Bus; /* 0 - ISA */
809 UINT8 SourceIrq; /* Interrupt source (IRQ) */
810 UINT32 GlobalIrq; /* Global system interrupt */
811 UINT16 IntiFlags;
813 } ACPI_MADT_INTERRUPT_OVERRIDE;
816 /* 3: NMI Source */
818 typedef struct acpi_madt_nmi_source
820 ACPI_SUBTABLE_HEADER Header;
821 UINT16 IntiFlags;
822 UINT32 GlobalIrq; /* Global system interrupt */
824 } ACPI_MADT_NMI_SOURCE;
827 /* 4: Local APIC NMI */
829 typedef struct acpi_madt_local_apic_nmi
831 ACPI_SUBTABLE_HEADER Header;
832 UINT8 ProcessorId; /* ACPI processor id */
833 UINT16 IntiFlags;
834 UINT8 Lint; /* LINTn to which NMI is connected */
836 } ACPI_MADT_LOCAL_APIC_NMI;
839 /* 5: Address Override */
841 typedef struct acpi_madt_local_apic_override
843 ACPI_SUBTABLE_HEADER Header;
844 UINT16 Reserved; /* Reserved, must be zero */
845 UINT64 Address; /* APIC physical address */
847 } ACPI_MADT_LOCAL_APIC_OVERRIDE;
850 /* 6: I/O Sapic */
852 typedef struct acpi_madt_io_sapic
854 ACPI_SUBTABLE_HEADER Header;
855 UINT8 Id; /* I/O SAPIC ID */
856 UINT8 Reserved; /* Reserved, must be zero */
857 UINT32 GlobalIrqBase; /* Global interrupt for SAPIC start */
858 UINT64 Address; /* SAPIC physical address */
860 } ACPI_MADT_IO_SAPIC;
863 /* 7: Local Sapic */
865 typedef struct acpi_madt_local_sapic
867 ACPI_SUBTABLE_HEADER Header;
868 UINT8 ProcessorId; /* ACPI processor id */
869 UINT8 Id; /* SAPIC ID */
870 UINT8 Eid; /* SAPIC EID */
871 UINT8 Reserved[3]; /* Reserved, must be zero */
872 UINT32 LapicFlags;
873 UINT32 Uid; /* Numeric UID - ACPI 3.0 */
874 char UidString[1]; /* String UID - ACPI 3.0 */
876 } ACPI_MADT_LOCAL_SAPIC;
879 /* 8: Platform Interrupt Source */
881 typedef struct acpi_madt_interrupt_source
883 ACPI_SUBTABLE_HEADER Header;
884 UINT16 IntiFlags;
885 UINT8 Type; /* 1=PMI, 2=INIT, 3=corrected */
886 UINT8 Id; /* Processor ID */
887 UINT8 Eid; /* Processor EID */
888 UINT8 IoSapicVector; /* Vector value for PMI interrupts */
889 UINT32 GlobalIrq; /* Global system interrupt */
890 UINT32 Flags; /* Interrupt Source Flags */
892 } ACPI_MADT_INTERRUPT_SOURCE;
894 /* Masks for Flags field above */
896 #define ACPI_MADT_CPEI_OVERRIDE (1)
899 /* 9: Processor Local X2APIC (ACPI 4.0) */
901 typedef struct acpi_madt_local_x2apic
903 ACPI_SUBTABLE_HEADER Header;
904 UINT16 Reserved; /* Reserved - must be zero */
905 UINT32 LocalApicId; /* Processor x2APIC ID */
906 UINT32 LapicFlags;
907 UINT32 Uid; /* ACPI processor UID */
909 } ACPI_MADT_LOCAL_X2APIC;
912 /* 10: Local X2APIC NMI (ACPI 4.0) */
914 typedef struct acpi_madt_local_x2apic_nmi
916 ACPI_SUBTABLE_HEADER Header;
917 UINT16 IntiFlags;
918 UINT32 Uid; /* ACPI processor UID */
919 UINT8 Lint; /* LINTn to which NMI is connected */
920 UINT8 Reserved[3]; /* Reserved - must be zero */
922 } ACPI_MADT_LOCAL_X2APIC_NMI;
925 /* 11: Generic Interrupt (ACPI 5.0) */
927 typedef struct acpi_madt_generic_interrupt
929 ACPI_SUBTABLE_HEADER Header;
930 UINT16 Reserved; /* Reserved - must be zero */
931 UINT32 GicId;
932 UINT32 Uid;
933 UINT32 Flags;
934 UINT32 ParkingVersion;
935 UINT32 PerformanceInterrupt;
936 UINT64 ParkedAddress;
937 UINT64 BaseAddress;
939 } ACPI_MADT_GENERIC_INTERRUPT;
942 /* 12: Generic Distributor (ACPI 5.0) */
944 typedef struct acpi_madt_generic_distributor
946 ACPI_SUBTABLE_HEADER Header;
947 UINT16 Reserved; /* Reserved - must be zero */
948 UINT32 GicId;
949 UINT64 BaseAddress;
950 UINT32 GlobalIrqBase;
951 UINT32 Reserved2; /* Reserved - must be zero */
953 } ACPI_MADT_GENERIC_DISTRIBUTOR;
957 * Common flags fields for MADT subtables
960 /* MADT Local APIC flags (LapicFlags) and GIC flags */
962 #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
964 /* MADT MPS INTI flags (IntiFlags) */
966 #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
967 #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
969 /* Values for MPS INTI flags */
971 #define ACPI_MADT_POLARITY_CONFORMS 0
972 #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
973 #define ACPI_MADT_POLARITY_RESERVED 2
974 #define ACPI_MADT_POLARITY_ACTIVE_LOW 3
976 #define ACPI_MADT_TRIGGER_CONFORMS (0)
977 #define ACPI_MADT_TRIGGER_EDGE (1<<2)
978 #define ACPI_MADT_TRIGGER_RESERVED (2<<2)
979 #define ACPI_MADT_TRIGGER_LEVEL (3<<2)
982 /*******************************************************************************
984 * MSCT - Maximum System Characteristics Table (ACPI 4.0)
985 * Version 1
987 ******************************************************************************/
989 typedef struct acpi_table_msct
991 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
992 UINT32 ProximityOffset; /* Location of proximity info struct(s) */
993 UINT32 MaxProximityDomains;/* Max number of proximity domains */
994 UINT32 MaxClockDomains; /* Max number of clock domains */
995 UINT64 MaxAddress; /* Max physical address in system */
997 } ACPI_TABLE_MSCT;
1000 /* Subtable - Maximum Proximity Domain Information. Version 1 */
1002 typedef struct acpi_msct_proximity
1004 UINT8 Revision;
1005 UINT8 Length;
1006 UINT32 RangeStart; /* Start of domain range */
1007 UINT32 RangeEnd; /* End of domain range */
1008 UINT32 ProcessorCapacity;
1009 UINT64 MemoryCapacity; /* In bytes */
1011 } ACPI_MSCT_PROXIMITY;
1014 /*******************************************************************************
1016 * SBST - Smart Battery Specification Table
1017 * Version 1
1019 ******************************************************************************/
1021 typedef struct acpi_table_sbst
1023 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1024 UINT32 WarningLevel;
1025 UINT32 LowLevel;
1026 UINT32 CriticalLevel;
1028 } ACPI_TABLE_SBST;
1031 /*******************************************************************************
1033 * SLIT - System Locality Distance Information Table
1034 * Version 1
1036 ******************************************************************************/
1038 typedef struct acpi_table_slit
1040 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1041 UINT64 LocalityCount;
1042 UINT8 Entry[1]; /* Real size = localities^2 */
1044 } ACPI_TABLE_SLIT;
1047 /*******************************************************************************
1049 * SRAT - System Resource Affinity Table
1050 * Version 3
1052 ******************************************************************************/
1054 typedef struct acpi_table_srat
1056 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1057 UINT32 TableRevision; /* Must be value '1' */
1058 UINT64 Reserved; /* Reserved, must be zero */
1060 } ACPI_TABLE_SRAT;
1062 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
1064 enum AcpiSratType
1066 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
1067 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
1068 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
1069 ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
1073 * SRAT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
1076 /* 0: Processor Local APIC/SAPIC Affinity */
1078 typedef struct acpi_srat_cpu_affinity
1080 ACPI_SUBTABLE_HEADER Header;
1081 UINT8 ProximityDomainLo;
1082 UINT8 ApicId;
1083 UINT32 Flags;
1084 UINT8 LocalSapicEid;
1085 UINT8 ProximityDomainHi[3];
1086 UINT32 Reserved; /* Reserved, must be zero */
1088 } ACPI_SRAT_CPU_AFFINITY;
1090 /* Flags */
1092 #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */
1095 /* 1: Memory Affinity */
1097 typedef struct acpi_srat_mem_affinity
1099 ACPI_SUBTABLE_HEADER Header;
1100 UINT32 ProximityDomain;
1101 UINT16 Reserved; /* Reserved, must be zero */
1102 UINT64 BaseAddress;
1103 UINT64 Length;
1104 UINT32 Reserved1;
1105 UINT32 Flags;
1106 UINT64 Reserved2; /* Reserved, must be zero */
1108 } ACPI_SRAT_MEM_AFFINITY;
1110 /* Flags */
1112 #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
1113 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
1114 #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
1117 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
1119 typedef struct acpi_srat_x2apic_cpu_affinity
1121 ACPI_SUBTABLE_HEADER Header;
1122 UINT16 Reserved; /* Reserved, must be zero */
1123 UINT32 ProximityDomain;
1124 UINT32 ApicId;
1125 UINT32 Flags;
1126 UINT32 ClockDomain;
1127 UINT32 Reserved2;
1129 } ACPI_SRAT_X2APIC_CPU_AFFINITY;
1131 /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
1133 #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1136 /* Reset to default packing */
1138 #pragma pack()
1140 #endif /* __ACTBL1_H__ */