1 /******************************************************************************
3 * Name: actbl3.h - ACPI Table Definitions
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2018, Intel Corp.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
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.
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.
47 /*******************************************************************************
49 * Additional ACPI Tables (3)
51 * These tables are not consumed directly by the ACPICA subsystem, but are
52 * included here to support device drivers and the AML disassembler.
54 * In general, the tables in this file are fully defined within the ACPI
57 ******************************************************************************/
60 * Values for description table header signatures for tables defined in this
61 * file. Useful because they make it more difficult to inadvertently type in
62 * the wrong signature.
64 #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
65 #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
66 #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
67 #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
68 #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
69 #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
70 #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
71 #define ACPI_SIG_RASF "RASF" /* RAS Feature table */
72 #define ACPI_SIG_STAO "STAO" /* Status Override table */
73 #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
74 #define ACPI_SIG_XENV "XENV" /* Xen Environment table */
76 #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
77 #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
79 /* Reserved table signatures */
81 #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
82 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
85 * All tables must be byte-packed to match the ACPI specification, since
86 * the tables are provided by the system BIOS.
91 * Note: C bitfields are not used for this reason:
93 * "Bitfields are great and easy to read, but unfortunately the C language
94 * does not specify the layout of bitfields in memory, which means they are
95 * essentially useless for dealing with packed data in on-disk formats or
96 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
97 * this decision was a design error in C. Ritchie could have picked an order
98 * and stuck with it." Norman Ramsey.
99 * See http://stackoverflow.com/a/1053662/41661
102 /*******************************************************************************
104 * BGRT - Boot Graphics Resource Table (ACPI 5.0)
107 ******************************************************************************/
109 struct acpi_table_bgrt
{
110 struct acpi_table_header header
; /* Common ACPI table header */
119 /* Flags for Status field above */
121 #define ACPI_BGRT_DISPLAYED (1)
122 #define ACPI_BGRT_ORIENTATION_OFFSET (3 << 1)
124 /*******************************************************************************
126 * DRTM - Dynamic Root of Trust for Measurement table
127 * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
130 ******************************************************************************/
132 struct acpi_table_drtm
{
133 struct acpi_table_header header
; /* Common ACPI table header */
134 u64 entry_base_address
;
139 u64 log_area_address
;
141 u64 arch_dependent_address
;
145 /* Flag Definitions for above */
147 #define ACPI_DRTM_ACCESS_ALLOWED (1)
148 #define ACPI_DRTM_ENABLE_GAP_CODE (1<<1)
149 #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2)
150 #define ACPI_DRTM_AUTHORITY_ORDER (1<<3)
152 /* 1) Validated Tables List (64-bit addresses) */
154 struct acpi_drtm_vtable_list
{
155 u32 validated_table_count
;
156 u64 validated_tables
[1];
159 /* 2) Resources List (of Resource Descriptors) */
161 /* Resource Descriptor */
163 struct acpi_drtm_resource
{
169 struct acpi_drtm_resource_list
{
171 struct acpi_drtm_resource resources
[1];
174 /* 3) Platform-specific Identifiers List */
176 struct acpi_drtm_dps_id
{
181 /*******************************************************************************
183 * FPDT - Firmware Performance Data Table (ACPI 5.0)
186 ******************************************************************************/
188 struct acpi_table_fpdt
{
189 struct acpi_table_header header
; /* Common ACPI table header */
192 /* FPDT subtable header (Performance Record Structure) */
194 struct acpi_fpdt_header
{
200 /* Values for Type field above */
202 enum acpi_fpdt_type
{
203 ACPI_FPDT_TYPE_BOOT
= 0,
204 ACPI_FPDT_TYPE_S3PERF
= 1
211 /* 0: Firmware Basic Boot Performance Record */
213 struct acpi_fpdt_boot_pointer
{
214 struct acpi_fpdt_header header
;
219 /* 1: S3 Performance Table Pointer Record */
221 struct acpi_fpdt_s3pt_pointer
{
222 struct acpi_fpdt_header header
;
228 * S3PT - S3 Performance Table. This table is pointed to by the
229 * S3 Pointer Record above.
231 struct acpi_table_s3pt
{
232 u8 signature
[4]; /* "S3PT" */
237 * S3PT Subtables (Not part of the actual FPDT)
240 /* Values for Type field in S3PT header */
242 enum acpi_s3pt_type
{
243 ACPI_S3PT_TYPE_RESUME
= 0,
244 ACPI_S3PT_TYPE_SUSPEND
= 1,
245 ACPI_FPDT_BOOT_PERFORMANCE
= 2
248 struct acpi_s3pt_resume
{
249 struct acpi_fpdt_header header
;
255 struct acpi_s3pt_suspend
{
256 struct acpi_fpdt_header header
;
262 * FPDT Boot Performance Record (Not part of the actual FPDT)
264 struct acpi_fpdt_boot
{
265 struct acpi_fpdt_header header
;
270 u64 exit_services_entry
;
271 u64 exit_services_exit
;
274 /*******************************************************************************
276 * GTDT - Generic Timer Description Table (ACPI 5.1)
279 ******************************************************************************/
281 struct acpi_table_gtdt
{
282 struct acpi_table_header header
; /* Common ACPI table header */
283 u64 counter_block_addresss
;
285 u32 secure_el1_interrupt
;
286 u32 secure_el1_flags
;
287 u32 non_secure_el1_interrupt
;
288 u32 non_secure_el1_flags
;
289 u32 virtual_timer_interrupt
;
290 u32 virtual_timer_flags
;
291 u32 non_secure_el2_interrupt
;
292 u32 non_secure_el2_flags
;
293 u64 counter_read_block_address
;
294 u32 platform_timer_count
;
295 u32 platform_timer_offset
;
298 /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
300 #define ACPI_GTDT_INTERRUPT_MODE (1)
301 #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)
302 #define ACPI_GTDT_ALWAYS_ON (1<<2)
304 /* Common GTDT subtable header */
306 struct acpi_gtdt_header
{
311 /* Values for GTDT subtable type above */
313 enum acpi_gtdt_type
{
314 ACPI_GTDT_TYPE_TIMER_BLOCK
= 0,
315 ACPI_GTDT_TYPE_WATCHDOG
= 1,
316 ACPI_GTDT_TYPE_RESERVED
= 2 /* 2 and greater are reserved */
319 /* GTDT Subtables, correspond to Type in struct acpi_gtdt_header */
321 /* 0: Generic Timer Block */
323 struct acpi_gtdt_timer_block
{
324 struct acpi_gtdt_header header
;
331 /* Timer Sub-Structure, one per timer */
333 struct acpi_gtdt_timer_entry
{
337 u64 el0_base_address
;
340 u32 virtual_timer_interrupt
;
341 u32 virtual_timer_flags
;
345 /* Flag Definitions: timer_flags and virtual_timer_flags above */
347 #define ACPI_GTDT_GT_IRQ_MODE (1)
348 #define ACPI_GTDT_GT_IRQ_POLARITY (1<<1)
350 /* Flag Definitions: common_flags above */
352 #define ACPI_GTDT_GT_IS_SECURE_TIMER (1)
353 #define ACPI_GTDT_GT_ALWAYS_ON (1<<1)
355 /* 1: SBSA Generic Watchdog Structure */
357 struct acpi_gtdt_watchdog
{
358 struct acpi_gtdt_header header
;
360 u64 refresh_frame_address
;
361 u64 control_frame_address
;
366 /* Flag Definitions: timer_flags above */
368 #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1)
369 #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1)
370 #define ACPI_GTDT_WATCHDOG_SECURE (1<<2)
372 /*******************************************************************************
374 * MPST - Memory Power State Table (ACPI 5.0)
377 ******************************************************************************/
379 #define ACPI_MPST_CHANNEL_INFO \
382 u16 power_node_count; \
387 struct acpi_table_mpst
{
388 struct acpi_table_header header
; /* Common ACPI table header */
389 ACPI_MPST_CHANNEL_INFO
/* Platform Communication Channel */
392 /* Memory Platform Communication Channel Info */
394 struct acpi_mpst_channel
{
395 ACPI_MPST_CHANNEL_INFO
/* Platform Communication Channel */
398 /* Memory Power Node Structure */
400 struct acpi_mpst_power_node
{
407 u32 num_power_states
;
408 u32 num_physical_components
;
411 /* Values for Flags field above */
413 #define ACPI_MPST_ENABLED 1
414 #define ACPI_MPST_POWER_MANAGED 2
415 #define ACPI_MPST_HOT_PLUG_CAPABLE 4
417 /* Memory Power State Structure (follows POWER_NODE above) */
419 struct acpi_mpst_power_state
{
424 /* Physical Component ID Structure (follows POWER_STATE above) */
426 struct acpi_mpst_component
{
430 /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
432 struct acpi_mpst_data_hdr
{
433 u16 characteristics_count
;
437 struct acpi_mpst_power_data
{
447 /* Values for Flags field above */
449 #define ACPI_MPST_PRESERVE 1
450 #define ACPI_MPST_AUTOENTRY 2
451 #define ACPI_MPST_AUTOEXIT 4
453 /* Shared Memory Region (not part of an ACPI table) */
455 struct acpi_mpst_shared
{
459 u32 command_register
;
467 /*******************************************************************************
469 * PCCT - Platform Communications Channel Table (ACPI 5.0)
470 * Version 2 (ACPI 6.2)
472 ******************************************************************************/
474 struct acpi_table_pcct
{
475 struct acpi_table_header header
; /* Common ACPI table header */
480 /* Values for Flags field above */
482 #define ACPI_PCCT_DOORBELL 1
484 /* Values for subtable type in struct acpi_subtable_header */
486 enum acpi_pcct_type
{
487 ACPI_PCCT_TYPE_GENERIC_SUBSPACE
= 0,
488 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE
= 1,
489 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2
= 2, /* ACPI 6.1 */
490 ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE
= 3, /* ACPI 6.2 */
491 ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE
= 4, /* ACPI 6.2 */
492 ACPI_PCCT_TYPE_RESERVED
= 5 /* 5 and greater are reserved */
496 * PCCT Subtables, correspond to Type in struct acpi_subtable_header
499 /* 0: Generic Communications Subspace */
501 struct acpi_pcct_subspace
{
502 struct acpi_subtable_header header
;
506 struct acpi_generic_address doorbell_register
;
511 u16 min_turnaround_time
;
514 /* 1: HW-reduced Communications Subspace (ACPI 5.1) */
516 struct acpi_pcct_hw_reduced
{
517 struct acpi_subtable_header header
;
518 u32 platform_interrupt
;
523 struct acpi_generic_address doorbell_register
;
528 u16 min_turnaround_time
;
531 /* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
533 struct acpi_pcct_hw_reduced_type2
{
534 struct acpi_subtable_header header
;
535 u32 platform_interrupt
;
540 struct acpi_generic_address doorbell_register
;
545 u16 min_turnaround_time
;
546 struct acpi_generic_address platform_ack_register
;
547 u64 ack_preserve_mask
;
551 /* 3: Extended PCC Master Subspace Type 3 (ACPI 6.2) */
553 struct acpi_pcct_ext_pcc_master
{
554 struct acpi_subtable_header header
;
555 u32 platform_interrupt
;
560 struct acpi_generic_address doorbell_register
;
565 u32 min_turnaround_time
;
566 struct acpi_generic_address platform_ack_register
;
567 u64 ack_preserve_mask
;
570 struct acpi_generic_address cmd_complete_register
;
571 u64 cmd_complete_mask
;
572 struct acpi_generic_address cmd_update_register
;
573 u64 cmd_update_preserve_mask
;
574 u64 cmd_update_set_mask
;
575 struct acpi_generic_address error_status_register
;
576 u64 error_status_mask
;
579 /* 4: Extended PCC Slave Subspace Type 4 (ACPI 6.2) */
581 struct acpi_pcct_ext_pcc_slave
{
582 struct acpi_subtable_header header
;
583 u32 platform_interrupt
;
588 struct acpi_generic_address doorbell_register
;
593 u32 min_turnaround_time
;
594 struct acpi_generic_address platform_ack_register
;
595 u64 ack_preserve_mask
;
598 struct acpi_generic_address cmd_complete_register
;
599 u64 cmd_complete_mask
;
600 struct acpi_generic_address cmd_update_register
;
601 u64 cmd_update_preserve_mask
;
602 u64 cmd_update_set_mask
;
603 struct acpi_generic_address error_status_register
;
604 u64 error_status_mask
;
607 /* Values for doorbell flags above */
609 #define ACPI_PCCT_INTERRUPT_POLARITY (1)
610 #define ACPI_PCCT_INTERRUPT_MODE (1<<1)
613 * PCC memory structures (not part of the ACPI table)
616 /* Shared Memory Region */
618 struct acpi_pcct_shared_memory
{
624 /* Extended PCC Subspace Shared Memory Region (ACPI 6.2) */
626 struct acpi_pcct_ext_pcc_shared_memory
{
633 /*******************************************************************************
635 * PMTT - Platform Memory Topology Table (ACPI 5.0)
638 ******************************************************************************/
640 struct acpi_table_pmtt
{
641 struct acpi_table_header header
; /* Common ACPI table header */
645 /* Common header for PMTT subtables that follow main table */
647 struct acpi_pmtt_header
{
655 /* Values for Type field above */
657 #define ACPI_PMTT_TYPE_SOCKET 0
658 #define ACPI_PMTT_TYPE_CONTROLLER 1
659 #define ACPI_PMTT_TYPE_DIMM 2
660 #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */
662 /* Values for Flags field above */
664 #define ACPI_PMTT_TOP_LEVEL 0x0001
665 #define ACPI_PMTT_PHYSICAL 0x0002
666 #define ACPI_PMTT_MEMORY_TYPE 0x000C
669 * PMTT subtables, correspond to Type in struct acpi_pmtt_header
672 /* 0: Socket Structure */
674 struct acpi_pmtt_socket
{
675 struct acpi_pmtt_header header
;
680 /* 1: Memory Controller subtable */
682 struct acpi_pmtt_controller
{
683 struct acpi_pmtt_header header
;
694 /* 1a: Proximity Domain substructure */
696 struct acpi_pmtt_domain
{
697 u32 proximity_domain
;
700 /* 2: Physical Component Identifier (DIMM) */
702 struct acpi_pmtt_physical_component
{
703 struct acpi_pmtt_header header
;
710 /*******************************************************************************
712 * RASF - RAS Feature Table (ACPI 5.0)
715 ******************************************************************************/
717 struct acpi_table_rasf
{
718 struct acpi_table_header header
; /* Common ACPI table header */
722 /* RASF Platform Communication Channel Shared Memory Region */
724 struct acpi_rasf_shared_memory
{
730 u8 set_capabilities
[16];
731 u16 num_parameter_blocks
;
732 u32 set_capabilities_status
;
735 /* RASF Parameter Block Structure Header */
737 struct acpi_rasf_parameter_block
{
743 /* RASF Parameter Block Structure for PATROL_SCRUB */
745 struct acpi_rasf_patrol_scrub_parameter
{
746 struct acpi_rasf_parameter_block header
;
747 u16 patrol_scrub_command
;
748 u64 requested_address_range
[2];
749 u64 actual_address_range
[2];
754 /* Masks for Flags and Speed fields above */
756 #define ACPI_RASF_SCRUBBER_RUNNING 1
757 #define ACPI_RASF_SPEED (7<<1)
758 #define ACPI_RASF_SPEED_SLOW (0<<1)
759 #define ACPI_RASF_SPEED_MEDIUM (4<<1)
760 #define ACPI_RASF_SPEED_FAST (7<<1)
762 /* Channel Commands */
764 enum acpi_rasf_commands
{
765 ACPI_RASF_EXECUTE_RASF_COMMAND
= 1
768 /* Platform RAS Capabilities */
770 enum acpi_rasf_capabiliities
{
771 ACPI_HW_PATROL_SCRUB_SUPPORTED
= 0,
772 ACPI_SW_PATROL_SCRUB_EXPOSED
= 1
775 /* Patrol Scrub Commands */
777 enum acpi_rasf_patrol_scrub_commands
{
778 ACPI_RASF_GET_PATROL_PARAMETERS
= 1,
779 ACPI_RASF_START_PATROL_SCRUBBER
= 2,
780 ACPI_RASF_STOP_PATROL_SCRUBBER
= 3
783 /* Channel Command flags */
785 #define ACPI_RASF_GENERATE_SCI (1<<15)
789 enum acpi_rasf_status
{
790 ACPI_RASF_SUCCESS
= 0,
791 ACPI_RASF_NOT_VALID
= 1,
792 ACPI_RASF_NOT_SUPPORTED
= 2,
794 ACPI_RASF_FAILED
= 4,
795 ACPI_RASF_ABORTED
= 5,
796 ACPI_RASF_INVALID_DATA
= 6
801 #define ACPI_RASF_COMMAND_COMPLETE (1)
802 #define ACPI_RASF_SCI_DOORBELL (1<<1)
803 #define ACPI_RASF_ERROR (1<<2)
804 #define ACPI_RASF_STATUS (0x1F<<3)
806 /*******************************************************************************
808 * STAO - Status Override Table (_STA override) - ACPI 6.0
811 * Conforms to "ACPI Specification for Status Override Table"
814 ******************************************************************************/
816 struct acpi_table_stao
{
817 struct acpi_table_header header
; /* Common ACPI table header */
821 /*******************************************************************************
823 * WPBT - Windows Platform Environment Table (ACPI 6.0)
826 * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
828 ******************************************************************************/
830 struct acpi_table_wpbt
{
831 struct acpi_table_header header
; /* Common ACPI table header */
836 u16 arguments_length
;
839 /*******************************************************************************
841 * XENV - Xen Environment Table (ACPI 6.0)
844 * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
846 ******************************************************************************/
848 struct acpi_table_xenv
{
849 struct acpi_table_header header
; /* Common ACPI table header */
850 u64 grant_table_address
;
851 u64 grant_table_size
;
856 /* Reset to default packing */
860 #endif /* __ACTBL3_H__ */