linux/include/acpi/actbl3.h

/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
/******************************************************************************
 *
 * Name: actbl3.h - ACPI Table Definitions
 *
 * Copyright (C) 2000 - 2023, Intel Corp.
 *
 *****************************************************************************/

#ifndef __ACTBL3_H__
#define __ACTBL3_H__

/*******************************************************************************
 *
 * Additional ACPI Tables
 *
 * These tables are not consumed directly by the ACPICA subsystem, but are
 * included here to support device drivers and the AML disassembler.
 *
 ******************************************************************************/

/*
 * Values for description table header signatures for tables defined in this
 * file. Useful because they make it more difficult to inadvertently type in
 * the wrong signature.
 */
#define ACPI_SIG_SLIC
#define ACPI_SIG_SLIT
#define ACPI_SIG_SPCR
#define ACPI_SIG_SPMI
#define ACPI_SIG_SRAT
#define ACPI_SIG_STAO
#define ACPI_SIG_TCPA
#define ACPI_SIG_TPM2
#define ACPI_SIG_UEFI
#define ACPI_SIG_VIOT
#define ACPI_SIG_WAET
#define ACPI_SIG_WDAT
#define ACPI_SIG_WDDT
#define ACPI_SIG_WDRT
#define ACPI_SIG_WPBT
#define ACPI_SIG_WSMT
#define ACPI_SIG_XENV
#define ACPI_SIG_XXXX

/*
 * All tables must be byte-packed to match the ACPI specification, since
 * the tables are provided by the system BIOS.
 */
#pragma pack(1)

/*
 * Note: C bitfields are not used for this reason:
 *
 * "Bitfields are great and easy to read, but unfortunately the C language
 * does not specify the layout of bitfields in memory, which means they are
 * essentially useless for dealing with packed data in on-disk formats or
 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
 * this decision was a design error in C. Ritchie could have picked an order
 * and stuck with it." Norman Ramsey.
 * See http://stackoverflow.com/a/1053662/41661
 */

/*******************************************************************************
 *
 * SLIC - Software Licensing Description Table
 *
 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
 * November 29, 2011. Copyright 2011 Microsoft
 *
 ******************************************************************************/

/* Basic SLIC table is only the common ACPI header */

struct acpi_table_slic {};

/*******************************************************************************
 *
 * SLIT - System Locality Distance Information Table
 *        Version 1
 *
 ******************************************************************************/

struct acpi_table_slit {};

/*******************************************************************************
 *
 * SPCR - Serial Port Console Redirection table
 *        Version 4
 *
 * Conforms to "Serial Port Console Redirection Table",
 * Version 1.10, Jan 5, 2023
 *
 ******************************************************************************/

struct acpi_table_spcr {};

/* Masks for pci_flags field above */

#define ACPI_SPCR_DO_NOT_DISABLE

/* Values for Interface Type: See the definition of the DBG2 table */

/*******************************************************************************
 *
 * SPMI - Server Platform Management Interface table
 *        Version 5
 *
 * Conforms to "Intelligent Platform Management Interface Specification
 * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
 * June 12, 2009 markup.
 *
 ******************************************************************************/

struct acpi_table_spmi {};

/* Values for interface_type above */

enum acpi_spmi_interface_types {};

/*******************************************************************************
 *
 * SRAT - System Resource Affinity Table
 *        Version 3
 *
 ******************************************************************************/

struct acpi_table_srat {};

/* Values for subtable type in struct acpi_subtable_header */

enum acpi_srat_type {};

/*
 * SRAT Subtables, correspond to Type in struct acpi_subtable_header
 */

/* 0: Processor Local APIC/SAPIC Affinity */

struct acpi_srat_cpu_affinity {};

/* Flags */

#define ACPI_SRAT_CPU_USE_AFFINITY

/* 1: Memory Affinity */

struct acpi_srat_mem_affinity {};

/* Flags */

#define ACPI_SRAT_MEM_ENABLED
#define ACPI_SRAT_MEM_HOT_PLUGGABLE
#define ACPI_SRAT_MEM_NON_VOLATILE

/* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */

struct acpi_srat_x2apic_cpu_affinity {};

/* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */

#define ACPI_SRAT_CPU_ENABLED

/* 3: GICC Affinity (ACPI 5.1) */

struct acpi_srat_gicc_affinity {};

/* Flags for struct acpi_srat_gicc_affinity */

#define ACPI_SRAT_GICC_ENABLED

/* 4: GCC ITS Affinity (ACPI 6.2) */

struct acpi_srat_gic_its_affinity {};

/*
 * Common structure for SRAT subtable types:
 * 5: ACPI_SRAT_TYPE_GENERIC_AFFINITY
 * 6: ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY
 */

#define ACPI_SRAT_DEVICE_HANDLE_SIZE

struct acpi_srat_generic_affinity {};

/* Flags for struct acpi_srat_generic_affinity */

#define ACPI_SRAT_GENERIC_AFFINITY_ENABLED
#define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS

/* 7: RINTC Affinity Structure(ACPI 6.6) */

struct acpi_srat_rintc_affinity {};

/* Flags for struct acpi_srat_rintc_affinity */

#define ACPI_SRAT_RINTC_ENABLED

/*******************************************************************************
 *
 * STAO - Status Override Table (_STA override) - ACPI 6.0
 *        Version 1
 *
 * Conforms to "ACPI Specification for Status Override Table"
 * 6 January 2015
 *
 ******************************************************************************/

struct acpi_table_stao {};

/*******************************************************************************
 *
 * TCPA - Trusted Computing Platform Alliance table
 *        Version 2
 *
 * TCG Hardware Interface Table for TPM 1.2 Clients and Servers
 *
 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
 * Version 1.2, Revision 8
 * February 27, 2017
 *
 * NOTE: There are two versions of the table with the same signature --
 * the client version and the server version. The common platform_class
 * field is used to differentiate the two types of tables.
 *
 ******************************************************************************/

struct acpi_table_tcpa_hdr {};

/*
 * Values for platform_class above.
 * This is how the client and server subtables are differentiated
 */
#define ACPI_TCPA_CLIENT_TABLE
#define ACPI_TCPA_SERVER_TABLE

struct acpi_table_tcpa_client {};

struct acpi_table_tcpa_server {};

/* Values for device_flags above */

#define ACPI_TCPA_PCI_DEVICE
#define ACPI_TCPA_BUS_PNP
#define ACPI_TCPA_ADDRESS_VALID

/* Values for interrupt_flags above */

#define ACPI_TCPA_INTERRUPT_MODE
#define ACPI_TCPA_INTERRUPT_POLARITY
#define ACPI_TCPA_SCI_VIA_GPE
#define ACPI_TCPA_GLOBAL_INTERRUPT

/*******************************************************************************
 *
 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
 *        Version 4
 *
 * TCG Hardware Interface Table for TPM 2.0 Clients and Servers
 *
 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
 * Version 1.2, Revision 8
 * February 27, 2017
 *
 ******************************************************************************/

/* Revision 3 */

struct acpi_table_tpm23 {};

/* Value for start_method above */

#define ACPI_TPM23_ACPI_START_METHOD

/*
 * Optional trailer for revision 3. If start method is 2, there is a 4 byte
 * reserved area of all zeros.
 */
struct acpi_tmp23_trailer {};

/* Revision 4 */

struct acpi_table_tpm2 {};

/* Optional trailer for revision 4 holding platform-specific data */
struct acpi_tpm2_phy {};

/* Values for start_method above */

#define ACPI_TPM2_NOT_ALLOWED
#define ACPI_TPM2_RESERVED1
#define ACPI_TPM2_START_METHOD
#define ACPI_TPM2_RESERVED3
#define ACPI_TPM2_RESERVED4
#define ACPI_TPM2_RESERVED5
#define ACPI_TPM2_MEMORY_MAPPED
#define ACPI_TPM2_COMMAND_BUFFER
#define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD
#define ACPI_TPM2_RESERVED9
#define ACPI_TPM2_RESERVED10
#define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC
#define ACPI_TPM2_RESERVED
#define ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON

/* Optional trailer appears after any start_method subtables */

struct acpi_tpm2_trailer {};

/*
 * Subtables (start_method-specific)
 */

/* 11: Start Method for ARM SMC (V1.2 Rev 8) */

struct acpi_tpm2_arm_smc {};

/* Values for interrupt_flags above */

#define ACPI_TPM2_INTERRUPT_SUPPORT

/* Values for operation_flags above */

#define ACPI_TPM2_IDLE_SUPPORT

/*******************************************************************************
 *
 * UEFI - UEFI Boot optimization Table
 *        Version 1
 *
 * Conforms to "Unified Extensible Firmware Interface Specification",
 * Version 2.3, May 8, 2009
 *
 ******************************************************************************/

struct acpi_table_uefi {};

/*******************************************************************************
 *
 * VIOT - Virtual I/O Translation Table
 *        Version 1
 *
 ******************************************************************************/

struct acpi_table_viot {};

/* VIOT subtable header */

struct acpi_viot_header {};

/* Values for Type field above */

enum acpi_viot_node_type {};

/* VIOT subtables */

struct acpi_viot_pci_range {};

struct acpi_viot_mmio {};

struct acpi_viot_virtio_iommu_pci {};

struct acpi_viot_virtio_iommu_mmio {};

/*******************************************************************************
 *
 * WAET - Windows ACPI Emulated devices Table
 *        Version 1
 *
 * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
 *
 ******************************************************************************/

struct acpi_table_waet {};

/* Masks for Flags field above */

#define ACPI_WAET_RTC_NO_ACK
#define ACPI_WAET_TIMER_ONE_READ

/*******************************************************************************
 *
 * WDAT - Watchdog Action Table
 *        Version 1
 *
 * Conforms to "Hardware Watchdog Timers Design Specification",
 * Copyright 2006 Microsoft Corporation.
 *
 ******************************************************************************/

struct acpi_table_wdat {};

/* Masks for Flags field above */

#define ACPI_WDAT_ENABLED
#define ACPI_WDAT_STOPPED

/* WDAT Instruction Entries (actions) */

struct acpi_wdat_entry {};

/* Values for Action field above */

enum acpi_wdat_actions {};

/* Values for Instruction field above */

enum acpi_wdat_instructions {};

/*******************************************************************************
 *
 * WDDT - Watchdog Descriptor Table
 *        Version 1
 *
 * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
 * Version 001, September 2002
 *
 ******************************************************************************/

struct acpi_table_wddt {};

/* Flags for Status field above */

#define ACPI_WDDT_AVAILABLE
#define ACPI_WDDT_ACTIVE
#define ACPI_WDDT_TCO_OS_OWNED
#define ACPI_WDDT_USER_RESET
#define ACPI_WDDT_WDT_RESET
#define ACPI_WDDT_POWER_FAIL
#define ACPI_WDDT_UNKNOWN_RESET

/* Flags for Capability field above */

#define ACPI_WDDT_AUTO_RESET
#define ACPI_WDDT_ALERT_SUPPORT

/*******************************************************************************
 *
 * WDRT - Watchdog Resource Table
 *        Version 1
 *
 * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
 * Version 1.01, August 28, 2006
 *
 ******************************************************************************/

struct acpi_table_wdrt {};

/*******************************************************************************
 *
 * WPBT - Windows Platform Environment Table (ACPI 6.0)
 *        Version 1
 *
 * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
 *
 ******************************************************************************/

struct acpi_table_wpbt {};

struct acpi_wpbt_unicode {};

/*******************************************************************************
 *
 * WSMT - Windows SMM Security Mitigations Table
 *        Version 1
 *
 * Conforms to "Windows SMM Security Mitigations Table",
 * Version 1.0, April 18, 2016
 *
 ******************************************************************************/

struct acpi_table_wsmt {};

/* Flags for protection_flags field above */

#define ACPI_WSMT_FIXED_COMM_BUFFERS
#define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION
#define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION

/*******************************************************************************
 *
 * XENV - Xen Environment Table (ACPI 6.0)
 *        Version 1
 *
 * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
 *
 ******************************************************************************/

struct acpi_table_xenv {};

/* Reset to default packing */

#pragma pack()

#endif				/* __ACTBL3_H__ */