actbl1.h revision 199767f8919635c4928607450d9e0abb932109ce
/******************************************************************************
*
* Name: actbl1.h - Additional ACPI table definitions
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
#ifndef __ACTBL1_H__
#define __ACTBL1_H__
/*******************************************************************************
*
* Additional ACPI Tables (1)
*
* These tables are not consumed directly by the ACPICA subsystem, but are
* included here to support device drivers and the AML disassembler.
*
* The tables in this file are fully defined within the ACPI specification.
*
******************************************************************************/
/*
* 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.
*/
/*
* 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.
*/
/*******************************************************************************
*
* Common subtable headers
*
******************************************************************************/
/* Generic subtable header (used in MADT, SRAT, etc.) */
typedef struct acpi_subtable_header
{
/* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
typedef struct acpi_whea_header
{
/*******************************************************************************
*
* BERT - Boot Error Record Table (ACPI 4.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_bert
{
/* Boot Error Region (not a subtable, pointed to by Address field above) */
typedef struct acpi_bert_region
{
/* Values for BlockStatus flags above */
#define ACPI_BERT_UNCORRECTABLE (1)
/* Values for ErrorSeverity above */
{
ACPI_BERT_ERROR_NONE = 3,
};
/*
* Note: The generic error data that follows the ErrorSeverity field above
* uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below
*/
/*******************************************************************************
*
* CPEP - Corrected Platform Error Polling table (ACPI 4.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_cpep
{
/* Subtable */
typedef struct acpi_cpep_polling
{
/*******************************************************************************
*
* ECDT - Embedded Controller Boot Resources Table
* Version 1
*
******************************************************************************/
typedef struct acpi_table_ecdt
{
/*******************************************************************************
*
* EINJ - Error Injection Table (ACPI 4.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_einj
{
/* EINJ Injection Instruction Entries (actions) */
typedef struct acpi_einj_entry
{
/* Masks for Flags field above */
#define ACPI_EINJ_PRESERVE (1)
/* Values for Action field above */
enum AcpiEinjActions
{
};
/* Values for Instruction field above */
enum AcpiEinjInstructions
{
ACPI_EINJ_NOOP = 4,
};
typedef struct acpi_einj_error_type_with_addr
{
typedef struct acpi_einj_vendor
{
/* EINJ Trigger Error Action Table */
typedef struct acpi_einj_trigger
{
/* Command status return values */
{
ACPI_EINJ_SUCCESS = 0,
ACPI_EINJ_FAILURE = 1,
};
/* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
#define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
/*******************************************************************************
*
* ERST - Error Record Serialization Table (ACPI 4.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_erst
{
/* ERST Serialization Entries (actions) */
typedef struct acpi_erst_entry
{
/* Masks for Flags field above */
#define ACPI_ERST_PRESERVE (1)
/* Values for Action field above */
enum AcpiErstActions
{
ACPI_ERST_BEGIN_READ = 1,
ACPI_ERST_END = 3,
ACPI_ERST_NOT_USED = 12,
};
/* Values for Instruction field above */
enum AcpiErstInstructions
{
ACPI_ERST_NOOP = 4,
ACPI_ERST_LOAD_VAR1 = 5,
ACPI_ERST_LOAD_VAR2 = 6,
ACPI_ERST_STORE_VAR1 = 7,
ACPI_ERST_ADD = 8,
ACPI_ERST_SUBTRACT = 9,
ACPI_ERST_ADD_VALUE = 10,
ACPI_ERST_SUBTRACT_VALUE = 11,
ACPI_ERST_STALL = 12,
ACPI_ERST_GOTO = 15,
ACPI_ERST_MOVE_DATA = 18,
};
/* Command status return values */
{
ACPI_ERST_SUCESS = 0,
ACPI_ERST_NO_SPACE = 1,
ACPI_ERST_FAILURE = 3,
ACPI_ERST_NOT_FOUND = 5,
};
/* Error Record Serialization Information */
typedef struct acpi_erst_info
{
/*******************************************************************************
*
* HEST - Hardware Error Source Table (ACPI 4.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_hest
{
/* HEST subtable header */
typedef struct acpi_hest_header
{
/* Values for Type field above for subtables */
enum AcpiHestTypes
{
};
/*
* HEST substructures contained in subtables
*/
/*
* IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and
* ACPI_HEST_IA_CORRECTED structures.
*/
typedef struct acpi_hest_ia_error_bank
{
typedef struct acpi_hest_aer_common
{
/* Masks for HEST Flags fields */
#define ACPI_HEST_FIRMWARE_FIRST (1)
/*
* Bus number is encoded in bits 7:0
* Segment number is encoded in bits 23:8
*/
/* Hardware Error Notification */
typedef struct acpi_hest_notify
{
/* Values for Notify Type field above */
enum AcpiHestNotifyTypes
{
ACPI_HEST_NOTIFY_SCI = 3,
ACPI_HEST_NOTIFY_NMI = 4,
};
/* Values for ConfigWriteEnable bitfield above */
#define ACPI_HEST_TYPE (1)
/*
* HEST subtables
*/
/* 0: IA32 Machine Check Exception */
typedef struct acpi_hest_ia_machine_check
{
/* 1: IA32 Corrected Machine Check */
typedef struct acpi_hest_ia_corrected
{
/* 2: IA32 Non-Maskable Interrupt */
typedef struct acpi_hest_ia_nmi
{
/* 3,4,5: Not used */
/* 6: PCI Express Root Port AER */
typedef struct acpi_hest_aer_root
{
/* 7: PCI Express AER (AER Endpoint) */
typedef struct acpi_hest_aer
{
typedef struct acpi_hest_aer_bridge
{
/* 9: Generic Hardware Error Source */
typedef struct acpi_hest_generic
{
/* Generic Error Status block */
typedef struct acpi_hest_generic_status
{
/* Values for BlockStatus flags above */
#define ACPI_HEST_UNCORRECTABLE (1)
/* Generic Error Data entry */
typedef struct acpi_hest_generic_data
{
/*******************************************************************************
*
* MADT - Multiple APIC Description Table
* Version 3
*
******************************************************************************/
typedef struct acpi_table_madt
{
/* Masks for Flags field above */
/* Values for PCATCompat flag */
#define ACPI_MADT_DUAL_PIC 0
#define ACPI_MADT_MULTIPLE_APIC 1
/* Values for MADT subtable type in ACPI_SUBTABLE_HEADER */
enum AcpiMadtType
{
};
/*
* MADT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
*/
/* 0: Processor Local APIC */
typedef struct acpi_madt_local_apic
{
/* 1: IO APIC */
typedef struct acpi_madt_io_apic
{
/* 2: Interrupt Override */
typedef struct acpi_madt_interrupt_override
{
/* 3: NMI Source */
typedef struct acpi_madt_nmi_source
{
/* 4: Local APIC NMI */
typedef struct acpi_madt_local_apic_nmi
{
/* 5: Address Override */
typedef struct acpi_madt_local_apic_override
{
/* 6: I/O Sapic */
typedef struct acpi_madt_io_sapic
{
/* 7: Local Sapic */
typedef struct acpi_madt_local_sapic
{
/* 8: Platform Interrupt Source */
typedef struct acpi_madt_interrupt_source
{
/* Masks for Flags field above */
#define ACPI_MADT_CPEI_OVERRIDE (1)
/* 9: Processor Local X2APIC (ACPI 4.0) */
typedef struct acpi_madt_local_x2apic
{
/* 10: Local X2APIC NMI (ACPI 4.0) */
typedef struct acpi_madt_local_x2apic_nmi
{
/* 11: Generic Interrupt (ACPI 5.0 + ACPI 6.0 changes) */
typedef struct acpi_madt_generic_interrupt
{
/* Masks for Flags field above */
/* ACPI_MADT_ENABLED (1) Processor is usable if set */
/* 12: Generic Distributor (ACPI 5.0 + ACPI 6.0 changes) */
typedef struct acpi_madt_generic_distributor
{
/* Values for Version field above */
enum AcpiMadtGicVersion
{
};
/* 13: Generic MSI Frame (ACPI 5.1) */
typedef struct acpi_madt_generic_msi_frame
{
/* Masks for Flags field above */
#define ACPI_MADT_OVERRIDE_SPI_VALUES (1)
/* 14: Generic Redistributor (ACPI 5.1) */
typedef struct acpi_madt_generic_redistributor
{
/* 15: Generic Translator (ACPI 6.0) */
typedef struct acpi_madt_generic_translator
{
/*
* Common flags fields for MADT subtables
*/
/* MADT Local APIC flags */
/* MADT MPS INTI flags (IntiFlags) */
/* Values for MPS INTI flags */
#define ACPI_MADT_POLARITY_CONFORMS 0
#define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
#define ACPI_MADT_POLARITY_RESERVED 2
#define ACPI_MADT_POLARITY_ACTIVE_LOW 3
#define ACPI_MADT_TRIGGER_CONFORMS (0)
/*******************************************************************************
*
* MSCT - Maximum System Characteristics Table (ACPI 4.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_msct
{
/* Subtable - Maximum Proximity Domain Information. Version 1 */
typedef struct acpi_msct_proximity
{
/*******************************************************************************
*
* NFIT - NVDIMM Interface Table (ACPI 6.0)
* Version 1
*
******************************************************************************/
typedef struct acpi_table_nfit
{
/* Subtable header for NFIT */
typedef struct acpi_nfit_header
{
/* Values for subtable type in ACPI_NFIT_HEADER */
enum AcpiNfitType
{
};
/*
* NFIT Subtables
*/
/* 0: System Physical Address Range Structure */
typedef struct acpi_nfit_system_address
{
/* Flags */
/* 1: Memory Device to System Address Range Map Structure */
typedef struct acpi_nfit_memory_map
{
/* Flags */
/* 2: Interleave Structure */
typedef struct acpi_nfit_interleave
{
/* 3: SMBIOS Management Information Structure */
typedef struct acpi_nfit_smbios
{
/* 4: NVDIMM Control Region Structure */
typedef struct acpi_nfit_control_region
{
/* Flags */
/* 5: NVDIMM Block Data Window Region Structure */
typedef struct acpi_nfit_data_region
{
/* 6: Flush Hint Address Structure */
typedef struct acpi_nfit_flush_address
{
/*******************************************************************************
*
* SBST - Smart Battery Specification Table
* Version 1
*
******************************************************************************/
typedef struct acpi_table_sbst
{
/*******************************************************************************
*
* SLIT - System Locality Distance Information Table
* Version 1
*
******************************************************************************/
typedef struct acpi_table_slit
{
/*******************************************************************************
*
* SRAT - System Resource Affinity Table
* Version 3
*
******************************************************************************/
typedef struct acpi_table_srat
{
/* Values for subtable type in ACPI_SUBTABLE_HEADER */
enum AcpiSratType
{
};
/*
* SRAT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
*/
typedef struct acpi_srat_cpu_affinity
{
/* Flags */
/* 1: Memory Affinity */
typedef struct acpi_srat_mem_affinity
{
/* Flags */
/* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
typedef struct acpi_srat_x2apic_cpu_affinity
{
/* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
/* 3: GICC Affinity (ACPI 5.1) */
typedef struct acpi_srat_gicc_affinity
{
/* Flags for ACPI_SRAT_GICC_AFFINITY */
/* Reset to default packing */
#pragma pack()
#endif /* __ACTBL1_H__ */