Sync ACPICA with Intel's version 20170831.
[dragonfly.git] / sys / contrib / dev / acpica / source / include / actbl3.h
blob80b6ae1c0aa5188d38ed4e33d13d42a27cfe6208
1 /******************************************************************************
3 * Name: actbl3.h - ACPI Table Definitions
5 *****************************************************************************/
7 /******************************************************************************
9 * 1. Copyright Notice
11 * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
12 * All rights reserved.
14 * 2. License
16 * 2.1. This is your license from Intel Corp. under its intellectual property
17 * rights. You may have additional license terms from the party that provided
18 * you this software, covering your right to use that party's intellectual
19 * property rights.
21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 * copy of the source code appearing in this file ("Covered Code") an
23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 * base code distributed originally by Intel ("Original Intel Code") to copy,
25 * make derivatives, distribute, use and display any portion of the Covered
26 * Code in any form, with the right to sublicense such rights; and
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29 * license (with the right to sublicense), under only those claims of Intel
30 * patents that are infringed by the Original Intel Code, to make, use, sell,
31 * offer to sell, and import the Covered Code and derivative works thereof
32 * solely to the minimum extent necessary to exercise the above copyright
33 * license, and in no event shall the patent license extend to any additions
34 * to or modifications of the Original Intel Code. No other license or right
35 * is granted directly or by implication, estoppel or otherwise;
37 * The above copyright and patent license is granted only if the following
38 * conditions are met:
40 * 3. Conditions
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
45 * the above Copyright Notice, the above License, this list of Conditions,
46 * and the following Disclaimer and Export Compliance provision. In addition,
47 * Licensee must cause all Covered Code to which Licensee contributes to
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
50 * documentation of any changes made by any predecessor Licensee. Licensee
51 * must include a prominent statement that the modification is derived,
52 * directly or indirectly, from Original Intel Code.
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
57 * include the following Disclaimer and Export Compliance provision in the
58 * documentation and/or other materials provided with distribution. In
59 * addition, Licensee may not authorize further sublicense of source of any
60 * portion of the Covered Code, and must include terms to the effect that the
61 * license from Licensee to its licensee is limited to the intellectual
62 * property embodied in the software Licensee provides to its licensee, and
63 * not to intellectual property embodied in modifications its licensee may
64 * make.
66 * 3.3. Redistribution of Executable. Redistribution in executable form of any
67 * substantial portion of the Covered Code or modification must reproduce the
68 * above Copyright Notice, and the following Disclaimer and Export Compliance
69 * provision in the documentation and/or other materials provided with the
70 * distribution.
72 * 3.4. Intel retains all right, title, and interest in and to the Original
73 * Intel Code.
75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76 * Intel shall be used in advertising or otherwise to promote the sale, use or
77 * other dealings in products derived from or relating to the Covered Code
78 * without prior written authorization from Intel.
80 * 4. Disclaimer and Export Compliance
82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88 * PARTICULAR PURPOSE.
90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97 * LIMITED REMEDY.
99 * 4.3. Licensee shall not export, either directly or indirectly, any of this
100 * software or system incorporating such software without first obtaining any
101 * required license or other approval from the U. S. Department of Commerce or
102 * any other agency or department of the United States Government. In the
103 * event Licensee exports any such software from the United States or
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
106 * compliance with all laws, regulations, orders, or other restrictions of the
107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108 * any of its subsidiaries will export/re-export any technical data, process,
109 * software, or service, directly or indirectly, to any country for which the
110 * United States government or any agency thereof requires an export license,
111 * other governmental approval, or letter of assurance, without first obtaining
112 * such license, approval or letter.
114 *****************************************************************************
116 * Alternatively, you may choose to be licensed under the terms of the
117 * following license:
119 * Redistribution and use in source and binary forms, with or without
120 * modification, are permitted provided that the following conditions
121 * are met:
122 * 1. Redistributions of source code must retain the above copyright
123 * notice, this list of conditions, and the following disclaimer,
124 * without modification.
125 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126 * substantially similar to the "NO WARRANTY" disclaimer below
127 * ("Disclaimer") and any redistribution must be conditioned upon
128 * including a substantially similar Disclaimer requirement for further
129 * binary redistribution.
130 * 3. Neither the names of the above-listed copyright holders nor the names
131 * of any contributors may be used to endorse or promote products derived
132 * from this software without specific prior written permission.
134 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146 * Alternatively, you may choose to be licensed under the terms of the
147 * GNU General Public License ("GPL") version 2 as published by the Free
148 * Software Foundation.
150 *****************************************************************************/
152 #ifndef __ACTBL3_H__
153 #define __ACTBL3_H__
156 /*******************************************************************************
158 * Additional ACPI Tables (3)
160 * These tables are not consumed directly by the ACPICA subsystem, but are
161 * included here to support device drivers and the AML disassembler.
163 * In general, the tables in this file are fully defined within the ACPI
164 * specification.
166 ******************************************************************************/
170 * Values for description table header signatures for tables defined in this
171 * file. Useful because they make it more difficult to inadvertently type in
172 * the wrong signature.
174 #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
175 #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
176 #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
177 #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
178 #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
179 #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
180 #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
181 #define ACPI_SIG_RASF "RASF" /* RAS Feature table */
182 #define ACPI_SIG_STAO "STAO" /* Status Override table */
183 #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
184 #define ACPI_SIG_XENV "XENV" /* Xen Environment table */
186 #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
187 #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
189 /* Reserved table signatures */
191 #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
192 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
195 * All tables must be byte-packed to match the ACPI specification, since
196 * the tables are provided by the system BIOS.
198 #pragma pack(1)
201 * Note: C bitfields are not used for this reason:
203 * "Bitfields are great and easy to read, but unfortunately the C language
204 * does not specify the layout of bitfields in memory, which means they are
205 * essentially useless for dealing with packed data in on-disk formats or
206 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
207 * this decision was a design error in C. Ritchie could have picked an order
208 * and stuck with it." Norman Ramsey.
209 * See http://stackoverflow.com/a/1053662/41661
213 /*******************************************************************************
215 * BGRT - Boot Graphics Resource Table (ACPI 5.0)
216 * Version 1
218 ******************************************************************************/
220 typedef struct acpi_table_bgrt
222 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
223 UINT16 Version;
224 UINT8 Status;
225 UINT8 ImageType;
226 UINT64 ImageAddress;
227 UINT32 ImageOffsetX;
228 UINT32 ImageOffsetY;
230 } ACPI_TABLE_BGRT;
232 /* Flags for Status field above */
234 #define ACPI_BGRT_DISPLAYED (1)
235 #define ACPI_BGRT_ORIENTATION_OFFSET (3 << 1)
238 /*******************************************************************************
240 * DRTM - Dynamic Root of Trust for Measurement table
241 * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
242 * Table version 1
244 ******************************************************************************/
246 typedef struct acpi_table_drtm
248 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
249 UINT64 EntryBaseAddress;
250 UINT64 EntryLength;
251 UINT32 EntryAddress32;
252 UINT64 EntryAddress64;
253 UINT64 ExitAddress;
254 UINT64 LogAreaAddress;
255 UINT32 LogAreaLength;
256 UINT64 ArchDependentAddress;
257 UINT32 Flags;
259 } ACPI_TABLE_DRTM;
261 /* Flag Definitions for above */
263 #define ACPI_DRTM_ACCESS_ALLOWED (1)
264 #define ACPI_DRTM_ENABLE_GAP_CODE (1<<1)
265 #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2)
266 #define ACPI_DRTM_AUTHORITY_ORDER (1<<3)
269 /* 1) Validated Tables List (64-bit addresses) */
271 typedef struct acpi_drtm_vtable_list
273 UINT32 ValidatedTableCount;
274 UINT64 ValidatedTables[1];
276 } ACPI_DRTM_VTABLE_LIST;
278 /* 2) Resources List (of Resource Descriptors) */
280 /* Resource Descriptor */
282 typedef struct acpi_drtm_resource
284 UINT8 Size[7];
285 UINT8 Type;
286 UINT64 Address;
288 } ACPI_DRTM_RESOURCE;
290 typedef struct acpi_drtm_resource_list
292 UINT32 ResourceCount;
293 ACPI_DRTM_RESOURCE Resources[1];
295 } ACPI_DRTM_RESOURCE_LIST;
297 /* 3) Platform-specific Identifiers List */
299 typedef struct acpi_drtm_dps_id
301 UINT32 DpsIdLength;
302 UINT8 DpsId[16];
304 } ACPI_DRTM_DPS_ID;
307 /*******************************************************************************
309 * FPDT - Firmware Performance Data Table (ACPI 5.0)
310 * Version 1
312 ******************************************************************************/
314 typedef struct acpi_table_fpdt
316 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
318 } ACPI_TABLE_FPDT;
321 /* FPDT subtable header (Performance Record Structure) */
323 typedef struct acpi_fpdt_header
325 UINT16 Type;
326 UINT8 Length;
327 UINT8 Revision;
329 } ACPI_FPDT_HEADER;
331 /* Values for Type field above */
333 enum AcpiFpdtType
335 ACPI_FPDT_TYPE_BOOT = 0,
336 ACPI_FPDT_TYPE_S3PERF = 1
341 * FPDT subtables
344 /* 0: Firmware Basic Boot Performance Record */
346 typedef struct acpi_fpdt_boot_pointer
348 ACPI_FPDT_HEADER Header;
349 UINT8 Reserved[4];
350 UINT64 Address;
352 } ACPI_FPDT_BOOT_POINTER;
355 /* 1: S3 Performance Table Pointer Record */
357 typedef struct acpi_fpdt_s3pt_pointer
359 ACPI_FPDT_HEADER Header;
360 UINT8 Reserved[4];
361 UINT64 Address;
363 } ACPI_FPDT_S3PT_POINTER;
367 * S3PT - S3 Performance Table. This table is pointed to by the
368 * S3 Pointer Record above.
370 typedef struct acpi_table_s3pt
372 UINT8 Signature[4]; /* "S3PT" */
373 UINT32 Length;
375 } ACPI_TABLE_S3PT;
379 * S3PT Subtables (Not part of the actual FPDT)
382 /* Values for Type field in S3PT header */
384 enum AcpiS3ptType
386 ACPI_S3PT_TYPE_RESUME = 0,
387 ACPI_S3PT_TYPE_SUSPEND = 1,
388 ACPI_FPDT_BOOT_PERFORMANCE = 2
391 typedef struct acpi_s3pt_resume
393 ACPI_FPDT_HEADER Header;
394 UINT32 ResumeCount;
395 UINT64 FullResume;
396 UINT64 AverageResume;
398 } ACPI_S3PT_RESUME;
400 typedef struct acpi_s3pt_suspend
402 ACPI_FPDT_HEADER Header;
403 UINT64 SuspendStart;
404 UINT64 SuspendEnd;
406 } ACPI_S3PT_SUSPEND;
410 * FPDT Boot Performance Record (Not part of the actual FPDT)
412 typedef struct acpi_fpdt_boot
414 ACPI_FPDT_HEADER Header;
415 UINT8 Reserved[4];
416 UINT64 ResetEnd;
417 UINT64 LoadStart;
418 UINT64 StartupStart;
419 UINT64 ExitServicesEntry;
420 UINT64 ExitServicesExit;
422 } ACPI_FPDT_BOOT;
425 /*******************************************************************************
427 * GTDT - Generic Timer Description Table (ACPI 5.1)
428 * Version 2
430 ******************************************************************************/
432 typedef struct acpi_table_gtdt
434 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
435 UINT64 CounterBlockAddresss;
436 UINT32 Reserved;
437 UINT32 SecureEl1Interrupt;
438 UINT32 SecureEl1Flags;
439 UINT32 NonSecureEl1Interrupt;
440 UINT32 NonSecureEl1Flags;
441 UINT32 VirtualTimerInterrupt;
442 UINT32 VirtualTimerFlags;
443 UINT32 NonSecureEl2Interrupt;
444 UINT32 NonSecureEl2Flags;
445 UINT64 CounterReadBlockAddress;
446 UINT32 PlatformTimerCount;
447 UINT32 PlatformTimerOffset;
449 } ACPI_TABLE_GTDT;
451 /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
453 #define ACPI_GTDT_INTERRUPT_MODE (1)
454 #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)
455 #define ACPI_GTDT_ALWAYS_ON (1<<2)
458 /* Common GTDT subtable header */
460 typedef struct acpi_gtdt_header
462 UINT8 Type;
463 UINT16 Length;
465 } ACPI_GTDT_HEADER;
467 /* Values for GTDT subtable type above */
469 enum AcpiGtdtType
471 ACPI_GTDT_TYPE_TIMER_BLOCK = 0,
472 ACPI_GTDT_TYPE_WATCHDOG = 1,
473 ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
477 /* GTDT Subtables, correspond to Type in acpi_gtdt_header */
479 /* 0: Generic Timer Block */
481 typedef struct acpi_gtdt_timer_block
483 ACPI_GTDT_HEADER Header;
484 UINT8 Reserved;
485 UINT64 BlockAddress;
486 UINT32 TimerCount;
487 UINT32 TimerOffset;
489 } ACPI_GTDT_TIMER_BLOCK;
491 /* Timer Sub-Structure, one per timer */
493 typedef struct acpi_gtdt_timer_entry
495 UINT8 FrameNumber;
496 UINT8 Reserved[3];
497 UINT64 BaseAddress;
498 UINT64 El0BaseAddress;
499 UINT32 TimerInterrupt;
500 UINT32 TimerFlags;
501 UINT32 VirtualTimerInterrupt;
502 UINT32 VirtualTimerFlags;
503 UINT32 CommonFlags;
505 } ACPI_GTDT_TIMER_ENTRY;
507 /* Flag Definitions: TimerFlags and VirtualTimerFlags above */
509 #define ACPI_GTDT_GT_IRQ_MODE (1)
510 #define ACPI_GTDT_GT_IRQ_POLARITY (1<<1)
512 /* Flag Definitions: CommonFlags above */
514 #define ACPI_GTDT_GT_IS_SECURE_TIMER (1)
515 #define ACPI_GTDT_GT_ALWAYS_ON (1<<1)
518 /* 1: SBSA Generic Watchdog Structure */
520 typedef struct acpi_gtdt_watchdog
522 ACPI_GTDT_HEADER Header;
523 UINT8 Reserved;
524 UINT64 RefreshFrameAddress;
525 UINT64 ControlFrameAddress;
526 UINT32 TimerInterrupt;
527 UINT32 TimerFlags;
529 } ACPI_GTDT_WATCHDOG;
531 /* Flag Definitions: TimerFlags above */
533 #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1)
534 #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1)
535 #define ACPI_GTDT_WATCHDOG_SECURE (1<<2)
538 /*******************************************************************************
540 * MPST - Memory Power State Table (ACPI 5.0)
541 * Version 1
543 ******************************************************************************/
545 #define ACPI_MPST_CHANNEL_INFO \
546 UINT8 ChannelId; \
547 UINT8 Reserved1[3]; \
548 UINT16 PowerNodeCount; \
549 UINT16 Reserved2;
551 /* Main table */
553 typedef struct acpi_table_mpst
555 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
556 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
558 } ACPI_TABLE_MPST;
561 /* Memory Platform Communication Channel Info */
563 typedef struct acpi_mpst_channel
565 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
567 } ACPI_MPST_CHANNEL;
570 /* Memory Power Node Structure */
572 typedef struct acpi_mpst_power_node
574 UINT8 Flags;
575 UINT8 Reserved1;
576 UINT16 NodeId;
577 UINT32 Length;
578 UINT64 RangeAddress;
579 UINT64 RangeLength;
580 UINT32 NumPowerStates;
581 UINT32 NumPhysicalComponents;
583 } ACPI_MPST_POWER_NODE;
585 /* Values for Flags field above */
587 #define ACPI_MPST_ENABLED 1
588 #define ACPI_MPST_POWER_MANAGED 2
589 #define ACPI_MPST_HOT_PLUG_CAPABLE 4
592 /* Memory Power State Structure (follows POWER_NODE above) */
594 typedef struct acpi_mpst_power_state
596 UINT8 PowerState;
597 UINT8 InfoIndex;
599 } ACPI_MPST_POWER_STATE;
602 /* Physical Component ID Structure (follows POWER_STATE above) */
604 typedef struct acpi_mpst_component
606 UINT16 ComponentId;
608 } ACPI_MPST_COMPONENT;
611 /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
613 typedef struct acpi_mpst_data_hdr
615 UINT16 CharacteristicsCount;
616 UINT16 Reserved;
618 } ACPI_MPST_DATA_HDR;
620 typedef struct acpi_mpst_power_data
622 UINT8 StructureId;
623 UINT8 Flags;
624 UINT16 Reserved1;
625 UINT32 AveragePower;
626 UINT32 PowerSaving;
627 UINT64 ExitLatency;
628 UINT64 Reserved2;
630 } ACPI_MPST_POWER_DATA;
632 /* Values for Flags field above */
634 #define ACPI_MPST_PRESERVE 1
635 #define ACPI_MPST_AUTOENTRY 2
636 #define ACPI_MPST_AUTOEXIT 4
639 /* Shared Memory Region (not part of an ACPI table) */
641 typedef struct acpi_mpst_shared
643 UINT32 Signature;
644 UINT16 PccCommand;
645 UINT16 PccStatus;
646 UINT32 CommandRegister;
647 UINT32 StatusRegister;
648 UINT32 PowerStateId;
649 UINT32 PowerNodeId;
650 UINT64 EnergyConsumed;
651 UINT64 AveragePower;
653 } ACPI_MPST_SHARED;
656 /*******************************************************************************
658 * PCCT - Platform Communications Channel Table (ACPI 5.0)
659 * Version 2 (ACPI 6.2)
661 ******************************************************************************/
663 typedef struct acpi_table_pcct
665 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
666 UINT32 Flags;
667 UINT64 Reserved;
669 } ACPI_TABLE_PCCT;
671 /* Values for Flags field above */
673 #define ACPI_PCCT_DOORBELL 1
675 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
677 enum AcpiPcctType
679 ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0,
680 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1,
681 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */
682 ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE = 3, /* ACPI 6.2 */
683 ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE = 4, /* ACPI 6.2 */
684 ACPI_PCCT_TYPE_RESERVED = 5 /* 5 and greater are reserved */
688 * PCCT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
691 /* 0: Generic Communications Subspace */
693 typedef struct acpi_pcct_subspace
695 ACPI_SUBTABLE_HEADER Header;
696 UINT8 Reserved[6];
697 UINT64 BaseAddress;
698 UINT64 Length;
699 ACPI_GENERIC_ADDRESS DoorbellRegister;
700 UINT64 PreserveMask;
701 UINT64 WriteMask;
702 UINT32 Latency;
703 UINT32 MaxAccessRate;
704 UINT16 MinTurnaroundTime;
706 } ACPI_PCCT_SUBSPACE;
709 /* 1: HW-reduced Communications Subspace (ACPI 5.1) */
711 typedef struct acpi_pcct_hw_reduced
713 ACPI_SUBTABLE_HEADER Header;
714 UINT32 PlatformInterrupt;
715 UINT8 Flags;
716 UINT8 Reserved;
717 UINT64 BaseAddress;
718 UINT64 Length;
719 ACPI_GENERIC_ADDRESS DoorbellRegister;
720 UINT64 PreserveMask;
721 UINT64 WriteMask;
722 UINT32 Latency;
723 UINT32 MaxAccessRate;
724 UINT16 MinTurnaroundTime;
726 } ACPI_PCCT_HW_REDUCED;
729 /* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
731 typedef struct acpi_pcct_hw_reduced_type2
733 ACPI_SUBTABLE_HEADER Header;
734 UINT32 PlatformInterrupt;
735 UINT8 Flags;
736 UINT8 Reserved;
737 UINT64 BaseAddress;
738 UINT64 Length;
739 ACPI_GENERIC_ADDRESS DoorbellRegister;
740 UINT64 PreserveMask;
741 UINT64 WriteMask;
742 UINT32 Latency;
743 UINT32 MaxAccessRate;
744 UINT16 MinTurnaroundTime;
745 ACPI_GENERIC_ADDRESS PlatformAckRegister;
746 UINT64 AckPreserveMask;
747 UINT64 AckWriteMask;
749 } ACPI_PCCT_HW_REDUCED_TYPE2;
752 /* 3: Extended PCC Master Subspace Type 3 (ACPI 6.2) */
754 typedef struct acpi_pcct_ext_pcc_master
756 ACPI_SUBTABLE_HEADER Header;
757 UINT32 PlatformInterrupt;
758 UINT8 Flags;
759 UINT8 Reserved1;
760 UINT64 BaseAddress;
761 UINT32 Length;
762 ACPI_GENERIC_ADDRESS DoorbellRegister;
763 UINT64 PreserveMask;
764 UINT64 WriteMask;
765 UINT32 Latency;
766 UINT32 MaxAccessRate;
767 UINT32 MinTurnaroundTime;
768 ACPI_GENERIC_ADDRESS PlatformAckRegister;
769 UINT64 AckPreserveMask;
770 UINT64 AckSetMask;
771 UINT64 Reserved2;
772 ACPI_GENERIC_ADDRESS CmdCompleteRegister;
773 UINT64 CmdCompleteMask;
774 ACPI_GENERIC_ADDRESS CmdUpdateRegister;
775 UINT64 CmdUpdatePreserveMask;
776 UINT64 CmdUpdateSetMask;
777 ACPI_GENERIC_ADDRESS ErrorStatusRegister;
778 UINT64 ErrorStatusMask;
780 } ACPI_PCCT_EXT_PCC_MASTER;
783 /* 4: Extended PCC Slave Subspace Type 4 (ACPI 6.2) */
785 typedef struct acpi_pcct_ext_pcc_slave
787 ACPI_SUBTABLE_HEADER Header;
788 UINT32 PlatformInterrupt;
789 UINT8 Flags;
790 UINT8 Reserved1;
791 UINT64 BaseAddress;
792 UINT32 Length;
793 ACPI_GENERIC_ADDRESS DoorbellRegister;
794 UINT64 PreserveMask;
795 UINT64 WriteMask;
796 UINT32 Latency;
797 UINT32 MaxAccessRate;
798 UINT32 MinTurnaroundTime;
799 ACPI_GENERIC_ADDRESS PlatformAckRegister;
800 UINT64 AckPreserveMask;
801 UINT64 AckSetMask;
802 UINT64 Reserved2;
803 ACPI_GENERIC_ADDRESS CmdCompleteRegister;
804 UINT64 CmdCompleteMask;
805 ACPI_GENERIC_ADDRESS CmdUpdateRegister;
806 UINT64 CmdUpdatePreserveMask;
807 UINT64 CmdUpdateSetMask;
808 ACPI_GENERIC_ADDRESS ErrorStatusRegister;
809 UINT64 ErrorStatusMask;
811 } ACPI_PCCT_EXT_PCC_SLAVE;
814 /* Values for doorbell flags above */
816 #define ACPI_PCCT_INTERRUPT_POLARITY (1)
817 #define ACPI_PCCT_INTERRUPT_MODE (1<<1)
821 * PCC memory structures (not part of the ACPI table)
824 /* Shared Memory Region */
826 typedef struct acpi_pcct_shared_memory
828 UINT32 Signature;
829 UINT16 Command;
830 UINT16 Status;
832 } ACPI_PCCT_SHARED_MEMORY;
835 /* Extended PCC Subspace Shared Memory Region (ACPI 6.2) */
837 typedef struct acpi_pcct_ext_pcc_shared_memory
839 UINT32 Signature;
840 UINT32 Flags;
841 UINT32 Length;
842 UINT32 Command;
844 } ACPI_PCCT_EXT_PCC_SHARED_MEMORY;
847 /*******************************************************************************
849 * PMTT - Platform Memory Topology Table (ACPI 5.0)
850 * Version 1
852 ******************************************************************************/
854 typedef struct acpi_table_pmtt
856 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
857 UINT32 Reserved;
859 } ACPI_TABLE_PMTT;
862 /* Common header for PMTT subtables that follow main table */
864 typedef struct acpi_pmtt_header
866 UINT8 Type;
867 UINT8 Reserved1;
868 UINT16 Length;
869 UINT16 Flags;
870 UINT16 Reserved2;
872 } ACPI_PMTT_HEADER;
874 /* Values for Type field above */
876 #define ACPI_PMTT_TYPE_SOCKET 0
877 #define ACPI_PMTT_TYPE_CONTROLLER 1
878 #define ACPI_PMTT_TYPE_DIMM 2
879 #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */
881 /* Values for Flags field above */
883 #define ACPI_PMTT_TOP_LEVEL 0x0001
884 #define ACPI_PMTT_PHYSICAL 0x0002
885 #define ACPI_PMTT_MEMORY_TYPE 0x000C
889 * PMTT subtables, correspond to Type in acpi_pmtt_header
893 /* 0: Socket Structure */
895 typedef struct acpi_pmtt_socket
897 ACPI_PMTT_HEADER Header;
898 UINT16 SocketId;
899 UINT16 Reserved;
901 } ACPI_PMTT_SOCKET;
904 /* 1: Memory Controller subtable */
906 typedef struct acpi_pmtt_controller
908 ACPI_PMTT_HEADER Header;
909 UINT32 ReadLatency;
910 UINT32 WriteLatency;
911 UINT32 ReadBandwidth;
912 UINT32 WriteBandwidth;
913 UINT16 AccessWidth;
914 UINT16 Alignment;
915 UINT16 Reserved;
916 UINT16 DomainCount;
918 } ACPI_PMTT_CONTROLLER;
920 /* 1a: Proximity Domain substructure */
922 typedef struct acpi_pmtt_domain
924 UINT32 ProximityDomain;
926 } ACPI_PMTT_DOMAIN;
929 /* 2: Physical Component Identifier (DIMM) */
931 typedef struct acpi_pmtt_physical_component
933 ACPI_PMTT_HEADER Header;
934 UINT16 ComponentId;
935 UINT16 Reserved;
936 UINT32 MemorySize;
937 UINT32 BiosHandle;
939 } ACPI_PMTT_PHYSICAL_COMPONENT;
942 /*******************************************************************************
944 * RASF - RAS Feature Table (ACPI 5.0)
945 * Version 1
947 ******************************************************************************/
949 typedef struct acpi_table_rasf
951 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
952 UINT8 ChannelId[12];
954 } ACPI_TABLE_RASF;
956 /* RASF Platform Communication Channel Shared Memory Region */
958 typedef struct acpi_rasf_shared_memory
960 UINT32 Signature;
961 UINT16 Command;
962 UINT16 Status;
963 UINT16 Version;
964 UINT8 Capabilities[16];
965 UINT8 SetCapabilities[16];
966 UINT16 NumParameterBlocks;
967 UINT32 SetCapabilitiesStatus;
969 } ACPI_RASF_SHARED_MEMORY;
971 /* RASF Parameter Block Structure Header */
973 typedef struct acpi_rasf_parameter_block
975 UINT16 Type;
976 UINT16 Version;
977 UINT16 Length;
979 } ACPI_RASF_PARAMETER_BLOCK;
981 /* RASF Parameter Block Structure for PATROL_SCRUB */
983 typedef struct acpi_rasf_patrol_scrub_parameter
985 ACPI_RASF_PARAMETER_BLOCK Header;
986 UINT16 PatrolScrubCommand;
987 UINT64 RequestedAddressRange[2];
988 UINT64 ActualAddressRange[2];
989 UINT16 Flags;
990 UINT8 RequestedSpeed;
992 } ACPI_RASF_PATROL_SCRUB_PARAMETER;
994 /* Masks for Flags and Speed fields above */
996 #define ACPI_RASF_SCRUBBER_RUNNING 1
997 #define ACPI_RASF_SPEED (7<<1)
998 #define ACPI_RASF_SPEED_SLOW (0<<1)
999 #define ACPI_RASF_SPEED_MEDIUM (4<<1)
1000 #define ACPI_RASF_SPEED_FAST (7<<1)
1002 /* Channel Commands */
1004 enum AcpiRasfCommands
1006 ACPI_RASF_EXECUTE_RASF_COMMAND = 1
1009 /* Platform RAS Capabilities */
1011 enum AcpiRasfCapabiliities
1013 ACPI_HW_PATROL_SCRUB_SUPPORTED = 0,
1014 ACPI_SW_PATROL_SCRUB_EXPOSED = 1
1017 /* Patrol Scrub Commands */
1019 enum AcpiRasfPatrolScrubCommands
1021 ACPI_RASF_GET_PATROL_PARAMETERS = 1,
1022 ACPI_RASF_START_PATROL_SCRUBBER = 2,
1023 ACPI_RASF_STOP_PATROL_SCRUBBER = 3
1026 /* Channel Command flags */
1028 #define ACPI_RASF_GENERATE_SCI (1<<15)
1030 /* Status values */
1032 enum AcpiRasfStatus
1034 ACPI_RASF_SUCCESS = 0,
1035 ACPI_RASF_NOT_VALID = 1,
1036 ACPI_RASF_NOT_SUPPORTED = 2,
1037 ACPI_RASF_BUSY = 3,
1038 ACPI_RASF_FAILED = 4,
1039 ACPI_RASF_ABORTED = 5,
1040 ACPI_RASF_INVALID_DATA = 6
1043 /* Status flags */
1045 #define ACPI_RASF_COMMAND_COMPLETE (1)
1046 #define ACPI_RASF_SCI_DOORBELL (1<<1)
1047 #define ACPI_RASF_ERROR (1<<2)
1048 #define ACPI_RASF_STATUS (0x1F<<3)
1051 /*******************************************************************************
1053 * STAO - Status Override Table (_STA override) - ACPI 6.0
1054 * Version 1
1056 * Conforms to "ACPI Specification for Status Override Table"
1057 * 6 January 2015
1059 ******************************************************************************/
1061 typedef struct acpi_table_stao
1063 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1064 UINT8 IgnoreUart;
1066 } ACPI_TABLE_STAO;
1069 /*******************************************************************************
1071 * WPBT - Windows Platform Environment Table (ACPI 6.0)
1072 * Version 1
1074 * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
1076 ******************************************************************************/
1078 typedef struct acpi_table_wpbt
1080 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1081 UINT32 HandoffSize;
1082 UINT64 HandoffAddress;
1083 UINT8 Layout;
1084 UINT8 Type;
1085 UINT16 ArgumentsLength;
1087 } ACPI_TABLE_WPBT;
1090 /*******************************************************************************
1092 * XENV - Xen Environment Table (ACPI 6.0)
1093 * Version 1
1095 * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
1097 ******************************************************************************/
1099 typedef struct acpi_table_xenv
1101 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1102 UINT64 GrantTableAddress;
1103 UINT64 GrantTableSize;
1104 UINT32 EventInterrupt;
1105 UINT8 EventFlags;
1107 } ACPI_TABLE_XENV;
1110 /* Reset to default packing */
1112 #pragma pack()
1114 #endif /* __ACTBL3_H__ */