1 /******************************************************************************
3 * Name: actbl3.h - ACPI Table Definitions
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2014, 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 #pragma pack(push) /* Set default struct packing */
50 /*******************************************************************************
52 * Additional ACPI Tables (3)
54 * These tables are not consumed directly by the ACPICA subsystem, but are
55 * included here to support device drivers and the AML disassembler.
57 * The tables in this file are fully defined within the ACPI specification.
59 ******************************************************************************/
63 * Values for description table header signatures for tables defined in this
64 * file. Useful because they make it more difficult to inadvertently type in
65 * the wrong signature.
67 #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
68 #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
69 #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
70 #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
71 #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
72 #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
73 #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
74 #define ACPI_SIG_RASF "RASF" /* RAS Feature table */
75 #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
77 #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
78 #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
80 /* Reserved table signatures */
82 #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
83 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
84 #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
87 * All tables must be byte-packed to match the ACPI specification, since
88 * the tables are provided by the system BIOS.
93 * Note: C bitfields are not used for this reason:
95 * "Bitfields are great and easy to read, but unfortunately the C language
96 * does not specify the layout of bitfields in memory, which means they are
97 * essentially useless for dealing with packed data in on-disk formats or
98 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
99 * this decision was a design error in C. Ritchie could have picked an order
100 * and stuck with it." Norman Ramsey.
101 * See http://stackoverflow.com/a/1053662/41661
105 /*******************************************************************************
107 * BGRT - Boot Graphics Resource Table (ACPI 5.0)
110 ******************************************************************************/
112 typedef struct acpi_table_bgrt
114 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
125 /*******************************************************************************
127 * DRTM - Dynamic Root of Trust for Measurement table
129 ******************************************************************************/
131 typedef struct acpi_table_drtm
133 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
134 UINT64 EntryBaseAddress;
136 UINT32 EntryAddress32;
137 UINT64 EntryAddress64;
139 UINT64 LogAreaAddress;
140 UINT32 LogAreaLength;
141 UINT64 ArchDependentAddress;
146 /* 1) Validated Tables List */
148 typedef struct acpi_drtm_vtl_list
150 UINT32 ValidatedTableListCount;
152 } ACPI_DRTM_VTL_LIST;
154 /* 2) Resources List */
156 typedef struct acpi_drtm_resource_list
158 UINT32 ResourceListCount;
160 } ACPI_DRTM_RESOURCE_LIST;
162 /* 3) Platform-specific Identifiers List */
164 typedef struct acpi_drtm_id_list
171 /*******************************************************************************
173 * FPDT - Firmware Performance Data Table (ACPI 5.0)
176 ******************************************************************************/
178 typedef struct acpi_table_fpdt
180 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
185 /* FPDT subtable header */
187 typedef struct acpi_fpdt_header
195 /* Values for Type field above */
199 ACPI_FPDT_TYPE_BOOT = 0,
200 ACPI_FPDT_TYPE_S3PERF = 1
208 /* 0: Firmware Basic Boot Performance Record */
210 typedef struct acpi_fpdt_boot
212 ACPI_FPDT_HEADER Header;
217 UINT64 ExitServicesEntry;
218 UINT64 ExitServicesExit;
223 /* 1: S3 Performance Table Pointer Record */
225 typedef struct acpi_fpdt_s3pt_ptr
227 ACPI_FPDT_HEADER Header;
231 } ACPI_FPDT_S3PT_PTR;
235 * S3PT - S3 Performance Table. This table is pointed to by the
236 * FPDT S3 Pointer Record above.
238 typedef struct acpi_table_s3pt
240 UINT8 Signature[4]; /* "S3PT" */
249 typedef struct acpi_s3pt_header
257 /* Values for Type field above */
261 ACPI_S3PT_TYPE_RESUME = 0,
262 ACPI_S3PT_TYPE_SUSPEND = 1
265 typedef struct acpi_s3pt_resume
267 ACPI_S3PT_HEADER Header;
270 UINT64 AverageResume;
274 typedef struct acpi_s3pt_suspend
276 ACPI_S3PT_HEADER Header;
283 /*******************************************************************************
285 * GTDT - Generic Timer Description Table (ACPI 5.0)
288 ******************************************************************************/
290 typedef struct acpi_table_gtdt
292 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
295 UINT32 SecurePl1Interrupt;
296 UINT32 SecurePl1Flags;
297 UINT32 NonSecurePl1Interrupt;
298 UINT32 NonSecurePl1Flags;
299 UINT32 VirtualTimerInterrupt;
300 UINT32 VirtualTimerFlags;
301 UINT32 NonSecurePl2Interrupt;
302 UINT32 NonSecurePl2Flags;
306 /* Values for Flags field above */
308 #define ACPI_GTDT_MAPPED_BLOCK_PRESENT 1
310 /* Values for all "TimerFlags" fields above */
312 #define ACPI_GTDT_INTERRUPT_MODE 1
313 #define ACPI_GTDT_INTERRUPT_POLARITY 2
316 /*******************************************************************************
318 * MPST - Memory Power State Table (ACPI 5.0)
321 ******************************************************************************/
323 #define ACPI_MPST_CHANNEL_INFO \
325 UINT8 Reserved1[3]; \
326 UINT16 PowerNodeCount; \
331 typedef struct acpi_table_mpst
333 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
334 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
339 /* Memory Platform Communication Channel Info */
341 typedef struct acpi_mpst_channel
343 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
348 /* Memory Power Node Structure */
350 typedef struct acpi_mpst_power_node
358 UINT32 NumPowerStates;
359 UINT32 NumPhysicalComponents;
361 } ACPI_MPST_POWER_NODE;
363 /* Values for Flags field above */
365 #define ACPI_MPST_ENABLED 1
366 #define ACPI_MPST_POWER_MANAGED 2
367 #define ACPI_MPST_HOT_PLUG_CAPABLE 4
370 /* Memory Power State Structure (follows POWER_NODE above) */
372 typedef struct acpi_mpst_power_state
377 } ACPI_MPST_POWER_STATE;
380 /* Physical Component ID Structure (follows POWER_STATE above) */
382 typedef struct acpi_mpst_component
386 } ACPI_MPST_COMPONENT;
389 /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
391 typedef struct acpi_mpst_data_hdr
393 UINT16 CharacteristicsCount;
396 } ACPI_MPST_DATA_HDR;
398 typedef struct acpi_mpst_power_data
408 } ACPI_MPST_POWER_DATA;
410 /* Values for Flags field above */
412 #define ACPI_MPST_PRESERVE 1
413 #define ACPI_MPST_AUTOENTRY 2
414 #define ACPI_MPST_AUTOEXIT 4
417 /* Shared Memory Region (not part of an ACPI table) */
419 typedef struct acpi_mpst_shared
424 UINT32 CommandRegister;
425 UINT32 StatusRegister;
428 UINT64 EnergyConsumed;
434 /*******************************************************************************
436 * PCCT - Platform Communications Channel Table (ACPI 5.0)
439 ******************************************************************************/
441 typedef struct acpi_table_pcct
443 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
449 /* Values for Flags field above */
451 #define ACPI_PCCT_DOORBELL 1
453 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
457 ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0,
458 ACPI_PCCT_TYPE_RESERVED = 1 /* 1 and greater are reserved */
462 * PCCT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
465 /* 0: Generic Communications Subspace */
467 typedef struct acpi_pcct_subspace
469 ACPI_SUBTABLE_HEADER Header;
473 ACPI_GENERIC_ADDRESS DoorbellRegister;
477 UINT32 MaxAccessRate;
478 UINT16 MinTurnaroundTime;
480 } ACPI_PCCT_SUBSPACE;
484 * PCC memory structures (not part of the ACPI table)
487 /* Shared Memory Region */
489 typedef struct acpi_pcct_shared_memory
495 } ACPI_PCCT_SHARED_MEMORY;
498 /*******************************************************************************
500 * PMTT - Platform Memory Topology Table (ACPI 5.0)
503 ******************************************************************************/
505 typedef struct acpi_table_pmtt
507 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
513 /* Common header for PMTT subtables that follow main table */
515 typedef struct acpi_pmtt_header
525 /* Values for Type field above */
527 #define ACPI_PMTT_TYPE_SOCKET 0
528 #define ACPI_PMTT_TYPE_CONTROLLER 1
529 #define ACPI_PMTT_TYPE_DIMM 2
530 #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */
532 /* Values for Flags field above */
534 #define ACPI_PMTT_TOP_LEVEL 0x0001
535 #define ACPI_PMTT_PHYSICAL 0x0002
536 #define ACPI_PMTT_MEMORY_TYPE 0x000C
540 * PMTT subtables, correspond to Type in acpi_pmtt_header
544 /* 0: Socket Structure */
546 typedef struct acpi_pmtt_socket
548 ACPI_PMTT_HEADER Header;
555 /* 1: Memory Controller subtable */
557 typedef struct acpi_pmtt_controller
559 ACPI_PMTT_HEADER Header;
562 UINT32 ReadBandwidth;
563 UINT32 WriteBandwidth;
569 } ACPI_PMTT_CONTROLLER;
571 /* 1a: Proximity Domain substructure */
573 typedef struct acpi_pmtt_domain
575 UINT32 ProximityDomain;
580 /* 2: Physical Component Identifier (DIMM) */
582 typedef struct acpi_pmtt_physical_component
584 ACPI_PMTT_HEADER Header;
590 } ACPI_PMTT_PHYSICAL_COMPONENT;
593 /*******************************************************************************
595 * RASF - RAS Feature Table (ACPI 5.0)
598 ******************************************************************************/
600 typedef struct acpi_table_rasf
602 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
607 /* RASF Platform Communication Channel Shared Memory Region */
609 typedef struct acpi_rasf_shared_memory
615 UINT8 Capabilities[16];
616 UINT8 SetCapabilities[16];
617 UINT16 NumParameterBlocks;
618 UINT32 SetCapabilitiesStatus;
620 } ACPI_RASF_SHARED_MEMORY;
622 /* RASF Parameter Block Structure Header */
624 typedef struct acpi_rasf_parameter_block
630 } ACPI_RASF_PARAMETER_BLOCK;
632 /* RASF Parameter Block Structure for PATROL_SCRUB */
634 typedef struct acpi_rasf_patrol_scrub_parameter
636 ACPI_RASF_PARAMETER_BLOCK Header;
637 UINT16 PatrolScrubCommand;
638 UINT64 RequestedAddressRange[2];
639 UINT64 ActualAddressRange[2];
641 UINT8 RequestedSpeed;
643 } ACPI_RASF_PATROL_SCRUB_PARAMETER;
645 /* Masks for Flags and Speed fields above */
647 #define ACPI_RASF_SCRUBBER_RUNNING 1
648 #define ACPI_RASF_SPEED (7<<1)
649 #define ACPI_RASF_SPEED_SLOW (0<<1)
650 #define ACPI_RASF_SPEED_MEDIUM (4<<1)
651 #define ACPI_RASF_SPEED_FAST (7<<1)
653 /* Channel Commands */
655 enum AcpiRasfCommands
657 ACPI_RASF_EXECUTE_RASF_COMMAND = 1
660 /* Platform RAS Capabilities */
662 enum AcpiRasfCapabiliities
664 ACPI_HW_PATROL_SCRUB_SUPPORTED = 0,
665 ACPI_SW_PATROL_SCRUB_EXPOSED = 1
668 /* Patrol Scrub Commands */
670 enum AcpiRasfPatrolScrubCommands
672 ACPI_RASF_GET_PATROL_PARAMETERS = 1,
673 ACPI_RASF_START_PATROL_SCRUBBER = 2,
674 ACPI_RASF_STOP_PATROL_SCRUBBER = 3
677 /* Channel Command flags */
679 #define ACPI_RASF_GENERATE_SCI (1<<15)
685 ACPI_RASF_SUCCESS = 0,
686 ACPI_RASF_NOT_VALID = 1,
687 ACPI_RASF_NOT_SUPPORTED = 2,
689 ACPI_RASF_FAILED = 4,
690 ACPI_RASF_ABORTED = 5,
691 ACPI_RASF_INVALID_DATA = 6
696 #define ACPI_RASF_COMMAND_COMPLETE (1)
697 #define ACPI_RASF_SCI_DOORBELL (1<<1)
698 #define ACPI_RASF_ERROR (1<<2)
699 #define ACPI_RASF_STATUS (0x1F<<3)
702 /*******************************************************************************
704 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
707 * Conforms to "TPM 2.0 Hardware Interface Table (TPM2)" 29 November 2011
709 ******************************************************************************/
711 typedef struct acpi_table_tpm2
713 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
715 UINT64 ControlAddress;
720 /* Control area structure (not part of table, pointed to by ControlAddress) */
722 typedef struct acpi_tpm2_control
728 UINT64 InterruptControl;
730 UINT64 CommandAddress;
732 UINT64 ResponseAddress;
737 #pragma pack(pop) /* Restore original struct packing */
739 #endif /* __ACTBL3_H__ */