Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    1) /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    2) /******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    3)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    4)  * Name: actbl1.h - Additional ACPI table definitions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    5)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    6)  * Copyright (C) 2000 - 2020, Intel Corp.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    7)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    8)  *****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   10) #ifndef __ACTBL1_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   11) #define __ACTBL1_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   13) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   14)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   15)  * Additional ACPI Tables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   16)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   17)  * These tables are not consumed directly by the ACPICA subsystem, but are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   18)  * included here to support device drivers and the AML disassembler.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   19)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   20)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   22) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   23)  * Values for description table header signatures for tables defined in this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   24)  * file. Useful because they make it more difficult to inadvertently type in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   25)  * the wrong signature.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   26)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   27) #define ACPI_SIG_ASF            "ASF!"	/* Alert Standard Format table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   28) #define ACPI_SIG_BERT           "BERT"	/* Boot Error Record Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   29) #define ACPI_SIG_BGRT           "BGRT"	/* Boot Graphics Resource Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   30) #define ACPI_SIG_BOOT           "BOOT"	/* Simple Boot Flag Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   31) #define ACPI_SIG_CPEP           "CPEP"	/* Corrected Platform Error Polling table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   32) #define ACPI_SIG_CSRT           "CSRT"	/* Core System Resource Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   33) #define ACPI_SIG_DBG2           "DBG2"	/* Debug Port table type 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   34) #define ACPI_SIG_DBGP           "DBGP"	/* Debug Port table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   35) #define ACPI_SIG_DMAR           "DMAR"	/* DMA Remapping table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   36) #define ACPI_SIG_DRTM           "DRTM"	/* Dynamic Root of Trust for Measurement table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   37) #define ACPI_SIG_ECDT           "ECDT"	/* Embedded Controller Boot Resources Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   38) #define ACPI_SIG_EINJ           "EINJ"	/* Error Injection table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   39) #define ACPI_SIG_ERST           "ERST"	/* Error Record Serialization Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   40) #define ACPI_SIG_FPDT           "FPDT"	/* Firmware Performance Data Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   41) #define ACPI_SIG_GTDT           "GTDT"	/* Generic Timer Description Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   42) #define ACPI_SIG_HEST           "HEST"	/* Hardware Error Source Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   43) #define ACPI_SIG_HMAT           "HMAT"	/* Heterogeneous Memory Attributes Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   44) #define ACPI_SIG_HPET           "HPET"	/* High Precision Event Timer table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   45) #define ACPI_SIG_IBFT           "IBFT"	/* iSCSI Boot Firmware Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   47) #define ACPI_SIG_S3PT           "S3PT"	/* S3 Performance (sub)Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   48) #define ACPI_SIG_PCCS           "PCC"	/* PCC Shared Memory Region */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   50) /* Reserved table signatures */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   52) #define ACPI_SIG_MATR           "MATR"	/* Memory Address Translation Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   53) #define ACPI_SIG_MSDM           "MSDM"	/* Microsoft Data Management Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   55) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   56)  * These tables have been seen in the field, but no definition has been found
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   57)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   58) #ifdef ACPI_UNDEFINED_TABLES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   59) #define ACPI_SIG_ATKG           "ATKG"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   60) #define ACPI_SIG_GSCI           "GSCI"	/* GMCH SCI table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   61) #define ACPI_SIG_IEIT           "IEIT"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   62) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   64) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   65)  * All tables must be byte-packed to match the ACPI specification, since
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   66)  * the tables are provided by the system BIOS.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   67)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   68) #pragma pack(1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   70) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   71)  * Note: C bitfields are not used for this reason:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   72)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   73)  * "Bitfields are great and easy to read, but unfortunately the C language
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   74)  * does not specify the layout of bitfields in memory, which means they are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   75)  * essentially useless for dealing with packed data in on-disk formats or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   76)  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   77)  * this decision was a design error in C. Ritchie could have picked an order
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   78)  * and stuck with it." Norman Ramsey.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   79)  * See http://stackoverflow.com/a/1053662/41661
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   80)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   82) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   83)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   84)  * Common subtable headers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   85)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   86)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   88) /* Generic subtable header (used in MADT, SRAT, etc.) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   90) struct acpi_subtable_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   91) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   92) 	u8 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   93) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   94) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   95) /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   97) struct acpi_whea_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   98) 	u8 action;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   99) 	u8 instruction;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  100) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  101) 	u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  102) 	struct acpi_generic_address register_region;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  103) 	u64 value;		/* Value used with Read/Write register */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  104) 	u64 mask;		/* Bitmask required for this register instruction */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  105) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  107) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  108)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  109)  * ASF - Alert Standard Format table (Signature "ASF!")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  110)  *       Revision 0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  111)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  112)  * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  113)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  114)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  115) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  116) struct acpi_table_asf {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  117) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  118) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  119) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  120) /* ASF subtable header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  121) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  122) struct acpi_asf_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  123) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  124) 	u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  125) 	u16 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  126) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  127) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  128) /* Values for Type field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  129) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  130) enum acpi_asf_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  131) 	ACPI_ASF_TYPE_INFO = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  132) 	ACPI_ASF_TYPE_ALERT = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  133) 	ACPI_ASF_TYPE_CONTROL = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  134) 	ACPI_ASF_TYPE_BOOT = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  135) 	ACPI_ASF_TYPE_ADDRESS = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  136) 	ACPI_ASF_TYPE_RESERVED = 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  137) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  139) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  140)  * ASF subtables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  141)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  142) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  143) /* 0: ASF Information */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  144) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  145) struct acpi_asf_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  146) 	struct acpi_asf_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  147) 	u8 min_reset_value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  148) 	u8 min_poll_interval;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  149) 	u16 system_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  150) 	u32 mfg_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  151) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  152) 	u8 reserved2[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  153) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  154) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  155) /* Masks for Flags field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  156) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  157) #define ACPI_ASF_SMBUS_PROTOCOLS    (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  158) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  159) /* 1: ASF Alerts */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  161) struct acpi_asf_alert {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  162) 	struct acpi_asf_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  163) 	u8 assert_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  164) 	u8 deassert_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  165) 	u8 alerts;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  166) 	u8 data_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  167) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  168) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  169) struct acpi_asf_alert_data {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  170) 	u8 address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  171) 	u8 command;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  172) 	u8 mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  173) 	u8 value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  174) 	u8 sensor_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  175) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  176) 	u8 offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  177) 	u8 source_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  178) 	u8 severity;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  179) 	u8 sensor_number;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  180) 	u8 entity;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  181) 	u8 instance;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  182) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  183) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  184) /* 2: ASF Remote Control */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  185) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  186) struct acpi_asf_remote {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  187) 	struct acpi_asf_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  188) 	u8 controls;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  189) 	u8 data_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  190) 	u16 reserved2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  191) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  192) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  193) struct acpi_asf_control_data {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  194) 	u8 function;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  195) 	u8 address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  196) 	u8 command;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  197) 	u8 value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  198) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  199) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  200) /* 3: ASF RMCP Boot Options */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  201) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  202) struct acpi_asf_rmcp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  203) 	struct acpi_asf_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  204) 	u8 capabilities[7];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  205) 	u8 completion_code;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  206) 	u32 enterprise_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  207) 	u8 command;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  208) 	u16 parameter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  209) 	u16 boot_options;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  210) 	u16 oem_parameters;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  211) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  213) /* 4: ASF Address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  215) struct acpi_asf_address {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  216) 	struct acpi_asf_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  217) 	u8 eprom_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  218) 	u8 devices;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  219) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  220) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  221) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  222)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  223)  * BERT - Boot Error Record Table (ACPI 4.0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  224)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  225)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  226)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  227) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  228) struct acpi_table_bert {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  229) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  230) 	u32 region_length;	/* Length of the boot error region */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  231) 	u64 address;		/* Physical address of the error region */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  232) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  233) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  234) /* Boot Error Region (not a subtable, pointed to by Address field above) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  235) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  236) struct acpi_bert_region {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  237) 	u32 block_status;	/* Type of error information */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  238) 	u32 raw_data_offset;	/* Offset to raw error data */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  239) 	u32 raw_data_length;	/* Length of raw error data */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  240) 	u32 data_length;	/* Length of generic error data */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  241) 	u32 error_severity;	/* Severity code */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  242) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  243) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  244) /* Values for block_status flags above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  245) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  246) #define ACPI_BERT_UNCORRECTABLE             (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  247) #define ACPI_BERT_CORRECTABLE               (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  248) #define ACPI_BERT_MULTIPLE_UNCORRECTABLE    (1<<2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  249) #define ACPI_BERT_MULTIPLE_CORRECTABLE      (1<<3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  250) #define ACPI_BERT_ERROR_ENTRY_COUNT         (0xFF<<4)	/* 8 bits, error count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  251) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  252) /* Values for error_severity above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  253) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  254) enum acpi_bert_error_severity {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  255) 	ACPI_BERT_ERROR_CORRECTABLE = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  256) 	ACPI_BERT_ERROR_FATAL = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  257) 	ACPI_BERT_ERROR_CORRECTED = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  258) 	ACPI_BERT_ERROR_NONE = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  259) 	ACPI_BERT_ERROR_RESERVED = 4	/* 4 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  260) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  261) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  262) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  263)  * Note: The generic error data that follows the error_severity field above
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  264)  * uses the struct acpi_hest_generic_data defined under the HEST table below
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  265)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  266) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  267) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  268)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  269)  * BGRT - Boot Graphics Resource Table (ACPI 5.0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  270)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  271)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  272)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  273) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  274) struct acpi_table_bgrt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  275) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  276) 	u16 version;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  277) 	u8 status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  278) 	u8 image_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  279) 	u64 image_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  280) 	u32 image_offset_x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  281) 	u32 image_offset_y;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  282) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  283) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  284) /* Flags for Status field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  285) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  286) #define ACPI_BGRT_DISPLAYED                 (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  287) #define ACPI_BGRT_ORIENTATION_OFFSET        (3 << 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  288) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  289) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  290)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  291)  * BOOT - Simple Boot Flag Table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  292)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  293)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  294)  * Conforms to the "Simple Boot Flag Specification", Version 2.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  295)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  296)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  297) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  298) struct acpi_table_boot {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  299) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  300) 	u8 cmos_index;		/* Index in CMOS RAM for the boot register */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  301) 	u8 reserved[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  302) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  303) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  304) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  305)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  306)  * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  307)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  308)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  309)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  310) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  311) struct acpi_table_cpep {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  312) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  313) 	u64 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  314) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  315) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  316) /* Subtable */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  317) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  318) struct acpi_cpep_polling {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  319) 	struct acpi_subtable_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  320) 	u8 id;			/* Processor ID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  321) 	u8 eid;			/* Processor EID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  322) 	u32 interval;		/* Polling interval (msec) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  323) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  324) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  325) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  326)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  327)  * CSRT - Core System Resource Table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  328)  *        Version 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  329)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  330)  * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  331)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  332)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  333) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  334) struct acpi_table_csrt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  335) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  336) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  337) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  338) /* Resource Group subtable */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  339) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  340) struct acpi_csrt_group {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  341) 	u32 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  342) 	u32 vendor_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  343) 	u32 subvendor_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  344) 	u16 device_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  345) 	u16 subdevice_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  346) 	u16 revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  347) 	u16 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  348) 	u32 shared_info_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  349) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  350) 	/* Shared data immediately follows (Length = shared_info_length) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  351) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  352) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  353) /* Shared Info subtable */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  354) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  355) struct acpi_csrt_shared_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  356) 	u16 major_version;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  357) 	u16 minor_version;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  358) 	u32 mmio_base_low;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  359) 	u32 mmio_base_high;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  360) 	u32 gsi_interrupt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  361) 	u8 interrupt_polarity;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  362) 	u8 interrupt_mode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  363) 	u8 num_channels;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  364) 	u8 dma_address_width;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  365) 	u16 base_request_line;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  366) 	u16 num_handshake_signals;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  367) 	u32 max_block_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  368) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  369) 	/* Resource descriptors immediately follow (Length = Group length - shared_info_length) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  370) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  371) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  372) /* Resource Descriptor subtable */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  373) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  374) struct acpi_csrt_descriptor {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  375) 	u32 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  376) 	u16 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  377) 	u16 subtype;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  378) 	u32 uid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  379) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  380) 	/* Resource-specific information immediately follows */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  381) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  382) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  383) /* Resource Types */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  384) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  385) #define ACPI_CSRT_TYPE_INTERRUPT    0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  386) #define ACPI_CSRT_TYPE_TIMER        0x0002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  387) #define ACPI_CSRT_TYPE_DMA          0x0003
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  388) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  389) /* Resource Subtypes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  390) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  391) #define ACPI_CSRT_XRUPT_LINE        0x0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  392) #define ACPI_CSRT_XRUPT_CONTROLLER  0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  393) #define ACPI_CSRT_TIMER             0x0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  394) #define ACPI_CSRT_DMA_CHANNEL       0x0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  395) #define ACPI_CSRT_DMA_CONTROLLER    0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  396) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  397) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  398)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  399)  * DBG2 - Debug Port Table 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  400)  *        Version 0 (Both main table and subtables)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  401)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  402)  * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  403)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  404)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  405) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  406) struct acpi_table_dbg2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  407) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  408) 	u32 info_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  409) 	u32 info_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  410) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  411) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  412) struct acpi_dbg2_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  413) 	u32 info_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  414) 	u32 info_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  415) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  416) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  417) /* Debug Device Information Subtable */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  418) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  419) struct acpi_dbg2_device {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  420) 	u8 revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  421) 	u16 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  422) 	u8 register_count;	/* Number of base_address registers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  423) 	u16 namepath_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  424) 	u16 namepath_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  425) 	u16 oem_data_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  426) 	u16 oem_data_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  427) 	u16 port_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  428) 	u16 port_subtype;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  429) 	u16 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  430) 	u16 base_address_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  431) 	u16 address_size_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  432) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  433) 	 * Data that follows:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  434) 	 *    base_address (required) - Each in 12-byte Generic Address Structure format.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  435) 	 *    address_size (required) - Array of u32 sizes corresponding to each base_address register.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  436) 	 *    Namepath    (required) - Null terminated string. Single dot if not supported.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  437) 	 *    oem_data    (optional) - Length is oem_data_length.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  438) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  439) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  440) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  441) /* Types for port_type field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  442) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  443) #define ACPI_DBG2_SERIAL_PORT       0x8000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  444) #define ACPI_DBG2_1394_PORT         0x8001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  445) #define ACPI_DBG2_USB_PORT          0x8002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  446) #define ACPI_DBG2_NET_PORT          0x8003
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  447) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  448) /* Subtypes for port_subtype field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  449) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  450) #define ACPI_DBG2_16550_COMPATIBLE  0x0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  451) #define ACPI_DBG2_16550_SUBSET      0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  452) #define ACPI_DBG2_ARM_PL011         0x0003
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  453) #define ACPI_DBG2_ARM_SBSA_32BIT    0x000D
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  454) #define ACPI_DBG2_ARM_SBSA_GENERIC  0x000E
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  455) #define ACPI_DBG2_ARM_DCC           0x000F
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  456) #define ACPI_DBG2_BCM2835           0x0010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  457) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  458) #define ACPI_DBG2_1394_STANDARD     0x0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  459) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  460) #define ACPI_DBG2_USB_XHCI          0x0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  461) #define ACPI_DBG2_USB_EHCI          0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  462) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  463) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  464)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  465)  * DBGP - Debug Port table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  466)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  467)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  468)  * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  469)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  470)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  471) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  472) struct acpi_table_dbgp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  473) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  474) 	u8 type;		/* 0=full 16550, 1=subset of 16550 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  475) 	u8 reserved[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  476) 	struct acpi_generic_address debug_port;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  477) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  478) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  479) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  480)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  481)  * DMAR - DMA Remapping table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  482)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  483)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  484)  * Conforms to "Intel Virtualization Technology for Directed I/O",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  485)  * Version 2.3, October 2014
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  486)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  487)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  488) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  489) struct acpi_table_dmar {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  490) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  491) 	u8 width;		/* Host Address Width */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  492) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  493) 	u8 reserved[10];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  494) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  495) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  496) /* Masks for Flags field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  497) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  498) #define ACPI_DMAR_INTR_REMAP        (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  499) #define ACPI_DMAR_X2APIC_OPT_OUT    (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  500) #define ACPI_DMAR_X2APIC_MODE       (1<<2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  501) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  502) /* DMAR subtable header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  503) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  504) struct acpi_dmar_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  505) 	u16 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  506) 	u16 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  507) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  508) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  509) /* Values for subtable type in struct acpi_dmar_header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  510) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  511) enum acpi_dmar_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  512) 	ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  513) 	ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  514) 	ACPI_DMAR_TYPE_ROOT_ATS = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  515) 	ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  516) 	ACPI_DMAR_TYPE_NAMESPACE = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  517) 	ACPI_DMAR_TYPE_RESERVED = 5	/* 5 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  518) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  519) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  520) /* DMAR Device Scope structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  521) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  522) struct acpi_dmar_device_scope {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  523) 	u8 entry_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  524) 	u8 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  525) 	u16 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  526) 	u8 enumeration_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  527) 	u8 bus;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  528) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  529) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  530) /* Values for entry_type in struct acpi_dmar_device_scope - device types */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  531) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  532) enum acpi_dmar_scope_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  533) 	ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  534) 	ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  535) 	ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  536) 	ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  537) 	ACPI_DMAR_SCOPE_TYPE_HPET = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  538) 	ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  539) 	ACPI_DMAR_SCOPE_TYPE_RESERVED = 6	/* 6 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  540) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  541) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  542) struct acpi_dmar_pci_path {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  543) 	u8 device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  544) 	u8 function;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  545) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  546) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  547) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  548)  * DMAR Subtables, correspond to Type in struct acpi_dmar_header
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  549)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  550) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  551) /* 0: Hardware Unit Definition */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  552) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  553) struct acpi_dmar_hardware_unit {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  554) 	struct acpi_dmar_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  555) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  556) 	u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  557) 	u16 segment;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  558) 	u64 address;		/* Register Base Address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  559) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  560) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  561) /* Masks for Flags field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  562) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  563) #define ACPI_DMAR_INCLUDE_ALL       (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  564) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  565) /* 1: Reserved Memory Definition */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  566) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  567) struct acpi_dmar_reserved_memory {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  568) 	struct acpi_dmar_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  569) 	u16 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  570) 	u16 segment;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  571) 	u64 base_address;	/* 4K aligned base address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  572) 	u64 end_address;	/* 4K aligned limit address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  573) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  574) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  575) /* Masks for Flags field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  576) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  577) #define ACPI_DMAR_ALLOW_ALL         (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  578) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  579) /* 2: Root Port ATS Capability Reporting Structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  580) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  581) struct acpi_dmar_atsr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  582) 	struct acpi_dmar_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  583) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  584) 	u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  585) 	u16 segment;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  586) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  587) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  588) /* Masks for Flags field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  589) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  590) #define ACPI_DMAR_ALL_PORTS         (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  591) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  592) /* 3: Remapping Hardware Static Affinity Structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  593) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  594) struct acpi_dmar_rhsa {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  595) 	struct acpi_dmar_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  596) 	u32 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  597) 	u64 base_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  598) 	u32 proximity_domain;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  599) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  600) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  601) /* 4: ACPI Namespace Device Declaration Structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  602) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  603) struct acpi_dmar_andd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  604) 	struct acpi_dmar_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  605) 	u8 reserved[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  606) 	u8 device_number;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  607) 	char device_name[1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  608) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  609) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  610) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  611)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  612)  * DRTM - Dynamic Root of Trust for Measurement table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  613)  * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  614)  * Table version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  615)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  616)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  617) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  618) struct acpi_table_drtm {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  619) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  620) 	u64 entry_base_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  621) 	u64 entry_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  622) 	u32 entry_address32;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  623) 	u64 entry_address64;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  624) 	u64 exit_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  625) 	u64 log_area_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  626) 	u32 log_area_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  627) 	u64 arch_dependent_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  628) 	u32 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  629) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  630) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  631) /* Flag Definitions for above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  632) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  633) #define ACPI_DRTM_ACCESS_ALLOWED            (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  634) #define ACPI_DRTM_ENABLE_GAP_CODE           (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  635) #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS   (1<<2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  636) #define ACPI_DRTM_AUTHORITY_ORDER           (1<<3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  637) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  638) /* 1) Validated Tables List (64-bit addresses) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  639) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  640) struct acpi_drtm_vtable_list {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  641) 	u32 validated_table_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  642) 	u64 validated_tables[1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  643) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  644) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  645) /* 2) Resources List (of Resource Descriptors) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  646) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  647) /* Resource Descriptor */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  648) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  649) struct acpi_drtm_resource {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  650) 	u8 size[7];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  651) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  652) 	u64 address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  653) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  654) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  655) struct acpi_drtm_resource_list {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  656) 	u32 resource_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  657) 	struct acpi_drtm_resource resources[1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  658) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  659) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  660) /* 3) Platform-specific Identifiers List */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  661) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  662) struct acpi_drtm_dps_id {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  663) 	u32 dps_id_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  664) 	u8 dps_id[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  665) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  666) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  667) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  668)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  669)  * ECDT - Embedded Controller Boot Resources Table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  670)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  671)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  672)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  673) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  674) struct acpi_table_ecdt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  675) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  676) 	struct acpi_generic_address control;	/* Address of EC command/status register */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  677) 	struct acpi_generic_address data;	/* Address of EC data register */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  678) 	u32 uid;		/* Unique ID - must be same as the EC _UID method */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  679) 	u8 gpe;			/* The GPE for the EC */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  680) 	u8 id[1];		/* Full namepath of the EC in the ACPI namespace */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  681) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  682) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  683) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  684)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  685)  * EINJ - Error Injection Table (ACPI 4.0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  686)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  687)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  688)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  689) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  690) struct acpi_table_einj {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  691) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  692) 	u32 header_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  693) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  694) 	u8 reserved[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  695) 	u32 entries;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  696) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  697) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  698) /* EINJ Injection Instruction Entries (actions) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  699) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  700) struct acpi_einj_entry {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  701) 	struct acpi_whea_header whea_header;	/* Common header for WHEA tables */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  702) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  703) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  704) /* Masks for Flags field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  705) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  706) #define ACPI_EINJ_PRESERVE          (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  707) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  708) /* Values for Action field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  709) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  710) enum acpi_einj_actions {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  711) 	ACPI_EINJ_BEGIN_OPERATION = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  712) 	ACPI_EINJ_GET_TRIGGER_TABLE = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  713) 	ACPI_EINJ_SET_ERROR_TYPE = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  714) 	ACPI_EINJ_GET_ERROR_TYPE = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  715) 	ACPI_EINJ_END_OPERATION = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  716) 	ACPI_EINJ_EXECUTE_OPERATION = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  717) 	ACPI_EINJ_CHECK_BUSY_STATUS = 6,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  718) 	ACPI_EINJ_GET_COMMAND_STATUS = 7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  719) 	ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  720) 	ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  721) 	ACPI_EINJ_ACTION_RESERVED = 10,	/* 10 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  722) 	ACPI_EINJ_TRIGGER_ERROR = 0xFF	/* Except for this value */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  723) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  724) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  725) /* Values for Instruction field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  726) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  727) enum acpi_einj_instructions {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  728) 	ACPI_EINJ_READ_REGISTER = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  729) 	ACPI_EINJ_READ_REGISTER_VALUE = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  730) 	ACPI_EINJ_WRITE_REGISTER = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  731) 	ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  732) 	ACPI_EINJ_NOOP = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  733) 	ACPI_EINJ_FLUSH_CACHELINE = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  734) 	ACPI_EINJ_INSTRUCTION_RESERVED = 6	/* 6 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  735) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  736) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  737) struct acpi_einj_error_type_with_addr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  738) 	u32 error_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  739) 	u32 vendor_struct_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  740) 	u32 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  741) 	u32 apic_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  742) 	u64 address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  743) 	u64 range;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  744) 	u32 pcie_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  745) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  746) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  747) struct acpi_einj_vendor {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  748) 	u32 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  749) 	u32 pcie_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  750) 	u16 vendor_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  751) 	u16 device_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  752) 	u8 revision_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  753) 	u8 reserved[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  754) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  755) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  756) /* EINJ Trigger Error Action Table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  757) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  758) struct acpi_einj_trigger {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  759) 	u32 header_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  760) 	u32 revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  761) 	u32 table_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  762) 	u32 entry_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  763) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  764) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  765) /* Command status return values */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  766) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  767) enum acpi_einj_command_status {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  768) 	ACPI_EINJ_SUCCESS = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  769) 	ACPI_EINJ_FAILURE = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  770) 	ACPI_EINJ_INVALID_ACCESS = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  771) 	ACPI_EINJ_STATUS_RESERVED = 3	/* 3 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  772) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  773) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  774) /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  775) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  776) #define ACPI_EINJ_PROCESSOR_CORRECTABLE     (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  777) #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE   (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  778) #define ACPI_EINJ_PROCESSOR_FATAL           (1<<2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  779) #define ACPI_EINJ_MEMORY_CORRECTABLE        (1<<3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  780) #define ACPI_EINJ_MEMORY_UNCORRECTABLE      (1<<4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  781) #define ACPI_EINJ_MEMORY_FATAL              (1<<5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  782) #define ACPI_EINJ_PCIX_CORRECTABLE          (1<<6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  783) #define ACPI_EINJ_PCIX_UNCORRECTABLE        (1<<7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  784) #define ACPI_EINJ_PCIX_FATAL                (1<<8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  785) #define ACPI_EINJ_PLATFORM_CORRECTABLE      (1<<9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  786) #define ACPI_EINJ_PLATFORM_UNCORRECTABLE    (1<<10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  787) #define ACPI_EINJ_PLATFORM_FATAL            (1<<11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  788) #define ACPI_EINJ_VENDOR_DEFINED            (1<<31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  789) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  790) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  791)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  792)  * ERST - Error Record Serialization Table (ACPI 4.0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  793)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  794)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  795)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  796) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  797) struct acpi_table_erst {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  798) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  799) 	u32 header_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  800) 	u32 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  801) 	u32 entries;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  802) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  803) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  804) /* ERST Serialization Entries (actions) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  805) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  806) struct acpi_erst_entry {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  807) 	struct acpi_whea_header whea_header;	/* Common header for WHEA tables */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  808) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  809) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  810) /* Masks for Flags field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  811) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  812) #define ACPI_ERST_PRESERVE          (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  813) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  814) /* Values for Action field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  815) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  816) enum acpi_erst_actions {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  817) 	ACPI_ERST_BEGIN_WRITE = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  818) 	ACPI_ERST_BEGIN_READ = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  819) 	ACPI_ERST_BEGIN_CLEAR = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  820) 	ACPI_ERST_END = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  821) 	ACPI_ERST_SET_RECORD_OFFSET = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  822) 	ACPI_ERST_EXECUTE_OPERATION = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  823) 	ACPI_ERST_CHECK_BUSY_STATUS = 6,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  824) 	ACPI_ERST_GET_COMMAND_STATUS = 7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  825) 	ACPI_ERST_GET_RECORD_ID = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  826) 	ACPI_ERST_SET_RECORD_ID = 9,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  827) 	ACPI_ERST_GET_RECORD_COUNT = 10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  828) 	ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  829) 	ACPI_ERST_NOT_USED = 12,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  830) 	ACPI_ERST_GET_ERROR_RANGE = 13,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  831) 	ACPI_ERST_GET_ERROR_LENGTH = 14,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  832) 	ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  833) 	ACPI_ERST_EXECUTE_TIMINGS = 16,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  834) 	ACPI_ERST_ACTION_RESERVED = 17	/* 17 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  835) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  836) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  837) /* Values for Instruction field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  838) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  839) enum acpi_erst_instructions {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  840) 	ACPI_ERST_READ_REGISTER = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  841) 	ACPI_ERST_READ_REGISTER_VALUE = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  842) 	ACPI_ERST_WRITE_REGISTER = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  843) 	ACPI_ERST_WRITE_REGISTER_VALUE = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  844) 	ACPI_ERST_NOOP = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  845) 	ACPI_ERST_LOAD_VAR1 = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  846) 	ACPI_ERST_LOAD_VAR2 = 6,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  847) 	ACPI_ERST_STORE_VAR1 = 7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  848) 	ACPI_ERST_ADD = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  849) 	ACPI_ERST_SUBTRACT = 9,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  850) 	ACPI_ERST_ADD_VALUE = 10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  851) 	ACPI_ERST_SUBTRACT_VALUE = 11,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  852) 	ACPI_ERST_STALL = 12,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  853) 	ACPI_ERST_STALL_WHILE_TRUE = 13,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  854) 	ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  855) 	ACPI_ERST_GOTO = 15,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  856) 	ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  857) 	ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  858) 	ACPI_ERST_MOVE_DATA = 18,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  859) 	ACPI_ERST_INSTRUCTION_RESERVED = 19	/* 19 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  860) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  861) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  862) /* Command status return values */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  863) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  864) enum acpi_erst_command_status {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  865) 	ACPI_ERST_SUCCESS = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  866) 	ACPI_ERST_NO_SPACE = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  867) 	ACPI_ERST_NOT_AVAILABLE = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  868) 	ACPI_ERST_FAILURE = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  869) 	ACPI_ERST_RECORD_EMPTY = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  870) 	ACPI_ERST_NOT_FOUND = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  871) 	ACPI_ERST_STATUS_RESERVED = 6	/* 6 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  872) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  873) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  874) /* Error Record Serialization Information */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  875) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  876) struct acpi_erst_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  877) 	u16 signature;		/* Should be "ER" */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  878) 	u8 data[48];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  879) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  880) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  881) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  882)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  883)  * FPDT - Firmware Performance Data Table (ACPI 5.0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  884)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  885)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  886)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  887) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  888) struct acpi_table_fpdt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  889) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  890) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  891) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  892) /* FPDT subtable header (Performance Record Structure) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  893) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  894) struct acpi_fpdt_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  895) 	u16 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  896) 	u8 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  897) 	u8 revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  898) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  899) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  900) /* Values for Type field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  901) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  902) enum acpi_fpdt_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  903) 	ACPI_FPDT_TYPE_BOOT = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  904) 	ACPI_FPDT_TYPE_S3PERF = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  905) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  906) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  907) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  908)  * FPDT subtables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  909)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  910) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  911) /* 0: Firmware Basic Boot Performance Record */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  912) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  913) struct acpi_fpdt_boot_pointer {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  914) 	struct acpi_fpdt_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  915) 	u8 reserved[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  916) 	u64 address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  917) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  918) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  919) /* 1: S3 Performance Table Pointer Record */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  920) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  921) struct acpi_fpdt_s3pt_pointer {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  922) 	struct acpi_fpdt_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  923) 	u8 reserved[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  924) 	u64 address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  925) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  926) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  927) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  928)  * S3PT - S3 Performance Table. This table is pointed to by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  929)  * S3 Pointer Record above.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  930)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  931) struct acpi_table_s3pt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  932) 	u8 signature[4];	/* "S3PT" */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  933) 	u32 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  934) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  935) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  936) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  937)  * S3PT Subtables (Not part of the actual FPDT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  938)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  939) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  940) /* Values for Type field in S3PT header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  941) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  942) enum acpi_s3pt_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  943) 	ACPI_S3PT_TYPE_RESUME = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  944) 	ACPI_S3PT_TYPE_SUSPEND = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  945) 	ACPI_FPDT_BOOT_PERFORMANCE = 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  946) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  947) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  948) struct acpi_s3pt_resume {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  949) 	struct acpi_fpdt_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  950) 	u32 resume_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  951) 	u64 full_resume;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  952) 	u64 average_resume;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  953) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  954) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  955) struct acpi_s3pt_suspend {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  956) 	struct acpi_fpdt_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  957) 	u64 suspend_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  958) 	u64 suspend_end;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  959) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  960) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  961) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  962)  * FPDT Boot Performance Record (Not part of the actual FPDT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  963)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  964) struct acpi_fpdt_boot {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  965) 	struct acpi_fpdt_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  966) 	u8 reserved[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  967) 	u64 reset_end;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  968) 	u64 load_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  969) 	u64 startup_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  970) 	u64 exit_services_entry;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  971) 	u64 exit_services_exit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  972) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  973) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  974) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  975)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  976)  * GTDT - Generic Timer Description Table (ACPI 5.1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  977)  *        Version 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  978)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  979)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  980) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  981) struct acpi_table_gtdt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  982) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  983) 	u64 counter_block_addresss;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  984) 	u32 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  985) 	u32 secure_el1_interrupt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  986) 	u32 secure_el1_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  987) 	u32 non_secure_el1_interrupt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  988) 	u32 non_secure_el1_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  989) 	u32 virtual_timer_interrupt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  990) 	u32 virtual_timer_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  991) 	u32 non_secure_el2_interrupt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  992) 	u32 non_secure_el2_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  993) 	u64 counter_read_block_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  994) 	u32 platform_timer_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  995) 	u32 platform_timer_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  996) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  997) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  998) /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  999) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1000) #define ACPI_GTDT_INTERRUPT_MODE        (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1001) #define ACPI_GTDT_INTERRUPT_POLARITY    (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1002) #define ACPI_GTDT_ALWAYS_ON             (1<<2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1003) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1004) struct acpi_gtdt_el2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1005) 	u32 virtual_el2_timer_gsiv;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1006) 	u32 virtual_el2_timer_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1007) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1008) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1009) /* Common GTDT subtable header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1010) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1011) struct acpi_gtdt_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1012) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1013) 	u16 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1014) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1015) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1016) /* Values for GTDT subtable type above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1017) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1018) enum acpi_gtdt_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1019) 	ACPI_GTDT_TYPE_TIMER_BLOCK = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1020) 	ACPI_GTDT_TYPE_WATCHDOG = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1021) 	ACPI_GTDT_TYPE_RESERVED = 2	/* 2 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1022) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1023) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1024) /* GTDT Subtables, correspond to Type in struct acpi_gtdt_header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1025) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1026) /* 0: Generic Timer Block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1027) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1028) struct acpi_gtdt_timer_block {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1029) 	struct acpi_gtdt_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1030) 	u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1031) 	u64 block_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1032) 	u32 timer_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1033) 	u32 timer_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1034) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1035) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1036) /* Timer Sub-Structure, one per timer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1037) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1038) struct acpi_gtdt_timer_entry {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1039) 	u8 frame_number;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1040) 	u8 reserved[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1041) 	u64 base_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1042) 	u64 el0_base_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1043) 	u32 timer_interrupt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1044) 	u32 timer_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1045) 	u32 virtual_timer_interrupt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1046) 	u32 virtual_timer_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1047) 	u32 common_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1048) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1049) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1050) /* Flag Definitions: timer_flags and virtual_timer_flags above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1051) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1052) #define ACPI_GTDT_GT_IRQ_MODE               (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1053) #define ACPI_GTDT_GT_IRQ_POLARITY           (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1054) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1055) /* Flag Definitions: common_flags above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1056) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1057) #define ACPI_GTDT_GT_IS_SECURE_TIMER        (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1058) #define ACPI_GTDT_GT_ALWAYS_ON              (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1059) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1060) /* 1: SBSA Generic Watchdog Structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1061) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1062) struct acpi_gtdt_watchdog {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1063) 	struct acpi_gtdt_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1064) 	u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1065) 	u64 refresh_frame_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1066) 	u64 control_frame_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1067) 	u32 timer_interrupt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1068) 	u32 timer_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1069) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1070) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1071) /* Flag Definitions: timer_flags above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1072) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1073) #define ACPI_GTDT_WATCHDOG_IRQ_MODE         (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1074) #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY     (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1075) #define ACPI_GTDT_WATCHDOG_SECURE           (1<<2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1076) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1077) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1078)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1079)  * HEST - Hardware Error Source Table (ACPI 4.0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1080)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1081)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1082)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1083) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1084) struct acpi_table_hest {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1085) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1086) 	u32 error_source_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1087) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1088) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1089) /* HEST subtable header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1090) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1091) struct acpi_hest_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1092) 	u16 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1093) 	u16 source_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1094) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1095) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1096) /* Values for Type field above for subtables */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1097) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1098) enum acpi_hest_types {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1099) 	ACPI_HEST_TYPE_IA32_CHECK = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1100) 	ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1101) 	ACPI_HEST_TYPE_IA32_NMI = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1102) 	ACPI_HEST_TYPE_NOT_USED3 = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1103) 	ACPI_HEST_TYPE_NOT_USED4 = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1104) 	ACPI_HEST_TYPE_NOT_USED5 = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1105) 	ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1106) 	ACPI_HEST_TYPE_AER_ENDPOINT = 7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1107) 	ACPI_HEST_TYPE_AER_BRIDGE = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1108) 	ACPI_HEST_TYPE_GENERIC_ERROR = 9,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1109) 	ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1110) 	ACPI_HEST_TYPE_IA32_DEFERRED_CHECK = 11,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1111) 	ACPI_HEST_TYPE_RESERVED = 12	/* 12 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1112) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1114) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1115)  * HEST substructures contained in subtables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1116)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1117) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1118) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1119)  * IA32 Error Bank(s) - Follows the struct acpi_hest_ia_machine_check and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1120)  * struct acpi_hest_ia_corrected structures.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1121)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1122) struct acpi_hest_ia_error_bank {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1123) 	u8 bank_number;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1124) 	u8 clear_status_on_init;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1125) 	u8 status_format;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1126) 	u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1127) 	u32 control_register;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1128) 	u64 control_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1129) 	u32 status_register;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1130) 	u32 address_register;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1131) 	u32 misc_register;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1132) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1134) /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1136) struct acpi_hest_aer_common {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1137) 	u16 reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1138) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1139) 	u8 enabled;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1140) 	u32 records_to_preallocate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1141) 	u32 max_sections_per_record;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1142) 	u32 bus;		/* Bus and Segment numbers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1143) 	u16 device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1144) 	u16 function;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1145) 	u16 device_control;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1146) 	u16 reserved2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1147) 	u32 uncorrectable_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1148) 	u32 uncorrectable_severity;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1149) 	u32 correctable_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1150) 	u32 advanced_capabilities;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1151) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1152) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1153) /* Masks for HEST Flags fields */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1154) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1155) #define ACPI_HEST_FIRMWARE_FIRST        (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1156) #define ACPI_HEST_GLOBAL                (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1157) #define ACPI_HEST_GHES_ASSIST           (1<<2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1158) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1159) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1160)  * Macros to access the bus/segment numbers in Bus field above:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1161)  *  Bus number is encoded in bits 7:0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1162)  *  Segment number is encoded in bits 23:8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1163)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1164) #define ACPI_HEST_BUS(bus)              ((bus) & 0xFF)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1165) #define ACPI_HEST_SEGMENT(bus)          (((bus) >> 8) & 0xFFFF)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1166) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1167) /* Hardware Error Notification */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1168) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1169) struct acpi_hest_notify {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1170) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1171) 	u8 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1172) 	u16 config_write_enable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1173) 	u32 poll_interval;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1174) 	u32 vector;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1175) 	u32 polling_threshold_value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1176) 	u32 polling_threshold_window;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1177) 	u32 error_threshold_value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1178) 	u32 error_threshold_window;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1179) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1180) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1181) /* Values for Notify Type field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1182) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1183) enum acpi_hest_notify_types {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1184) 	ACPI_HEST_NOTIFY_POLLED = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1185) 	ACPI_HEST_NOTIFY_EXTERNAL = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1186) 	ACPI_HEST_NOTIFY_LOCAL = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1187) 	ACPI_HEST_NOTIFY_SCI = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1188) 	ACPI_HEST_NOTIFY_NMI = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1189) 	ACPI_HEST_NOTIFY_CMCI = 5,	/* ACPI 5.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1190) 	ACPI_HEST_NOTIFY_MCE = 6,	/* ACPI 5.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1191) 	ACPI_HEST_NOTIFY_GPIO = 7,	/* ACPI 6.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1192) 	ACPI_HEST_NOTIFY_SEA = 8,	/* ACPI 6.1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1193) 	ACPI_HEST_NOTIFY_SEI = 9,	/* ACPI 6.1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1194) 	ACPI_HEST_NOTIFY_GSIV = 10,	/* ACPI 6.1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1195) 	ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11,	/* ACPI 6.2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1196) 	ACPI_HEST_NOTIFY_RESERVED = 12	/* 12 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1197) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1198) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1199) /* Values for config_write_enable bitfield above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1200) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1201) #define ACPI_HEST_TYPE                  (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1202) #define ACPI_HEST_POLL_INTERVAL         (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1203) #define ACPI_HEST_POLL_THRESHOLD_VALUE  (1<<2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1204) #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1205) #define ACPI_HEST_ERR_THRESHOLD_VALUE   (1<<4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1206) #define ACPI_HEST_ERR_THRESHOLD_WINDOW  (1<<5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1208) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1209)  * HEST subtables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1210)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1211) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1212) /* 0: IA32 Machine Check Exception */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1213) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1214) struct acpi_hest_ia_machine_check {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1215) 	struct acpi_hest_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1216) 	u16 reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1217) 	u8 flags;		/* See flags ACPI_HEST_GLOBAL, etc. above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1218) 	u8 enabled;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1219) 	u32 records_to_preallocate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1220) 	u32 max_sections_per_record;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1221) 	u64 global_capability_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1222) 	u64 global_control_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1223) 	u8 num_hardware_banks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1224) 	u8 reserved3[7];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1225) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1226) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1227) /* 1: IA32 Corrected Machine Check */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1228) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1229) struct acpi_hest_ia_corrected {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1230) 	struct acpi_hest_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1231) 	u16 reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1232) 	u8 flags;		/* See flags ACPI_HEST_GLOBAL, etc. above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1233) 	u8 enabled;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1234) 	u32 records_to_preallocate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1235) 	u32 max_sections_per_record;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1236) 	struct acpi_hest_notify notify;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1237) 	u8 num_hardware_banks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1238) 	u8 reserved2[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1239) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1240) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1241) /* 2: IA32 Non-Maskable Interrupt */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1242) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1243) struct acpi_hest_ia_nmi {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1244) 	struct acpi_hest_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1245) 	u32 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1246) 	u32 records_to_preallocate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1247) 	u32 max_sections_per_record;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1248) 	u32 max_raw_data_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1249) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1250) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1251) /* 3,4,5: Not used */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1252) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1253) /* 6: PCI Express Root Port AER */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1254) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1255) struct acpi_hest_aer_root {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1256) 	struct acpi_hest_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1257) 	struct acpi_hest_aer_common aer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1258) 	u32 root_error_command;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1259) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1260) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1261) /* 7: PCI Express AER (AER Endpoint) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1262) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1263) struct acpi_hest_aer {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1264) 	struct acpi_hest_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1265) 	struct acpi_hest_aer_common aer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1266) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1267) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1268) /* 8: PCI Express/PCI-X Bridge AER */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1269) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1270) struct acpi_hest_aer_bridge {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1271) 	struct acpi_hest_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1272) 	struct acpi_hest_aer_common aer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1273) 	u32 uncorrectable_mask2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1274) 	u32 uncorrectable_severity2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1275) 	u32 advanced_capabilities2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1276) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1277) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1278) /* 9: Generic Hardware Error Source */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1279) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1280) struct acpi_hest_generic {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1281) 	struct acpi_hest_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1282) 	u16 related_source_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1283) 	u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1284) 	u8 enabled;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1285) 	u32 records_to_preallocate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1286) 	u32 max_sections_per_record;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1287) 	u32 max_raw_data_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1288) 	struct acpi_generic_address error_status_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1289) 	struct acpi_hest_notify notify;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1290) 	u32 error_block_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1291) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1292) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1293) /* 10: Generic Hardware Error Source, version 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1294) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1295) struct acpi_hest_generic_v2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1296) 	struct acpi_hest_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1297) 	u16 related_source_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1298) 	u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1299) 	u8 enabled;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1300) 	u32 records_to_preallocate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1301) 	u32 max_sections_per_record;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1302) 	u32 max_raw_data_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1303) 	struct acpi_generic_address error_status_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1304) 	struct acpi_hest_notify notify;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1305) 	u32 error_block_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1306) 	struct acpi_generic_address read_ack_register;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1307) 	u64 read_ack_preserve;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1308) 	u64 read_ack_write;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1309) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1310) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1311) /* Generic Error Status block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1312) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1313) struct acpi_hest_generic_status {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1314) 	u32 block_status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1315) 	u32 raw_data_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1316) 	u32 raw_data_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1317) 	u32 data_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1318) 	u32 error_severity;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1319) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1320) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1321) /* Values for block_status flags above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1322) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1323) #define ACPI_HEST_UNCORRECTABLE             (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1324) #define ACPI_HEST_CORRECTABLE               (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1325) #define ACPI_HEST_MULTIPLE_UNCORRECTABLE    (1<<2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1326) #define ACPI_HEST_MULTIPLE_CORRECTABLE      (1<<3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1327) #define ACPI_HEST_ERROR_ENTRY_COUNT         (0xFF<<4)	/* 8 bits, error count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1328) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1329) /* Generic Error Data entry */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1330) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1331) struct acpi_hest_generic_data {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1332) 	u8 section_type[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1333) 	u32 error_severity;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1334) 	u16 revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1335) 	u8 validation_bits;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1336) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1337) 	u32 error_data_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1338) 	u8 fru_id[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1339) 	u8 fru_text[20];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1340) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1341) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1342) /* Extension for revision 0x0300 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1343) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1344) struct acpi_hest_generic_data_v300 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1345) 	u8 section_type[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1346) 	u32 error_severity;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1347) 	u16 revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1348) 	u8 validation_bits;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1349) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1350) 	u32 error_data_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1351) 	u8 fru_id[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1352) 	u8 fru_text[20];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1353) 	u64 time_stamp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1354) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1355) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1356) /* Values for error_severity above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1357) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1358) #define ACPI_HEST_GEN_ERROR_RECOVERABLE     0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1359) #define ACPI_HEST_GEN_ERROR_FATAL           1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1360) #define ACPI_HEST_GEN_ERROR_CORRECTED       2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1361) #define ACPI_HEST_GEN_ERROR_NONE            3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1362) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1363) /* Flags for validation_bits above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1364) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1365) #define ACPI_HEST_GEN_VALID_FRU_ID          (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1366) #define ACPI_HEST_GEN_VALID_FRU_STRING      (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1367) #define ACPI_HEST_GEN_VALID_TIMESTAMP       (1<<2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1368) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1369) /* 11: IA32 Deferred Machine Check Exception (ACPI 6.2) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1370) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1371) struct acpi_hest_ia_deferred_check {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1372) 	struct acpi_hest_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1373) 	u16 reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1374) 	u8 flags;		/* See flags ACPI_HEST_GLOBAL, etc. above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1375) 	u8 enabled;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1376) 	u32 records_to_preallocate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1377) 	u32 max_sections_per_record;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1378) 	struct acpi_hest_notify notify;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1379) 	u8 num_hardware_banks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1380) 	u8 reserved2[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1381) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1382) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1383) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1384)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1385)  * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1386)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1387)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1388)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1389) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1390) struct acpi_table_hmat {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1391) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1392) 	u32 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1393) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1394) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1395) /* Values for HMAT structure types */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1396) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1397) enum acpi_hmat_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1398) 	ACPI_HMAT_TYPE_PROXIMITY = 0,	/* Memory proximity domain attributes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1399) 	ACPI_HMAT_TYPE_LOCALITY = 1,	/* System locality latency and bandwidth information */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1400) 	ACPI_HMAT_TYPE_CACHE = 2,	/* Memory side cache information */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1401) 	ACPI_HMAT_TYPE_RESERVED = 3	/* 3 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1402) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1403) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1404) struct acpi_hmat_structure {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1405) 	u16 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1406) 	u16 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1407) 	u32 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1408) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1409) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1410) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1411)  * HMAT Structures, correspond to Type in struct acpi_hmat_structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1412)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1413) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1414) /* 0: Memory proximity domain attributes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1415) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1416) struct acpi_hmat_proximity_domain {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1417) 	struct acpi_hmat_structure header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1418) 	u16 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1419) 	u16 reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1420) 	u32 processor_PD;	/* Processor proximity domain */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1421) 	u32 memory_PD;		/* Memory proximity domain */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1422) 	u32 reserved2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1423) 	u64 reserved3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1424) 	u64 reserved4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1425) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1426) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1427) /* Masks for Flags field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1428) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1429) #define ACPI_HMAT_PROCESSOR_PD_VALID    (1)	/* 1: processor_PD field is valid */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1430) #define ACPI_HMAT_MEMORY_PD_VALID       (1<<1)	/* 1: memory_PD field is valid */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1431) #define ACPI_HMAT_RESERVATION_HINT      (1<<2)	/* 1: Reservation hint */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1432) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1433) /* 1: System locality latency and bandwidth information */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1434) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1435) struct acpi_hmat_locality {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1436) 	struct acpi_hmat_structure header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1437) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1438) 	u8 data_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1439) 	u16 reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1440) 	u32 number_of_initiator_Pds;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1441) 	u32 number_of_target_Pds;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1442) 	u32 reserved2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1443) 	u64 entry_base_unit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1444) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1445) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1446) /* Masks for Flags field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1447) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1448) #define ACPI_HMAT_MEMORY_HIERARCHY  (0x0F)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1449) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1450) /* Values for Memory Hierarchy flag */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1451) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1452) #define ACPI_HMAT_MEMORY            0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1453) #define ACPI_HMAT_LAST_LEVEL_CACHE  1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1454) #define ACPI_HMAT_1ST_LEVEL_CACHE   2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1455) #define ACPI_HMAT_2ND_LEVEL_CACHE   3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1456) #define ACPI_HMAT_3RD_LEVEL_CACHE   4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1457) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1458) /* Values for data_type field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1459) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1460) #define ACPI_HMAT_ACCESS_LATENCY    0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1461) #define ACPI_HMAT_READ_LATENCY      1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1462) #define ACPI_HMAT_WRITE_LATENCY     2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1463) #define ACPI_HMAT_ACCESS_BANDWIDTH  3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1464) #define ACPI_HMAT_READ_BANDWIDTH    4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1465) #define ACPI_HMAT_WRITE_BANDWIDTH   5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1466) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1467) /* 2: Memory side cache information */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1468) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1469) struct acpi_hmat_cache {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1470) 	struct acpi_hmat_structure header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1471) 	u32 memory_PD;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1472) 	u32 reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1473) 	u64 cache_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1474) 	u32 cache_attributes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1475) 	u16 reserved2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1476) 	u16 number_of_SMBIOShandles;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1477) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1478) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1479) /* Masks for cache_attributes field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1480) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1481) #define ACPI_HMAT_TOTAL_CACHE_LEVEL     (0x0000000F)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1482) #define ACPI_HMAT_CACHE_LEVEL           (0x000000F0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1483) #define ACPI_HMAT_CACHE_ASSOCIATIVITY   (0x00000F00)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1484) #define ACPI_HMAT_WRITE_POLICY          (0x0000F000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1485) #define ACPI_HMAT_CACHE_LINE_SIZE       (0xFFFF0000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1486) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1487) /* Values for cache associativity flag */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1488) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1489) #define ACPI_HMAT_CA_NONE                     (0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1490) #define ACPI_HMAT_CA_DIRECT_MAPPED            (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1491) #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING   (2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1492) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1493) /* Values for write policy flag */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1494) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1495) #define ACPI_HMAT_CP_NONE   (0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1496) #define ACPI_HMAT_CP_WB     (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1497) #define ACPI_HMAT_CP_WT     (2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1498) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1499) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1500)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1501)  * HPET - High Precision Event Timer table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1502)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1503)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1504)  * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1505)  * Version 1.0a, October 2004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1506)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1507)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1508) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1509) struct acpi_table_hpet {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1510) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1511) 	u32 id;			/* Hardware ID of event timer block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1512) 	struct acpi_generic_address address;	/* Address of event timer block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1513) 	u8 sequence;		/* HPET sequence number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1514) 	u16 minimum_tick;	/* Main counter min tick, periodic mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1515) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1516) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1517) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1518) /* Masks for Flags field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1519) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1520) #define ACPI_HPET_PAGE_PROTECT_MASK (3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1521) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1522) /* Values for Page Protect flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1523) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1524) enum acpi_hpet_page_protect {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1525) 	ACPI_HPET_NO_PAGE_PROTECT = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1526) 	ACPI_HPET_PAGE_PROTECT4 = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1527) 	ACPI_HPET_PAGE_PROTECT64 = 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1528) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1529) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1530) /*******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1531)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1532)  * IBFT - Boot Firmware Table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1533)  *        Version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1534)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1535)  * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1536)  * Specification", Version 1.01, March 1, 2007
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1537)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1538)  * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1539)  * Therefore, it is not currently supported by the disassembler.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1540)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1541)  ******************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1542) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1543) struct acpi_table_ibft {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1544) 	struct acpi_table_header header;	/* Common ACPI table header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1545) 	u8 reserved[12];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1546) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1547) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1548) /* IBFT common subtable header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1549) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1550) struct acpi_ibft_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1551) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1552) 	u8 version;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1553) 	u16 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1554) 	u8 index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1555) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1556) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1557) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1558) /* Values for Type field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1559) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1560) enum acpi_ibft_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1561) 	ACPI_IBFT_TYPE_NOT_USED = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1562) 	ACPI_IBFT_TYPE_CONTROL = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1563) 	ACPI_IBFT_TYPE_INITIATOR = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1564) 	ACPI_IBFT_TYPE_NIC = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1565) 	ACPI_IBFT_TYPE_TARGET = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1566) 	ACPI_IBFT_TYPE_EXTENSIONS = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1567) 	ACPI_IBFT_TYPE_RESERVED = 6	/* 6 and greater are reserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1568) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1569) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1570) /* IBFT subtables */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1571) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1572) struct acpi_ibft_control {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1573) 	struct acpi_ibft_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1574) 	u16 extensions;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1575) 	u16 initiator_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1576) 	u16 nic0_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1577) 	u16 target0_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1578) 	u16 nic1_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1579) 	u16 target1_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1580) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1581) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1582) struct acpi_ibft_initiator {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1583) 	struct acpi_ibft_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1584) 	u8 sns_server[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1585) 	u8 slp_server[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1586) 	u8 primary_server[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1587) 	u8 secondary_server[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1588) 	u16 name_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1589) 	u16 name_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1590) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1591) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1592) struct acpi_ibft_nic {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1593) 	struct acpi_ibft_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1594) 	u8 ip_address[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1595) 	u8 subnet_mask_prefix;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1596) 	u8 origin;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1597) 	u8 gateway[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1598) 	u8 primary_dns[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1599) 	u8 secondary_dns[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1600) 	u8 dhcp[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1601) 	u16 vlan;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1602) 	u8 mac_address[6];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1603) 	u16 pci_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1604) 	u16 name_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1605) 	u16 name_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1606) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1607) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1608) struct acpi_ibft_target {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1609) 	struct acpi_ibft_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1610) 	u8 target_ip_address[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1611) 	u16 target_ip_socket;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1612) 	u8 target_boot_lun[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1613) 	u8 chap_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1614) 	u8 nic_association;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1615) 	u16 target_name_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1616) 	u16 target_name_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1617) 	u16 chap_name_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1618) 	u16 chap_name_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1619) 	u16 chap_secret_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1620) 	u16 chap_secret_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1621) 	u16 reverse_chap_name_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1622) 	u16 reverse_chap_name_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1623) 	u16 reverse_chap_secret_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1624) 	u16 reverse_chap_secret_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1625) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1626) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1627) /* Reset to default packing */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1628) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1629) #pragma pack()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1630) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1631) #endif				/* __ACTBL1_H__ */