/******************************************************************************1*2* Name: actbl1.h - Additional ACPI table definitions3*4*****************************************************************************/56/*7* Copyright (C) 2000 - 2011, Intel Corp.8* All rights reserved.9*10* Redistribution and use in source and binary forms, with or without11* modification, are permitted provided that the following conditions12* are met:13* 1. Redistributions of source code must retain the above copyright14* notice, this list of conditions, and the following disclaimer,15* without modification.16* 2. Redistributions in binary form must reproduce at minimum a disclaimer17* substantially similar to the "NO WARRANTY" disclaimer below18* ("Disclaimer") and any redistribution must be conditioned upon19* including a substantially similar Disclaimer requirement for further20* binary redistribution.21* 3. Neither the names of the above-listed copyright holders nor the names22* of any contributors may be used to endorse or promote products derived23* from this software without specific prior written permission.24*25* Alternatively, this software may be distributed under the terms of the26* GNU General Public License ("GPL") version 2 as published by the Free27* Software Foundation.28*29* NO WARRANTY30* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS31* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT32* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR33* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT34* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL35* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS36* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)37* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,38* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING39* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE40* POSSIBILITY OF SUCH DAMAGES.41*/4243#ifndef __ACTBL1_H__44#define __ACTBL1_H__4546/*******************************************************************************47*48* Additional ACPI Tables (1)49*50* These tables are not consumed directly by the ACPICA subsystem, but are51* included here to support device drivers and the AML disassembler.52*53* The tables in this file are fully defined within the ACPI specification.54*55******************************************************************************/5657/*58* Values for description table header signatures for tables defined in this59* file. Useful because they make it more difficult to inadvertently type in60* the wrong signature.61*/62#define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */63#define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */64#define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */65#define ACPI_SIG_EINJ "EINJ" /* Error Injection table */66#define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */67#define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */68#define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */69#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */70#define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */71#define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */72#define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */7374/*75* All tables must be byte-packed to match the ACPI specification, since76* the tables are provided by the system BIOS.77*/78#pragma pack(1)7980/*81* Note about bitfields: The u8 type is used for bitfields in ACPI tables.82* This is the only type that is even remotely portable. Anything else is not83* portable, so do not use any other bitfield types.84*/8586/*******************************************************************************87*88* Common subtable headers89*90******************************************************************************/9192/* Generic subtable header (used in MADT, SRAT, etc.) */9394struct acpi_subtable_header {95u8 type;96u8 length;97};9899/* Subtable header for WHEA tables (EINJ, ERST, WDAT) */100101struct acpi_whea_header {102u8 action;103u8 instruction;104u8 flags;105u8 reserved;106struct acpi_generic_address register_region;107u64 value; /* Value used with Read/Write register */108u64 mask; /* Bitmask required for this register instruction */109};110111/*******************************************************************************112*113* BERT - Boot Error Record Table (ACPI 4.0)114* Version 1115*116******************************************************************************/117118struct acpi_table_bert {119struct acpi_table_header header; /* Common ACPI table header */120u32 region_length; /* Length of the boot error region */121u64 address; /* Physical address of the error region */122};123124/* Boot Error Region (not a subtable, pointed to by Address field above) */125126struct acpi_bert_region {127u32 block_status; /* Type of error information */128u32 raw_data_offset; /* Offset to raw error data */129u32 raw_data_length; /* Length of raw error data */130u32 data_length; /* Length of generic error data */131u32 error_severity; /* Severity code */132};133134/* Values for block_status flags above */135136#define ACPI_BERT_UNCORRECTABLE (1)137#define ACPI_BERT_CORRECTABLE (1<<1)138#define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)139#define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)140#define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */141142/* Values for error_severity above */143144enum acpi_bert_error_severity {145ACPI_BERT_ERROR_CORRECTABLE = 0,146ACPI_BERT_ERROR_FATAL = 1,147ACPI_BERT_ERROR_CORRECTED = 2,148ACPI_BERT_ERROR_NONE = 3,149ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */150};151152/*153* Note: The generic error data that follows the error_severity field above154* uses the struct acpi_hest_generic_data defined under the HEST table below155*/156157/*******************************************************************************158*159* CPEP - Corrected Platform Error Polling table (ACPI 4.0)160* Version 1161*162******************************************************************************/163164struct acpi_table_cpep {165struct acpi_table_header header; /* Common ACPI table header */166u64 reserved;167};168169/* Subtable */170171struct acpi_cpep_polling {172struct acpi_subtable_header header;173u8 id; /* Processor ID */174u8 eid; /* Processor EID */175u32 interval; /* Polling interval (msec) */176};177178/*******************************************************************************179*180* ECDT - Embedded Controller Boot Resources Table181* Version 1182*183******************************************************************************/184185struct acpi_table_ecdt {186struct acpi_table_header header; /* Common ACPI table header */187struct acpi_generic_address control; /* Address of EC command/status register */188struct acpi_generic_address data; /* Address of EC data register */189u32 uid; /* Unique ID - must be same as the EC _UID method */190u8 gpe; /* The GPE for the EC */191u8 id[1]; /* Full namepath of the EC in the ACPI namespace */192};193194/*******************************************************************************195*196* EINJ - Error Injection Table (ACPI 4.0)197* Version 1198*199******************************************************************************/200201struct acpi_table_einj {202struct acpi_table_header header; /* Common ACPI table header */203u32 header_length;204u8 flags;205u8 reserved[3];206u32 entries;207};208209/* EINJ Injection Instruction Entries (actions) */210211struct acpi_einj_entry {212struct acpi_whea_header whea_header; /* Common header for WHEA tables */213};214215/* Masks for Flags field above */216217#define ACPI_EINJ_PRESERVE (1)218219/* Values for Action field above */220221enum acpi_einj_actions {222ACPI_EINJ_BEGIN_OPERATION = 0,223ACPI_EINJ_GET_TRIGGER_TABLE = 1,224ACPI_EINJ_SET_ERROR_TYPE = 2,225ACPI_EINJ_GET_ERROR_TYPE = 3,226ACPI_EINJ_END_OPERATION = 4,227ACPI_EINJ_EXECUTE_OPERATION = 5,228ACPI_EINJ_CHECK_BUSY_STATUS = 6,229ACPI_EINJ_GET_COMMAND_STATUS = 7,230ACPI_EINJ_ACTION_RESERVED = 8, /* 8 and greater are reserved */231ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */232};233234/* Values for Instruction field above */235236enum acpi_einj_instructions {237ACPI_EINJ_READ_REGISTER = 0,238ACPI_EINJ_READ_REGISTER_VALUE = 1,239ACPI_EINJ_WRITE_REGISTER = 2,240ACPI_EINJ_WRITE_REGISTER_VALUE = 3,241ACPI_EINJ_NOOP = 4,242ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */243};244245/* EINJ Trigger Error Action Table */246247struct acpi_einj_trigger {248u32 header_size;249u32 revision;250u32 table_size;251u32 entry_count;252};253254/* Command status return values */255256enum acpi_einj_command_status {257ACPI_EINJ_SUCCESS = 0,258ACPI_EINJ_FAILURE = 1,259ACPI_EINJ_INVALID_ACCESS = 2,260ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */261};262263/* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */264265#define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)266#define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)267#define ACPI_EINJ_PROCESSOR_FATAL (1<<2)268#define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)269#define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)270#define ACPI_EINJ_MEMORY_FATAL (1<<5)271#define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)272#define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)273#define ACPI_EINJ_PCIX_FATAL (1<<8)274#define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)275#define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)276#define ACPI_EINJ_PLATFORM_FATAL (1<<11)277278/*******************************************************************************279*280* ERST - Error Record Serialization Table (ACPI 4.0)281* Version 1282*283******************************************************************************/284285struct acpi_table_erst {286struct acpi_table_header header; /* Common ACPI table header */287u32 header_length;288u32 reserved;289u32 entries;290};291292/* ERST Serialization Entries (actions) */293294struct acpi_erst_entry {295struct acpi_whea_header whea_header; /* Common header for WHEA tables */296};297298/* Masks for Flags field above */299300#define ACPI_ERST_PRESERVE (1)301302/* Values for Action field above */303304enum acpi_erst_actions {305ACPI_ERST_BEGIN_WRITE = 0,306ACPI_ERST_BEGIN_READ = 1,307ACPI_ERST_BEGIN_CLEAR = 2,308ACPI_ERST_END = 3,309ACPI_ERST_SET_RECORD_OFFSET = 4,310ACPI_ERST_EXECUTE_OPERATION = 5,311ACPI_ERST_CHECK_BUSY_STATUS = 6,312ACPI_ERST_GET_COMMAND_STATUS = 7,313ACPI_ERST_GET_RECORD_ID = 8,314ACPI_ERST_SET_RECORD_ID = 9,315ACPI_ERST_GET_RECORD_COUNT = 10,316ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,317ACPI_ERST_NOT_USED = 12,318ACPI_ERST_GET_ERROR_RANGE = 13,319ACPI_ERST_GET_ERROR_LENGTH = 14,320ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,321ACPI_ERST_ACTION_RESERVED = 16 /* 16 and greater are reserved */322};323324/* Values for Instruction field above */325326enum acpi_erst_instructions {327ACPI_ERST_READ_REGISTER = 0,328ACPI_ERST_READ_REGISTER_VALUE = 1,329ACPI_ERST_WRITE_REGISTER = 2,330ACPI_ERST_WRITE_REGISTER_VALUE = 3,331ACPI_ERST_NOOP = 4,332ACPI_ERST_LOAD_VAR1 = 5,333ACPI_ERST_LOAD_VAR2 = 6,334ACPI_ERST_STORE_VAR1 = 7,335ACPI_ERST_ADD = 8,336ACPI_ERST_SUBTRACT = 9,337ACPI_ERST_ADD_VALUE = 10,338ACPI_ERST_SUBTRACT_VALUE = 11,339ACPI_ERST_STALL = 12,340ACPI_ERST_STALL_WHILE_TRUE = 13,341ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,342ACPI_ERST_GOTO = 15,343ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,344ACPI_ERST_SET_DST_ADDRESS_BASE = 17,345ACPI_ERST_MOVE_DATA = 18,346ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */347};348349/* Command status return values */350351enum acpi_erst_command_status {352ACPI_ERST_SUCESS = 0,353ACPI_ERST_NO_SPACE = 1,354ACPI_ERST_NOT_AVAILABLE = 2,355ACPI_ERST_FAILURE = 3,356ACPI_ERST_RECORD_EMPTY = 4,357ACPI_ERST_NOT_FOUND = 5,358ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */359};360361/* Error Record Serialization Information */362363struct acpi_erst_info {364u16 signature; /* Should be "ER" */365u8 data[48];366};367368/*******************************************************************************369*370* HEST - Hardware Error Source Table (ACPI 4.0)371* Version 1372*373******************************************************************************/374375struct acpi_table_hest {376struct acpi_table_header header; /* Common ACPI table header */377u32 error_source_count;378};379380/* HEST subtable header */381382struct acpi_hest_header {383u16 type;384u16 source_id;385};386387/* Values for Type field above for subtables */388389enum acpi_hest_types {390ACPI_HEST_TYPE_IA32_CHECK = 0,391ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,392ACPI_HEST_TYPE_IA32_NMI = 2,393ACPI_HEST_TYPE_NOT_USED3 = 3,394ACPI_HEST_TYPE_NOT_USED4 = 4,395ACPI_HEST_TYPE_NOT_USED5 = 5,396ACPI_HEST_TYPE_AER_ROOT_PORT = 6,397ACPI_HEST_TYPE_AER_ENDPOINT = 7,398ACPI_HEST_TYPE_AER_BRIDGE = 8,399ACPI_HEST_TYPE_GENERIC_ERROR = 9,400ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */401};402403/*404* HEST substructures contained in subtables405*/406407/*408* IA32 Error Bank(s) - Follows the struct acpi_hest_ia_machine_check and409* struct acpi_hest_ia_corrected structures.410*/411struct acpi_hest_ia_error_bank {412u8 bank_number;413u8 clear_status_on_init;414u8 status_format;415u8 reserved;416u32 control_register;417u64 control_data;418u32 status_register;419u32 address_register;420u32 misc_register;421};422423/* Common HEST sub-structure for PCI/AER structures below (6,7,8) */424425struct acpi_hest_aer_common {426u16 reserved1;427u8 flags;428u8 enabled;429u32 records_to_preallocate;430u32 max_sections_per_record;431u32 bus;432u16 device;433u16 function;434u16 device_control;435u16 reserved2;436u32 uncorrectable_mask;437u32 uncorrectable_severity;438u32 correctable_mask;439u32 advanced_capabilities;440};441442/* Masks for HEST Flags fields */443444#define ACPI_HEST_FIRMWARE_FIRST (1)445#define ACPI_HEST_GLOBAL (1<<1)446447/* Hardware Error Notification */448449struct acpi_hest_notify {450u8 type;451u8 length;452u16 config_write_enable;453u32 poll_interval;454u32 vector;455u32 polling_threshold_value;456u32 polling_threshold_window;457u32 error_threshold_value;458u32 error_threshold_window;459};460461/* Values for Notify Type field above */462463enum acpi_hest_notify_types {464ACPI_HEST_NOTIFY_POLLED = 0,465ACPI_HEST_NOTIFY_EXTERNAL = 1,466ACPI_HEST_NOTIFY_LOCAL = 2,467ACPI_HEST_NOTIFY_SCI = 3,468ACPI_HEST_NOTIFY_NMI = 4,469ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */470};471472/* Values for config_write_enable bitfield above */473474#define ACPI_HEST_TYPE (1)475#define ACPI_HEST_POLL_INTERVAL (1<<1)476#define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)477#define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)478#define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)479#define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)480481/*482* HEST subtables483*/484485/* 0: IA32 Machine Check Exception */486487struct acpi_hest_ia_machine_check {488struct acpi_hest_header header;489u16 reserved1;490u8 flags;491u8 enabled;492u32 records_to_preallocate;493u32 max_sections_per_record;494u64 global_capability_data;495u64 global_control_data;496u8 num_hardware_banks;497u8 reserved3[7];498};499500/* 1: IA32 Corrected Machine Check */501502struct acpi_hest_ia_corrected {503struct acpi_hest_header header;504u16 reserved1;505u8 flags;506u8 enabled;507u32 records_to_preallocate;508u32 max_sections_per_record;509struct acpi_hest_notify notify;510u8 num_hardware_banks;511u8 reserved2[3];512};513514/* 2: IA32 Non-Maskable Interrupt */515516struct acpi_hest_ia_nmi {517struct acpi_hest_header header;518u32 reserved;519u32 records_to_preallocate;520u32 max_sections_per_record;521u32 max_raw_data_length;522};523524/* 3,4,5: Not used */525526/* 6: PCI Express Root Port AER */527528struct acpi_hest_aer_root {529struct acpi_hest_header header;530struct acpi_hest_aer_common aer;531u32 root_error_command;532};533534/* 7: PCI Express AER (AER Endpoint) */535536struct acpi_hest_aer {537struct acpi_hest_header header;538struct acpi_hest_aer_common aer;539};540541/* 8: PCI Express/PCI-X Bridge AER */542543struct acpi_hest_aer_bridge {544struct acpi_hest_header header;545struct acpi_hest_aer_common aer;546u32 uncorrectable_mask2;547u32 uncorrectable_severity2;548u32 advanced_capabilities2;549};550551/* 9: Generic Hardware Error Source */552553struct acpi_hest_generic {554struct acpi_hest_header header;555u16 related_source_id;556u8 reserved;557u8 enabled;558u32 records_to_preallocate;559u32 max_sections_per_record;560u32 max_raw_data_length;561struct acpi_generic_address error_status_address;562struct acpi_hest_notify notify;563u32 error_block_length;564};565566/* Generic Error Status block */567568struct acpi_hest_generic_status {569u32 block_status;570u32 raw_data_offset;571u32 raw_data_length;572u32 data_length;573u32 error_severity;574};575576/* Values for block_status flags above */577578#define ACPI_HEST_UNCORRECTABLE (1)579#define ACPI_HEST_CORRECTABLE (1<<1)580#define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)581#define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)582#define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */583584/* Generic Error Data entry */585586struct acpi_hest_generic_data {587u8 section_type[16];588u32 error_severity;589u16 revision;590u8 validation_bits;591u8 flags;592u32 error_data_length;593u8 fru_id[16];594u8 fru_text[20];595};596597/*******************************************************************************598*599* MADT - Multiple APIC Description Table600* Version 3601*602******************************************************************************/603604struct acpi_table_madt {605struct acpi_table_header header; /* Common ACPI table header */606u32 address; /* Physical address of local APIC */607u32 flags;608};609610/* Masks for Flags field above */611612#define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */613614/* Values for PCATCompat flag */615616#define ACPI_MADT_DUAL_PIC 0617#define ACPI_MADT_MULTIPLE_APIC 1618619/* Values for MADT subtable type in struct acpi_subtable_header */620621enum acpi_madt_type {622ACPI_MADT_TYPE_LOCAL_APIC = 0,623ACPI_MADT_TYPE_IO_APIC = 1,624ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,625ACPI_MADT_TYPE_NMI_SOURCE = 3,626ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,627ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,628ACPI_MADT_TYPE_IO_SAPIC = 6,629ACPI_MADT_TYPE_LOCAL_SAPIC = 7,630ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,631ACPI_MADT_TYPE_LOCAL_X2APIC = 9,632ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,633ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */634};635636/*637* MADT Sub-tables, correspond to Type in struct acpi_subtable_header638*/639640/* 0: Processor Local APIC */641642struct acpi_madt_local_apic {643struct acpi_subtable_header header;644u8 processor_id; /* ACPI processor id */645u8 id; /* Processor's local APIC id */646u32 lapic_flags;647};648649/* 1: IO APIC */650651struct acpi_madt_io_apic {652struct acpi_subtable_header header;653u8 id; /* I/O APIC ID */654u8 reserved; /* Reserved - must be zero */655u32 address; /* APIC physical address */656u32 global_irq_base; /* Global system interrupt where INTI lines start */657};658659/* 2: Interrupt Override */660661struct acpi_madt_interrupt_override {662struct acpi_subtable_header header;663u8 bus; /* 0 - ISA */664u8 source_irq; /* Interrupt source (IRQ) */665u32 global_irq; /* Global system interrupt */666u16 inti_flags;667};668669/* 3: NMI Source */670671struct acpi_madt_nmi_source {672struct acpi_subtable_header header;673u16 inti_flags;674u32 global_irq; /* Global system interrupt */675};676677/* 4: Local APIC NMI */678679struct acpi_madt_local_apic_nmi {680struct acpi_subtable_header header;681u8 processor_id; /* ACPI processor id */682u16 inti_flags;683u8 lint; /* LINTn to which NMI is connected */684};685686/* 5: Address Override */687688struct acpi_madt_local_apic_override {689struct acpi_subtable_header header;690u16 reserved; /* Reserved, must be zero */691u64 address; /* APIC physical address */692};693694/* 6: I/O Sapic */695696struct acpi_madt_io_sapic {697struct acpi_subtable_header header;698u8 id; /* I/O SAPIC ID */699u8 reserved; /* Reserved, must be zero */700u32 global_irq_base; /* Global interrupt for SAPIC start */701u64 address; /* SAPIC physical address */702};703704/* 7: Local Sapic */705706struct acpi_madt_local_sapic {707struct acpi_subtable_header header;708u8 processor_id; /* ACPI processor id */709u8 id; /* SAPIC ID */710u8 eid; /* SAPIC EID */711u8 reserved[3]; /* Reserved, must be zero */712u32 lapic_flags;713u32 uid; /* Numeric UID - ACPI 3.0 */714char uid_string[1]; /* String UID - ACPI 3.0 */715};716717/* 8: Platform Interrupt Source */718719struct acpi_madt_interrupt_source {720struct acpi_subtable_header header;721u16 inti_flags;722u8 type; /* 1=PMI, 2=INIT, 3=corrected */723u8 id; /* Processor ID */724u8 eid; /* Processor EID */725u8 io_sapic_vector; /* Vector value for PMI interrupts */726u32 global_irq; /* Global system interrupt */727u32 flags; /* Interrupt Source Flags */728};729730/* Masks for Flags field above */731732#define ACPI_MADT_CPEI_OVERRIDE (1)733734/* 9: Processor Local X2APIC (ACPI 4.0) */735736struct acpi_madt_local_x2apic {737struct acpi_subtable_header header;738u16 reserved; /* Reserved - must be zero */739u32 local_apic_id; /* Processor x2APIC ID */740u32 lapic_flags;741u32 uid; /* ACPI processor UID */742};743744/* 10: Local X2APIC NMI (ACPI 4.0) */745746struct acpi_madt_local_x2apic_nmi {747struct acpi_subtable_header header;748u16 inti_flags;749u32 uid; /* ACPI processor UID */750u8 lint; /* LINTn to which NMI is connected */751u8 reserved[3];752};753754/*755* Common flags fields for MADT subtables756*/757758/* MADT Local APIC flags (lapic_flags) */759760#define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */761762/* MADT MPS INTI flags (inti_flags) */763764#define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */765#define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */766767/* Values for MPS INTI flags */768769#define ACPI_MADT_POLARITY_CONFORMS 0770#define ACPI_MADT_POLARITY_ACTIVE_HIGH 1771#define ACPI_MADT_POLARITY_RESERVED 2772#define ACPI_MADT_POLARITY_ACTIVE_LOW 3773774#define ACPI_MADT_TRIGGER_CONFORMS (0)775#define ACPI_MADT_TRIGGER_EDGE (1<<2)776#define ACPI_MADT_TRIGGER_RESERVED (2<<2)777#define ACPI_MADT_TRIGGER_LEVEL (3<<2)778779/*******************************************************************************780*781* MSCT - Maximum System Characteristics Table (ACPI 4.0)782* Version 1783*784******************************************************************************/785786struct acpi_table_msct {787struct acpi_table_header header; /* Common ACPI table header */788u32 proximity_offset; /* Location of proximity info struct(s) */789u32 max_proximity_domains; /* Max number of proximity domains */790u32 max_clock_domains; /* Max number of clock domains */791u64 max_address; /* Max physical address in system */792};793794/* Subtable - Maximum Proximity Domain Information. Version 1 */795796struct acpi_msct_proximity {797u8 revision;798u8 length;799u32 range_start; /* Start of domain range */800u32 range_end; /* End of domain range */801u32 processor_capacity;802u64 memory_capacity; /* In bytes */803};804805/*******************************************************************************806*807* SBST - Smart Battery Specification Table808* Version 1809*810******************************************************************************/811812struct acpi_table_sbst {813struct acpi_table_header header; /* Common ACPI table header */814u32 warning_level;815u32 low_level;816u32 critical_level;817};818819/*******************************************************************************820*821* SLIT - System Locality Distance Information Table822* Version 1823*824******************************************************************************/825826struct acpi_table_slit {827struct acpi_table_header header; /* Common ACPI table header */828u64 locality_count;829u8 entry[1]; /* Real size = localities^2 */830};831832/*******************************************************************************833*834* SRAT - System Resource Affinity Table835* Version 3836*837******************************************************************************/838839struct acpi_table_srat {840struct acpi_table_header header; /* Common ACPI table header */841u32 table_revision; /* Must be value '1' */842u64 reserved; /* Reserved, must be zero */843};844845/* Values for subtable type in struct acpi_subtable_header */846847enum acpi_srat_type {848ACPI_SRAT_TYPE_CPU_AFFINITY = 0,849ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,850ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,851ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */852};853854/*855* SRAT Sub-tables, correspond to Type in struct acpi_subtable_header856*/857858/* 0: Processor Local APIC/SAPIC Affinity */859860struct acpi_srat_cpu_affinity {861struct acpi_subtable_header header;862u8 proximity_domain_lo;863u8 apic_id;864u32 flags;865u8 local_sapic_eid;866u8 proximity_domain_hi[3];867u32 reserved; /* Reserved, must be zero */868};869870/* Flags */871872#define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */873874/* 1: Memory Affinity */875876struct acpi_srat_mem_affinity {877struct acpi_subtable_header header;878u32 proximity_domain;879u16 reserved; /* Reserved, must be zero */880u64 base_address;881u64 length;882u32 reserved1;883u32 flags;884u64 reserved2; /* Reserved, must be zero */885};886887/* Flags */888889#define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */890#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */891#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */892893/* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */894895struct acpi_srat_x2apic_cpu_affinity {896struct acpi_subtable_header header;897u16 reserved; /* Reserved, must be zero */898u32 proximity_domain;899u32 apic_id;900u32 flags;901u32 clock_domain;902u32 reserved2;903};904905/* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */906907#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */908909/* Reset to default packing */910911#pragma pack()912913#endif /* __ACTBL1_H__ */914915916