1 /******************************************************************************
3 * Name: actbl3.h - ACPI Table Definitions
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2013, 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.
48 /*******************************************************************************
50 * Additional ACPI Tables (3)
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_BGRT "BGRT" /* Boot Graphics Resource Table */
66 #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
67 #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
68 #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
69 #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
70 #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
71 #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
72 #define ACPI_SIG_RASF "RASF" /* RAS Feature table */
73 #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
75 #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
76 #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
78 /* Reserved table signatures */
80 #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
81 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
82 #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary 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
103 /*******************************************************************************
105 * BGRT - Boot Graphics Resource Table (ACPI 5.0)
108 ******************************************************************************/
110 typedef struct acpi_table_bgrt
112 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
123 /*******************************************************************************
125 * DRTM - Dynamic Root of Trust for Measurement table
127 ******************************************************************************/
129 typedef struct acpi_table_drtm
131 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
132 UINT64 EntryBaseAddress
;
134 UINT32 EntryAddress32
;
135 UINT64 EntryAddress64
;
137 UINT64 LogAreaAddress
;
138 UINT32 LogAreaLength
;
139 UINT64 ArchDependentAddress
;
144 /* 1) Validated Tables List */
146 typedef struct acpi_drtm_vtl_list
148 UINT32 ValidatedTableListCount
;
150 } ACPI_DRTM_VTL_LIST
;
152 /* 2) Resources List */
154 typedef struct acpi_drtm_resource_list
156 UINT32 ResourceListCount
;
158 } ACPI_DRTM_RESOURCE_LIST
;
160 /* 3) Platform-specific Identifiers List */
162 typedef struct acpi_drtm_id_list
169 /*******************************************************************************
171 * FPDT - Firmware Performance Data Table (ACPI 5.0)
174 ******************************************************************************/
176 typedef struct acpi_table_fpdt
178 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
183 /* FPDT subtable header */
185 typedef struct acpi_fpdt_header
193 /* Values for Type field above */
197 ACPI_FPDT_TYPE_BOOT
= 0,
198 ACPI_FPDT_TYPE_S3PERF
= 1
206 /* 0: Firmware Basic Boot Performance Record */
208 typedef struct acpi_fpdt_boot
210 ACPI_FPDT_HEADER Header
;
215 UINT64 ExitServicesEntry
;
216 UINT64 ExitServicesExit
;
221 /* 1: S3 Performance Table Pointer Record */
223 typedef struct acpi_fpdt_s3pt_ptr
225 ACPI_FPDT_HEADER Header
;
229 } ACPI_FPDT_S3PT_PTR
;
233 * S3PT - S3 Performance Table. This table is pointed to by the
234 * FPDT S3 Pointer Record above.
236 typedef struct acpi_table_s3pt
238 UINT8 Signature
[4]; /* "S3PT" */
247 typedef struct acpi_s3pt_header
255 /* Values for Type field above */
259 ACPI_S3PT_TYPE_RESUME
= 0,
260 ACPI_S3PT_TYPE_SUSPEND
= 1
263 typedef struct acpi_s3pt_resume
265 ACPI_S3PT_HEADER Header
;
268 UINT64 AverageResume
;
272 typedef struct acpi_s3pt_suspend
274 ACPI_S3PT_HEADER Header
;
281 /*******************************************************************************
283 * GTDT - Generic Timer Description Table (ACPI 5.0)
286 ******************************************************************************/
288 typedef struct acpi_table_gtdt
290 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
293 UINT32 SecurePl1Interrupt
;
294 UINT32 SecurePl1Flags
;
295 UINT32 NonSecurePl1Interrupt
;
296 UINT32 NonSecurePl1Flags
;
297 UINT32 VirtualTimerInterrupt
;
298 UINT32 VirtualTimerFlags
;
299 UINT32 NonSecurePl2Interrupt
;
300 UINT32 NonSecurePl2Flags
;
304 /* Values for Flags field above */
306 #define ACPI_GTDT_MAPPED_BLOCK_PRESENT 1
308 /* Values for all "TimerFlags" fields above */
310 #define ACPI_GTDT_INTERRUPT_MODE 1
311 #define ACPI_GTDT_INTERRUPT_POLARITY 2
314 /*******************************************************************************
316 * MPST - Memory Power State Table (ACPI 5.0)
319 ******************************************************************************/
321 #define ACPI_MPST_CHANNEL_INFO \
323 UINT8 Reserved1[3]; \
324 UINT16 PowerNodeCount; \
329 typedef struct acpi_table_mpst
331 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
332 ACPI_MPST_CHANNEL_INFO
/* Platform Communication Channel */
337 /* Memory Platform Communication Channel Info */
339 typedef struct acpi_mpst_channel
341 ACPI_MPST_CHANNEL_INFO
/* Platform Communication Channel */
346 /* Memory Power Node Structure */
348 typedef struct acpi_mpst_power_node
356 UINT32 NumPowerStates
;
357 UINT32 NumPhysicalComponents
;
359 } ACPI_MPST_POWER_NODE
;
361 /* Values for Flags field above */
363 #define ACPI_MPST_ENABLED 1
364 #define ACPI_MPST_POWER_MANAGED 2
365 #define ACPI_MPST_HOT_PLUG_CAPABLE 4
368 /* Memory Power State Structure (follows POWER_NODE above) */
370 typedef struct acpi_mpst_power_state
375 } ACPI_MPST_POWER_STATE
;
378 /* Physical Component ID Structure (follows POWER_STATE above) */
380 typedef struct acpi_mpst_component
384 } ACPI_MPST_COMPONENT
;
387 /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
389 typedef struct acpi_mpst_data_hdr
391 UINT16 CharacteristicsCount
;
394 } ACPI_MPST_DATA_HDR
;
396 typedef struct acpi_mpst_power_data
406 } ACPI_MPST_POWER_DATA
;
408 /* Values for Flags field above */
410 #define ACPI_MPST_PRESERVE 1
411 #define ACPI_MPST_AUTOENTRY 2
412 #define ACPI_MPST_AUTOEXIT 4
415 /* Shared Memory Region (not part of an ACPI table) */
417 typedef struct acpi_mpst_shared
422 UINT32 CommandRegister
;
423 UINT32 StatusRegister
;
426 UINT64 EnergyConsumed
;
432 /*******************************************************************************
434 * PCCT - Platform Communications Channel Table (ACPI 5.0)
437 ******************************************************************************/
439 typedef struct acpi_table_pcct
441 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
448 /* Values for Flags field above */
450 #define ACPI_PCCT_DOORBELL 1
456 /* 0: Generic Communications Subspace */
458 typedef struct acpi_pcct_subspace
460 ACPI_SUBTABLE_HEADER Header
;
464 ACPI_GENERIC_ADDRESS DoorbellRegister
;
468 } ACPI_PCCT_SUBSPACE
;
472 * PCC memory structures (not part of the ACPI table)
475 /* Shared Memory Region */
477 typedef struct acpi_pcct_shared_memory
483 } ACPI_PCCT_SHARED_MEMORY
;
486 /*******************************************************************************
488 * PMTT - Platform Memory Topology Table (ACPI 5.0)
491 ******************************************************************************/
493 typedef struct acpi_table_pmtt
495 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
501 /* Common header for PMTT subtables that follow main table */
503 typedef struct acpi_pmtt_header
513 /* Values for Type field above */
515 #define ACPI_PMTT_TYPE_SOCKET 0
516 #define ACPI_PMTT_TYPE_CONTROLLER 1
517 #define ACPI_PMTT_TYPE_DIMM 2
518 #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */
520 /* Values for Flags field above */
522 #define ACPI_PMTT_TOP_LEVEL 0x0001
523 #define ACPI_PMTT_PHYSICAL 0x0002
524 #define ACPI_PMTT_MEMORY_TYPE 0x000C
528 * PMTT subtables, correspond to Type in acpi_pmtt_header
532 /* 0: Socket Structure */
534 typedef struct acpi_pmtt_socket
536 ACPI_PMTT_HEADER Header
;
543 /* 1: Memory Controller subtable */
545 typedef struct acpi_pmtt_controller
547 ACPI_PMTT_HEADER Header
;
550 UINT32 ReadBandwidth
;
551 UINT32 WriteBandwidth
;
557 } ACPI_PMTT_CONTROLLER
;
559 /* 1a: Proximity Domain substructure */
561 typedef struct acpi_pmtt_domain
563 UINT32 ProximityDomain
;
568 /* 2: Physical Component Identifier (DIMM) */
570 typedef struct acpi_pmtt_physical_component
572 ACPI_PMTT_HEADER Header
;
578 } ACPI_PMTT_PHYSICAL_COMPONENT
;
581 /*******************************************************************************
583 * RASF - RAS Feature Table (ACPI 5.0)
586 ******************************************************************************/
588 typedef struct acpi_table_rasf
590 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
595 /* RASF Platform Communication Channel Shared Memory Region */
597 typedef struct acpi_rasf_shared_memory
603 UINT8 Capabilities
[16];
604 UINT8 SetCapabilities
[16];
605 UINT16 NumParameterBlocks
;
606 UINT32 SetCapabilitiesStatus
;
608 } ACPI_RASF_SHARED_MEMORY
;
610 /* RASF Parameter Block Structure Header */
612 typedef struct acpi_rasf_parameter_block
618 } ACPI_RASF_PARAMETER_BLOCK
;
620 /* RASF Parameter Block Structure for PATROL_SCRUB */
622 typedef struct acpi_rasf_patrol_scrub_parameter
624 ACPI_RASF_PARAMETER_BLOCK Header
;
625 UINT16 PatrolScrubCommand
;
626 UINT64 RequestedAddressRange
[2];
627 UINT64 ActualAddressRange
[2];
629 UINT8 RequestedSpeed
;
631 } ACPI_RASF_PATROL_SCRUB_PARAMETER
;
633 /* Masks for Flags and Speed fields above */
635 #define ACPI_RASF_SCRUBBER_RUNNING 1
636 #define ACPI_RASF_SPEED (7<<1)
637 #define ACPI_RASF_SPEED_SLOW (0<<1)
638 #define ACPI_RASF_SPEED_MEDIUM (4<<1)
639 #define ACPI_RASF_SPEED_FAST (7<<1)
641 /* Channel Commands */
643 enum AcpiRasfCommands
645 ACPI_RASF_EXECUTE_RASF_COMMAND
= 1
648 /* Platform RAS Capabilities */
650 enum AcpiRasfCapabiliities
652 ACPI_HW_PATROL_SCRUB_SUPPORTED
= 0,
653 ACPI_SW_PATROL_SCRUB_EXPOSED
= 1
656 /* Patrol Scrub Commands */
658 enum AcpiRasfPatrolScrubCommands
660 ACPI_RASF_GET_PATROL_PARAMETERS
= 1,
661 ACPI_RASF_START_PATROL_SCRUBBER
= 2,
662 ACPI_RASF_STOP_PATROL_SCRUBBER
= 3
665 /* Channel Command flags */
667 #define ACPI_RASF_GENERATE_SCI (1<<15)
673 ACPI_RASF_SUCCESS
= 0,
674 ACPI_RASF_NOT_VALID
= 1,
675 ACPI_RASF_NOT_SUPPORTED
= 2,
677 ACPI_RASF_FAILED
= 4,
678 ACPI_RASF_ABORTED
= 5,
679 ACPI_RASF_INVALID_DATA
= 6
684 #define ACPI_RASF_COMMAND_COMPLETE (1)
685 #define ACPI_RASF_SCI_DOORBELL (1<<1)
686 #define ACPI_RASF_ERROR (1<<2)
687 #define ACPI_RASF_STATUS (0x1F<<3)
690 /*******************************************************************************
692 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
695 * Conforms to "TPM 2.0 Hardware Interface Table (TPM2)" 29 November 2011
697 ******************************************************************************/
699 typedef struct acpi_table_tpm2
701 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
703 UINT64 ControlAddress
;
708 /* Control area structure (not part of table, pointed to by ControlAddress) */
710 typedef struct acpi_tpm2_control
716 UINT64 InterruptControl
;
718 UINT64 CommandAddress
;
720 UINT64 ResponseAddress
;
725 /* Reset to default packing */
729 #endif /* __ACTBL3_H__ */