Merge branch 'acpica'

* acpica: (22 commits)
  ACPICA: Update version to 20210331
  ACPICA: IORT: Updates for revision E.b
  ACPICA: acpisrc: Add missing conversion for VIOT support
  ACPICA: iASL: Decode subtable type field for VIOT
  ACPICA: iASL: Add support for CEDT table
  ACPICA: ACPI 6.4: add support for PHAT table
  ACPICA: ACPI 6.4: add CSI2Bus resource template
  ACPICA: ACPI 6.4: PMTT: add new fields/structures
  ACPICA: CXL 2.0: CEDT: Add new CEDT table
  ACPICA: iASL: Add definitions for the VIOT table
  ACPICA: ACPI 6.4: add SDEV secure access components
  ACPICA: ACPI 6.4: Add new flags in SRAT
  ACPICA: ACPI 6.4: HMAT: add new fields/flags
  ACPICA: ACPI 6.4: NFIT: add Location Cookie field
  ACPICA: Tree-wide: fix various typos and spelling mistakes
  ACPICA: ACPI 6.4: PPTT: add new version of subtable type 1
  ACPICA: ACPI 6.4: PCCT: add support for subtable type 5
  ACPICA: ACPI 6.4: MADT: add Multiprocessor Wakeup Structure
  ACPICA: ACPI 6.4: add CXL ACPI device ID and _CBR object
  ACPICA: ACPI 6.4: add USB4 capabilities UUID
  ...
This commit is contained in:
Rafael J. Wysocki 2021-04-26 17:00:42 +02:00
commit e1f9277c4a
23 changed files with 537 additions and 44 deletions

View File

@ -328,6 +328,17 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
{{"_BMS", METHOD_1ARGS(ACPI_TYPE_INTEGER),
METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
{{"_BPC", METHOD_0ARGS,
METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (4 Int) */
PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0),
{{"_BPS", METHOD_0ARGS,
METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (5 Int) */
PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 5, 0, 0, 0),
{{"_BPT", METHOD_1ARGS(ACPI_TYPE_PACKAGE),
METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
{{"_BQC", METHOD_0ARGS,
METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
@ -347,6 +358,10 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
{{"_CBA", METHOD_0ARGS,
METHOD_RETURNS(ACPI_RTYPE_INTEGER)}}, /* See PCI firmware spec 3.0 */
{{"_CBR", METHOD_0ARGS,
METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (3 Int) */
PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3, 0, 0, 0),
{{"_CCA", METHOD_0ARGS,
METHOD_RETURNS(ACPI_RTYPE_INTEGER)}}, /* ACPI 5.1 */

View File

@ -46,6 +46,7 @@ typedef enum {
ACPI_RSC_1BITFLAG,
ACPI_RSC_2BITFLAG,
ACPI_RSC_3BITFLAG,
ACPI_RSC_6BITFLAG,
ACPI_RSC_ADDRESS,
ACPI_RSC_BITMASK,
ACPI_RSC_BITMASK16,
@ -102,6 +103,7 @@ typedef enum {
ACPI_RSD_1BITFLAG,
ACPI_RSD_2BITFLAG,
ACPI_RSD_3BITFLAG,
ACPI_RSD_6BITFLAG,
ACPI_RSD_ADDRESS,
ACPI_RSD_DWORDLIST,
ACPI_RSD_LITERAL,
@ -295,6 +297,7 @@ extern struct acpi_rsconvert_info acpi_rs_convert_address64[];
extern struct acpi_rsconvert_info acpi_rs_convert_ext_address64[];
extern struct acpi_rsconvert_info acpi_rs_convert_gpio[];
extern struct acpi_rsconvert_info acpi_rs_convert_fixed_dma[];
extern struct acpi_rsconvert_info acpi_rs_convert_csi2_serial_bus[];
extern struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[];
extern struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[];
extern struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[];
@ -349,6 +352,7 @@ extern struct acpi_rsdump_info acpi_rs_dump_gpio[];
extern struct acpi_rsdump_info acpi_rs_dump_pin_function[];
extern struct acpi_rsdump_info acpi_rs_dump_fixed_dma[];
extern struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[];
extern struct acpi_rsdump_info acpi_rs_dump_csi2_serial_bus[];
extern struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[];
extern struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[];
extern struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[];

View File

@ -28,6 +28,7 @@ extern const char *acpi_gbl_max_decode[];
extern const char *acpi_gbl_mem_decode[];
extern const char *acpi_gbl_min_decode[];
extern const char *acpi_gbl_mtp_decode[];
extern const char *acpi_gbl_phy_decode[];
extern const char *acpi_gbl_rng_decode[];
extern const char *acpi_gbl_rw_decode[];
extern const char *acpi_gbl_shr_decode[];

View File

@ -40,6 +40,7 @@
#define ACPI_RESTAG_IORESTRICTION "_IOR"
#define ACPI_RESTAG_LENGTH "_LEN"
#define ACPI_RESTAG_LINE "_LIN"
#define ACPI_RESTAG_LOCALPORT "_PRT"
#define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
#define ACPI_RESTAG_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
#define ACPI_RESTAG_MAXADDR "_MAX"
@ -49,6 +50,7 @@
#define ACPI_RESTAG_MODE "_MOD"
#define ACPI_RESTAG_PARITY "_PAR"
#define ACPI_RESTAG_PHASE "_PHA"
#define ACPI_RESTAG_PHYTYPE "_PHY"
#define ACPI_RESTAG_PIN "_PIN"
#define ACPI_RESTAG_PINCONFIG "_PPI"
#define ACPI_RESTAG_PINCONFIG_TYPE "_TYP"
@ -316,12 +318,26 @@ struct aml_resource_gpio {
#define AML_RESOURCE_I2C_SERIALBUSTYPE 1
#define AML_RESOURCE_SPI_SERIALBUSTYPE 2
#define AML_RESOURCE_UART_SERIALBUSTYPE 3
#define AML_RESOURCE_MAX_SERIALBUSTYPE 3
#define AML_RESOURCE_CSI2_SERIALBUSTYPE 4
#define AML_RESOURCE_MAX_SERIALBUSTYPE 4
#define AML_RESOURCE_VENDOR_SERIALBUSTYPE 192 /* Vendor defined is 0xC0-0xFF (NOT SUPPORTED) */
struct aml_resource_common_serialbus {
AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_SERIAL_COMMON};
struct aml_resource_csi2_serialbus {
AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_SERIAL_COMMON
/*
* Optional fields follow immediately:
* 1) Vendor Data bytes
* 2) Resource Source String
*/
};
#define AML_RESOURCE_CSI2_REVISION 1 /* ACPI 6.4 */
#define AML_RESOURCE_CSI2_TYPE_REVISION 1 /* ACPI 6.4 */
#define AML_RESOURCE_CSI2_MIN_DATA_LEN 0 /* ACPI 6.4 */
struct aml_resource_i2c_serialbus {
AML_RESOURCE_LARGE_HEADER_COMMON
AML_RESOURCE_SERIAL_COMMON u32 connection_speed;
@ -510,6 +526,7 @@ union aml_resource {
struct aml_resource_i2c_serialbus i2c_serial_bus;
struct aml_resource_spi_serialbus spi_serial_bus;
struct aml_resource_uart_serialbus uart_serial_bus;
struct aml_resource_csi2_serialbus csi2_serial_bus;
struct aml_resource_common_serialbus common_serial_bus;
struct aml_resource_pin_function pin_function;
struct aml_resource_pin_config pin_config;

View File

@ -677,10 +677,10 @@ acpi_rs_get_list_length(u8 *aml_buffer,
*size_needed += buffer_size;
ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES,
"Type %.2X, AmlLength %.2X InternalLength %.2X\n",
"Type %.2X, AmlLength %.2X InternalLength %.2X%8X\n",
acpi_ut_get_resource_type(aml_buffer),
acpi_ut_get_descriptor_length(aml_buffer),
buffer_size));
ACPI_FORMAT_UINT64(*size_needed)));
/*
* Point to the next resource within the AML stream using the length

View File

@ -87,6 +87,9 @@ void acpi_rs_dump_resource_list(struct acpi_resource *resource_list)
("Invalid descriptor type (%X) in resource list\n",
resource_list->type);
return;
} else if (!resource_list->type) {
ACPI_ERROR((AE_INFO, "Invalid Zero Resource Type"));
return;
}
/* Sanity check the length. It must not be zero, or we loop forever */
@ -258,6 +261,11 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
table->pointer[*target & 0x07]);
break;
case ACPI_RSD_6BITFLAG:
acpi_rs_out_integer8(name, (ACPI_GET8(target) & 0x3F));
break;
case ACPI_RSD_SHORTLIST:
/*
* Short byte list (single line output) for DMA and IRQ resources

View File

@ -421,6 +421,32 @@ struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[11] = {
ACPI_RS_DUMP_COMMON_SERIAL_BUS
};
struct acpi_rsdump_info acpi_rs_dump_csi2_serial_bus[11] = {
{ ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_csi2_serial_bus),
"Camera Serial Bus", NULL },
{ ACPI_RSD_UINT8, ACPI_RSD_OFFSET(csi2_serial_bus.revision_id),
"RevisionId", NULL },
{ ACPI_RSD_UINT8, ACPI_RSD_OFFSET(csi2_serial_bus.type), "Type",
acpi_gbl_sbt_decode },
{ ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(csi2_serial_bus.producer_consumer),
"ProducerConsumer", acpi_gbl_consume_decode },
{ ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(csi2_serial_bus.slave_mode),
"SlaveMode", acpi_gbl_sm_decode },
{ ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(csi2_serial_bus.phy_type),
"PhyType", acpi_gbl_phy_decode },
{ ACPI_RSD_6BITFLAG,
ACPI_RSD_OFFSET(csi2_serial_bus.local_port_instance),
"LocalPortInstance", NULL },
{ ACPI_RSD_UINT8, ACPI_RSD_OFFSET(csi2_serial_bus.type_revision_id),
"TypeRevisionId", NULL },
{ ACPI_RSD_UINT16, ACPI_RSD_OFFSET(csi2_serial_bus.vendor_length),
"VendorLength", NULL },
{ ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(csi2_serial_bus.vendor_data),
"VendorData", NULL },
{ ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(csi2_serial_bus.resource_source),
"ResourceSource", NULL },
};
struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[14] = {
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_i2c_serial_bus),
"I2C Serial Bus", NULL},

View File

@ -96,13 +96,14 @@ struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[] = {
acpi_rs_convert_pin_group_config, /* 0x12, ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG */
};
/* Subtype table for serial_bus -- I2C, SPI, and UART */
/* Subtype table for serial_bus -- I2C, SPI, UART, and CSI2 */
struct acpi_rsconvert_info *acpi_gbl_convert_resource_serial_bus_dispatch[] = {
NULL,
acpi_rs_convert_i2c_serial_bus,
acpi_rs_convert_spi_serial_bus,
acpi_rs_convert_uart_serial_bus,
acpi_rs_convert_csi2_serial_bus
};
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
@ -142,6 +143,7 @@ struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[] = {
acpi_rs_dump_i2c_serial_bus, /* AML_RESOURCE_I2C_BUS_TYPE */
acpi_rs_dump_spi_serial_bus, /* AML_RESOURCE_SPI_BUS_TYPE */
acpi_rs_dump_uart_serial_bus, /* AML_RESOURCE_UART_BUS_TYPE */
acpi_rs_dump_csi2_serial_bus, /* AML_RESOURCE_CSI2_BUS_TYPE */
};
#endif
@ -226,6 +228,7 @@ const u8 acpi_gbl_aml_resource_serial_bus_sizes[] = {
sizeof(struct aml_resource_i2c_serialbus),
sizeof(struct aml_resource_spi_serialbus),
sizeof(struct aml_resource_uart_serialbus),
sizeof(struct aml_resource_csi2_serialbus),
};
const u8 acpi_gbl_resource_struct_serial_bus_sizes[] = {
@ -233,4 +236,5 @@ const u8 acpi_gbl_resource_struct_serial_bus_sizes[] = {
ACPI_RS_SIZE(struct acpi_resource_i2c_serialbus),
ACPI_RS_SIZE(struct acpi_resource_spi_serialbus),
ACPI_RS_SIZE(struct acpi_resource_uart_serialbus),
ACPI_RS_SIZE(struct acpi_resource_csi2_serialbus),
};

View File

@ -59,7 +59,7 @@ acpi_rs_convert_aml_to_resources(u8 * aml,
AML_RESOURCE_MAX_SERIALBUSTYPE) {
conversion_table = NULL;
} else {
/* This is an I2C, SPI, or UART serial_bus descriptor */
/* This is an I2C, SPI, UART, or CSI2 serial_bus descriptor */
conversion_table =
acpi_gbl_convert_resource_serial_bus_dispatch
@ -89,6 +89,11 @@ acpi_rs_convert_aml_to_resources(u8 * aml,
return_ACPI_STATUS(status);
}
if (!resource->length) {
ACPI_EXCEPTION((AE_INFO, status,
"Zero-length resource returned from RsConvertAmlToResource"));
}
ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES,
"Type %.2X, AmlLength %.2X InternalLength %.2X\n",
acpi_ut_get_resource_type(aml), length,
@ -158,7 +163,7 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource,
AML_RESOURCE_MAX_SERIALBUSTYPE) {
conversion_table = NULL;
} else {
/* This is an I2C, SPI, or UART serial_bus descriptor */
/* This is an I2C, SPI, UART or CSI2 serial_bus descriptor */
conversion_table =
acpi_gbl_convert_resource_serial_bus_dispatch

View File

@ -70,6 +70,8 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
*/
count = INIT_TABLE_LENGTH(info);
while (count) {
target = NULL;
/*
* Source is the external AML byte stream buffer,
* destination is the internal resource descriptor
@ -120,6 +122,14 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
((ACPI_GET8(source) >> info->value) & 0x07));
break;
case ACPI_RSC_6BITFLAG:
/*
* Mask and shift the flag bits
*/
ACPI_SET8(destination,
((ACPI_GET8(source) >> info->value) & 0x3F));
break;
case ACPI_RSC_COUNT:
item_count = ACPI_GET8(source);
@ -509,6 +519,15 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,
value));
break;
case ACPI_RSC_6BITFLAG:
/*
* Mask and shift the flag bits
*/
ACPI_SET_BIT(*ACPI_CAST8(destination), (u8)
((ACPI_GET8(source) & 0x3F) << info->
value));
break;
case ACPI_RSC_COUNT:
item_count = ACPI_GET8(source);

View File

@ -185,6 +185,81 @@ struct acpi_rsconvert_info acpi_rs_convert_pin_function[13] = {
0},
};
/*******************************************************************************
*
* acpi_rs_convert_csi2_serial_bus
*
******************************************************************************/
struct acpi_rsconvert_info acpi_rs_convert_csi2_serial_bus[14] = {
{ ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS,
ACPI_RS_SIZE(struct acpi_resource_csi2_serialbus),
ACPI_RSC_TABLE_SIZE(acpi_rs_convert_csi2_serial_bus) },
{ ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS,
sizeof(struct aml_resource_csi2_serialbus),
0 },
{ ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.common_serial_bus.revision_id),
AML_OFFSET(common_serial_bus.revision_id),
1 },
{ ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.csi2_serial_bus.type),
AML_OFFSET(csi2_serial_bus.type),
1 },
{ ACPI_RSC_1BITFLAG,
ACPI_RS_OFFSET(data.csi2_serial_bus.producer_consumer),
AML_OFFSET(csi2_serial_bus.flags),
1 },
{ ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.csi2_serial_bus.slave_mode),
AML_OFFSET(csi2_serial_bus.flags),
0 },
{ ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.csi2_serial_bus.phy_type),
AML_OFFSET(csi2_serial_bus.type_specific_flags),
0 },
{ ACPI_RSC_6BITFLAG,
ACPI_RS_OFFSET(data.csi2_serial_bus.local_port_instance),
AML_OFFSET(csi2_serial_bus.type_specific_flags),
2 },
{ ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.csi2_serial_bus.type_revision_id),
AML_OFFSET(csi2_serial_bus.type_revision_id),
1 },
/* Vendor data */
{ ACPI_RSC_COUNT_SERIAL_VEN,
ACPI_RS_OFFSET(data.csi2_serial_bus.vendor_length),
AML_OFFSET(csi2_serial_bus.type_data_length),
AML_RESOURCE_CSI2_MIN_DATA_LEN },
{ ACPI_RSC_MOVE_SERIAL_VEN,
ACPI_RS_OFFSET(data.csi2_serial_bus.vendor_data),
0,
sizeof(struct aml_resource_csi2_serialbus) },
/* Resource Source */
{ ACPI_RSC_MOVE8,
ACPI_RS_OFFSET(data.csi2_serial_bus.resource_source.index),
AML_OFFSET(csi2_serial_bus.res_source_index),
1 },
{ ACPI_RSC_COUNT_SERIAL_RES,
ACPI_RS_OFFSET(data.csi2_serial_bus.resource_source.string_length),
AML_OFFSET(csi2_serial_bus.type_data_length),
sizeof(struct aml_resource_csi2_serialbus) },
{ ACPI_RSC_MOVE_SERIAL_RES,
ACPI_RS_OFFSET(data.csi2_serial_bus.resource_source.string_ptr),
AML_OFFSET(csi2_serial_bus.type_data_length),
sizeof(struct aml_resource_csi2_serialbus) },
};
/*******************************************************************************
*
* acpi_rs_convert_i2c_serial_bus

View File

@ -82,6 +82,13 @@ const char *acpi_gbl_mtp_decode[] = {
"AddressRangeNVS"
};
const char *acpi_gbl_phy_decode[] = {
"Type C",
"Type D",
"Unknown Type",
"Unknown Type"
};
const char *acpi_gbl_rng_decode[] = {
"InvalidRanges",
"NonISAOnlyRanges",
@ -161,7 +168,8 @@ const char *acpi_gbl_sbt_decode[] = {
"/* UNKNOWN serial bus type */",
"I2C",
"SPI",
"UART"
"UART",
"CSI2"
};
/* I2C serial bus access mode */

View File

@ -64,6 +64,7 @@ const u8 acpi_gbl_resource_aml_serial_bus_sizes[] = {
ACPI_AML_SIZE_LARGE(struct aml_resource_i2c_serialbus),
ACPI_AML_SIZE_LARGE(struct aml_resource_spi_serialbus),
ACPI_AML_SIZE_LARGE(struct aml_resource_uart_serialbus),
ACPI_AML_SIZE_LARGE(struct aml_resource_csi2_serialbus),
};
/*

View File

@ -3831,7 +3831,7 @@ static __init int nfit_init(void)
int ret;
BUILD_BUG_ON(sizeof(struct acpi_table_nfit) != 40);
BUILD_BUG_ON(sizeof(struct acpi_nfit_system_address) != 56);
BUILD_BUG_ON(sizeof(struct acpi_nfit_system_address) != 64);
BUILD_BUG_ON(sizeof(struct acpi_nfit_memory_map) != 48);
BUILD_BUG_ON(sizeof(struct acpi_nfit_interleave) != 20);
BUILD_BUG_ON(sizeof(struct acpi_nfit_smbios) != 9);

View File

@ -362,7 +362,7 @@
*
* A less-safe version of the macros is provided for optional use if the
* compiler uses excessive CPU stack (for example, this may happen in the
* debug case if code optimzation is disabled.)
* debug case if code optimization is disabled.)
*/
/* Exit trace helper macro */

View File

@ -12,7 +12,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20210105
#define ACPI_CA_VERSION 0x20210331
#include <acpi/acconfig.h>
#include <acpi/actypes.h>

View File

@ -381,7 +381,7 @@ struct acpi_resource_gpio {
#define ACPI_IO_RESTRICT_OUTPUT 2
#define ACPI_IO_RESTRICT_NONE_PRESERVE 3
/* Common structure for I2C, SPI, and UART serial descriptors */
/* Common structure for I2C, SPI, UART, CSI2 serial descriptors */
#define ACPI_RESOURCE_SERIAL_COMMON \
u8 revision_id; \
@ -403,6 +403,7 @@ ACPI_RESOURCE_SERIAL_COMMON};
#define ACPI_RESOURCE_SERIAL_TYPE_I2C 1
#define ACPI_RESOURCE_SERIAL_TYPE_SPI 2
#define ACPI_RESOURCE_SERIAL_TYPE_UART 3
#define ACPI_RESOURCE_SERIAL_TYPE_CSI2 4
/* Values for slave_mode field above */
@ -505,6 +506,11 @@ struct acpi_resource_uart_serialbus {
#define ACPI_UART_CLEAR_TO_SEND (1<<6)
#define ACPI_UART_REQUEST_TO_SEND (1<<7)
struct acpi_resource_csi2_serialbus {
ACPI_RESOURCE_SERIAL_COMMON u8 local_port_instance;
u8 phy_type;
};
struct acpi_resource_pin_function {
u8 revision_id;
u8 pin_config;
@ -634,6 +640,7 @@ union acpi_resource_data {
struct acpi_resource_i2c_serialbus i2c_serial_bus;
struct acpi_resource_spi_serialbus spi_serial_bus;
struct acpi_resource_uart_serialbus uart_serial_bus;
struct acpi_resource_csi2_serialbus csi2_serial_bus;
struct acpi_resource_common_serialbus common_serial_bus;
struct acpi_resource_pin_function pin_function;
struct acpi_resource_pin_config pin_config;

View File

@ -28,6 +28,7 @@
#define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
#define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
#define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
#define ACPI_SIG_CEDT "CEDT" /* CXL Early Discovery Table */
#define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
#define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
#define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
@ -301,6 +302,49 @@ struct acpi_table_boot {
u8 reserved[3];
};
/*******************************************************************************
*
* CEDT - CXL Early Discovery Table
* Version 1
*
* Conforms to the "CXL Early Discovery Table" (CXL 2.0)
*
******************************************************************************/
struct acpi_table_cedt {
struct acpi_table_header header; /* Common ACPI table header */
};
/* CEDT subtable header (Performance Record Structure) */
struct acpi_cedt_header {
u8 type;
u8 reserved;
u16 length;
};
/* Values for Type field above */
enum acpi_cedt_type {
ACPI_CEDT_TYPE_CHBS = 0,
ACPI_CEDT_TYPE_RESERVED = 1
};
/*
* CEDT subtables
*/
/* 0: CXL Host Bridge Structure */
struct acpi_cedt_chbs {
struct acpi_cedt_header header;
u32 uid;
u32 cxl_version;
u32 reserved;
u64 base;
u64 length;
};
/*******************************************************************************
*
* CPEP - Corrected Platform Error Polling table (ACPI 4.0)
@ -1445,7 +1489,8 @@ struct acpi_hmat_locality {
struct acpi_hmat_structure header;
u8 flags;
u8 data_type;
u16 reserved1;
u8 min_transfer_size;
u8 reserved1;
u32 number_of_initiator_Pds;
u32 number_of_target_Pds;
u32 reserved2;
@ -1454,15 +1499,18 @@ struct acpi_hmat_locality {
/* Masks for Flags field above */
#define ACPI_HMAT_MEMORY_HIERARCHY (0x0F)
#define ACPI_HMAT_MEMORY_HIERARCHY (0x0F) /* Bits 0-3 */
/* Values for Memory Hierarchy flag */
/* Values for Memory Hierarchy flags */
#define ACPI_HMAT_MEMORY 0
#define ACPI_HMAT_LAST_LEVEL_CACHE 1
#define ACPI_HMAT_1ST_LEVEL_CACHE 2
#define ACPI_HMAT_2ND_LEVEL_CACHE 3
#define ACPI_HMAT_3RD_LEVEL_CACHE 4
#define ACPI_HMAT_MINIMUM_XFER_SIZE 0x10 /* Bit 4: ACPI 6.4 */
#define ACPI_HMAT_NON_SEQUENTIAL_XFERS 0x20 /* Bit 5: ACPI 6.4 */
/* Values for data_type field above */

View File

@ -36,6 +36,7 @@
#define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
#define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
#define ACPI_SIG_PDTT "PDTT" /* Platform Debug Trigger Table */
#define ACPI_SIG_PHAT "PHAT" /* Platform Health Assessment Table */
#define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
#define ACPI_SIG_PPTT "PPTT" /* Processor Properties Topology Table */
#define ACPI_SIG_RASF "RASF" /* RAS Feature table */
@ -67,7 +68,7 @@
* IORT - IO Remapping Table
*
* Conforms to "IO Remapping Table System Software on ARM Platforms",
* Document number: ARM DEN 0049D, March 2018
* Document number: ARM DEN 0049E.b, Feb 2021
*
******************************************************************************/
@ -85,7 +86,7 @@ struct acpi_iort_node {
u8 type;
u16 length;
u8 revision;
u32 reserved;
u32 identifier;
u32 mapping_count;
u32 mapping_offset;
char node_data[1];
@ -99,7 +100,8 @@ enum acpi_iort_node_type {
ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
ACPI_IORT_NODE_SMMU = 0x03,
ACPI_IORT_NODE_SMMU_V3 = 0x04,
ACPI_IORT_NODE_PMCG = 0x05
ACPI_IORT_NODE_PMCG = 0x05,
ACPI_IORT_NODE_RMR = 0x06,
};
struct acpi_iort_id_mapping {
@ -166,10 +168,11 @@ struct acpi_iort_root_complex {
u8 reserved[3]; /* Reserved, must be zero */
};
/* Values for ats_attribute field above */
/* Masks for ats_attribute field above */
#define ACPI_IORT_ATS_SUPPORTED 0x00000001 /* The root complex supports ATS */
#define ACPI_IORT_ATS_UNSUPPORTED 0x00000000 /* The root complex doesn't support ATS */
#define ACPI_IORT_ATS_SUPPORTED (1) /* The root complex ATS support */
#define ACPI_IORT_PRI_SUPPORTED (1<<1) /* The root complex PRI support */
#define ACPI_IORT_PASID_FWD_SUPPORTED (1<<2) /* The root complex PASID forward support */
struct acpi_iort_smmu {
u64 base_address; /* SMMU base address */
@ -240,6 +243,18 @@ struct acpi_iort_pmcg {
u64 page1_base_address;
};
struct acpi_iort_rmr {
u32 flags;
u32 rmr_count;
u32 rmr_offset;
};
struct acpi_iort_rmr_desc {
u64 base_address;
u64 length;
u32 reserved;
};
/*******************************************************************************
*
* IVRS - I/O Virtualization Reporting Structure
@ -276,6 +291,7 @@ struct acpi_ivrs_header {
enum acpi_ivrs_type {
ACPI_IVRS_TYPE_HARDWARE1 = 0x10,
ACPI_IVRS_TYPE_HARDWARE2 = 0x11,
ACPI_IVRS_TYPE_HARDWARE3 = 0x40,
ACPI_IVRS_TYPE_MEMORY1 = 0x20,
ACPI_IVRS_TYPE_MEMORY2 = 0x21,
ACPI_IVRS_TYPE_MEMORY3 = 0x22
@ -364,7 +380,11 @@ enum acpi_ivrs_device_entry_type {
ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses struct acpi_ivrs_device8a */
ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses struct acpi_ivrs_device8b */
ACPI_IVRS_TYPE_EXT_START = 71, /* Uses struct acpi_ivrs_device8b */
ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses struct acpi_ivrs_device8c */
ACPI_IVRS_TYPE_SPECIAL = 72, /* Uses struct acpi_ivrs_device8c */
/* Variable-length device entries */
ACPI_IVRS_TYPE_HID = 240 /* Uses ACPI_IVRS_DEVICE_HID */
};
/* Values for Data field above */
@ -416,6 +436,16 @@ struct acpi_ivrs_device8c {
#define ACPI_IVHD_IOAPIC 1
#define ACPI_IVHD_HPET 2
/* Type 240: variable-length device entry */
struct acpi_ivrs_device_hid {
struct acpi_ivrs_de_header header;
u64 acpi_hid;
u64 acpi_cid;
u8 uid_type;
u8 uid_length;
};
/* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
struct acpi_ivrs_memory {
@ -516,7 +546,8 @@ enum acpi_madt_type {
ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13,
ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14,
ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15,
ACPI_MADT_TYPE_RESERVED = 16 /* 16 and greater are reserved */
ACPI_MADT_TYPE_MULTIPROC_WAKEUP = 16,
ACPI_MADT_TYPE_RESERVED = 17 /* 17 and greater are reserved */
};
/*
@ -723,6 +754,15 @@ struct acpi_madt_generic_translator {
u32 reserved2;
};
/* 16: Multiprocessor wakeup (ACPI 6.4) */
struct acpi_madt_multiproc_wakeup {
struct acpi_subtable_header header;
u16 mailbox_version;
u32 reserved; /* reserved - must be zero */
u64 base_address;
};
/*
* Common flags fields for MADT subtables
*/
@ -983,12 +1023,14 @@ struct acpi_nfit_system_address {
u64 address;
u64 length;
u64 memory_mapping;
u64 location_cookie; /* ACPI 6.4 */
};
/* Flags */
#define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */
#define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */
#define ACPI_NFIT_LOCATION_COOKIE_VALID (1<<2) /* 02: SPA location cookie valid (ACPI 6.4) */
/* Range Type GUIDs appear in the include/acuuid.h file */
@ -1184,7 +1226,8 @@ enum acpi_pcct_type {
ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */
ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE = 3, /* ACPI 6.2 */
ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE = 4, /* ACPI 6.2 */
ACPI_PCCT_TYPE_RESERVED = 5 /* 5 and greater are reserved */
ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE = 5, /* ACPI 6.4 */
ACPI_PCCT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
};
/*
@ -1299,6 +1342,24 @@ struct acpi_pcct_ext_pcc_slave {
u64 error_status_mask;
};
/* 5: HW Registers based Communications Subspace */
struct acpi_pcct_hw_reg {
struct acpi_subtable_header header;
u16 version;
u64 base_address;
u64 length;
struct acpi_generic_address doorbell_register;
u64 doorbell_preserve;
u64 doorbell_write;
struct acpi_generic_address cmd_complete_register;
u64 cmd_complete_mask;
struct acpi_generic_address error_status_register;
u64 error_status_mask;
u32 nominal_latency;
u32 min_turnaround_time;
};
/* Values for doorbell flags above */
#define ACPI_PCCT_INTERRUPT_POLARITY (1)
@ -1355,6 +1416,66 @@ struct acpi_pdtt_channel {
#define ACPI_PDTT_WAIT_COMPLETION (1<<1)
#define ACPI_PDTT_TRIGGER_ORDER (1<<2)
/*******************************************************************************
*
* PHAT - Platform Health Assessment Table (ACPI 6.4)
* Version 1
*
******************************************************************************/
struct acpi_table_phat {
struct acpi_table_header header; /* Common ACPI table header */
};
/* Common header for PHAT subtables that follow main table */
struct acpi_phat_header {
u16 type;
u16 length;
u8 revision;
};
/* Values for Type field above */
#define ACPI_PHAT_TYPE_FW_VERSION_DATA 0
#define ACPI_PHAT_TYPE_FW_HEALTH_DATA 1
#define ACPI_PHAT_TYPE_RESERVED 2 /* 0x02-0xFFFF are reserved */
/*
* PHAT subtables, correspond to Type in struct acpi_phat_header
*/
/* 0: Firmware Version Data Record */
struct acpi_phat_version_data {
struct acpi_phat_header header;
u8 reserved[3];
u32 element_count;
};
struct acpi_phat_version_element {
u8 guid[16];
u64 version_value;
u32 producer_id;
};
/* 1: Firmware Health Data Record */
struct acpi_phat_health_data {
struct acpi_phat_header header;
u8 reserved[2];
u8 health;
u8 device_guid[16];
u32 device_specific_offset; /* Zero if no Device-specific data */
};
/* Values for Health field above */
#define ACPI_PHAT_ERRORS_FOUND 0
#define ACPI_PHAT_NO_ERRORS 1
#define ACPI_PHAT_UNKNOWN_ERRORS 2
#define ACPI_PHAT_ADVISORY 3
/*******************************************************************************
*
* PMTT - Platform Memory Topology Table (ACPI 5.0)
@ -1364,7 +1485,11 @@ struct acpi_pdtt_channel {
struct acpi_table_pmtt {
struct acpi_table_header header; /* Common ACPI table header */
u32 reserved;
u32 memory_device_count;
/*
* Immediately followed by:
* MEMORY_DEVICE memory_device_struct[memory_device_count];
*/
};
/* Common header for PMTT subtables that follow main table */
@ -1375,6 +1500,12 @@ struct acpi_pmtt_header {
u16 length;
u16 flags;
u16 reserved2;
u32 memory_device_count; /* Zero means no memory device structs follow */
/*
* Immediately followed by:
* u8 type_specific_data[]
* MEMORY_DEVICE memory_device_struct[memory_device_count];
*/
};
/* Values for Type field above */
@ -1382,7 +1513,8 @@ struct acpi_pmtt_header {
#define ACPI_PMTT_TYPE_SOCKET 0
#define ACPI_PMTT_TYPE_CONTROLLER 1
#define ACPI_PMTT_TYPE_DIMM 2
#define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */
#define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFE are reserved */
#define ACPI_PMTT_TYPE_VENDOR 0xFF
/* Values for Flags field above */
@ -1401,37 +1533,43 @@ struct acpi_pmtt_socket {
u16 socket_id;
u16 reserved;
};
/*
* Immediately followed by:
* MEMORY_DEVICE memory_device_struct[memory_device_count];
*/
/* 1: Memory Controller subtable */
struct acpi_pmtt_controller {
struct acpi_pmtt_header header;
u32 read_latency;
u32 write_latency;
u32 read_bandwidth;
u32 write_bandwidth;
u16 access_width;
u16 alignment;
u16 controller_id;
u16 reserved;
u16 domain_count;
};
/* 1a: Proximity Domain substructure */
struct acpi_pmtt_domain {
u32 proximity_domain;
};
/*
* Immediately followed by:
* MEMORY_DEVICE memory_device_struct[memory_device_count];
*/
/* 2: Physical Component Identifier (DIMM) */
struct acpi_pmtt_physical_component {
struct acpi_pmtt_header header;
u16 component_id;
u16 reserved;
u32 memory_size;
u32 bios_handle;
};
/* 0xFF: Vendor Specific Data */
struct acpi_pmtt_vendor_specific {
struct acpi_pmtt_header header;
u8 type_uuid[16];
u8 specific[];
/*
* Immediately followed by:
* u8 vendor_specific_data[];
* MEMORY_DEVICE memory_device_struct[memory_device_count];
*/
};
/*******************************************************************************
*
* PPTT - Processor Properties Topology Table (ACPI 6.2)
@ -1485,6 +1623,12 @@ struct acpi_pptt_cache {
u16 line_size;
};
/* 1: Cache Type Structure for PPTT version 3 */
struct acpi_pptt_cache_v1 {
u32 cache_id;
};
/* Flags */
#define ACPI_PPTT_SIZE_PROPERTY_VALID (1) /* Physical property valid */
@ -1494,6 +1638,7 @@ struct acpi_pptt_cache {
#define ACPI_PPTT_CACHE_TYPE_VALID (1<<4) /* Cache type valid */
#define ACPI_PPTT_WRITE_POLICY_VALID (1<<5) /* Write policy valid */
#define ACPI_PPTT_LINE_SIZE_VALID (1<<6) /* Line size valid */
#define ACPI_PPTT_CACHE_ID_VALID (1<<7) /* Cache ID valid */
/* Masks for Attributes */
@ -1679,6 +1824,7 @@ enum acpi_sdev_type {
/* Values for flags above */
#define ACPI_SDEV_HANDOFF_TO_UNSECURE_OS (1)
#define ACPI_SDEV_SECURE_COMPONENTS_PRESENT (1<<1)
/*
* SDEV subtables
@ -1694,6 +1840,46 @@ struct acpi_sdev_namespace {
u16 vendor_data_length;
};
struct acpi_sdev_secure_component {
u16 secure_component_offset;
u16 secure_component_length;
};
/*
* SDEV sub-subtables ("Components") for above
*/
struct acpi_sdev_component {
struct acpi_sdev_header header;
};
/* Values for sub-subtable type above */
enum acpi_sac_type {
ACPI_SDEV_TYPE_ID_COMPONENT = 0,
ACPI_SDEV_TYPE_MEM_COMPONENT = 1
};
struct acpi_sdev_id_component {
struct acpi_sdev_header header;
u16 hardware_id_offset;
u16 hardware_id_length;
u16 subsystem_id_offset;
u16 subsystem_id_length;
u16 hardware_revision;
u8 hardware_rev_present;
u8 class_code_present;
u8 pci_base_class;
u8 pci_sub_class;
u8 pci_programming_xface;
};
struct acpi_sdev_mem_component {
struct acpi_sdev_header header;
u32 reserved;
u64 memory_base_address;
u64 memory_length;
};
/* 1: PCIe Endpoint Device Based Device Structure */
struct acpi_sdev_pcie {

View File

@ -33,6 +33,7 @@
#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
#define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
#define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
#define ACPI_SIG_VIOT "VIOT" /* Virtual I/O Translation Table */
#define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
#define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
#define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
@ -285,7 +286,8 @@ struct acpi_srat_generic_affinity {
/* Flags for struct acpi_srat_generic_affinity */
#define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */
#define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */
#define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS (1<<1) /* ACPI 6.4 */
/*******************************************************************************
*
@ -483,6 +485,72 @@ struct acpi_table_uefi {
u16 data_offset; /* Offset of remaining data in table */
};
/*******************************************************************************
*
* VIOT - Virtual I/O Translation Table
* Version 1
*
******************************************************************************/
struct acpi_table_viot {
struct acpi_table_header header; /* Common ACPI table header */
u16 node_count;
u16 node_offset;
u8 reserved[8];
};
/* VIOT subtable header */
struct acpi_viot_header {
u8 type;
u8 reserved;
u16 length;
};
/* Values for Type field above */
enum acpi_viot_node_type {
ACPI_VIOT_NODE_PCI_RANGE = 0x01,
ACPI_VIOT_NODE_MMIO = 0x02,
ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI = 0x03,
ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO = 0x04,
ACPI_VIOT_RESERVED = 0x05
};
/* VIOT subtables */
struct acpi_viot_pci_range {
struct acpi_viot_header header;
u32 endpoint_start;
u16 segment_start;
u16 segment_end;
u16 bdf_start;
u16 bdf_end;
u16 output_node;
u8 reserved[6];
};
struct acpi_viot_mmio {
struct acpi_viot_header header;
u32 endpoint;
u64 base_address;
u16 output_node;
u8 reserved[6];
};
struct acpi_viot_virtio_iommu_pci {
struct acpi_viot_header header;
u16 segment;
u16 bdf;
u8 reserved[8];
};
struct acpi_viot_virtio_iommu_mmio {
struct acpi_viot_header header;
u8 reserved[4];
u64 base_address;
};
/*******************************************************************************
*
* WAET - Windows ACPI Emulated devices Table

View File

@ -68,5 +68,6 @@
#define UUID_DEVICE_GRAPHS "ab02a46b-74c7-45a2-bd68-f7d344ef2153"
#define UUID_HIERARCHICAL_DATA_EXTENSION "dbb8e3e6-5886-4ba6-8795-1319f52a966b"
#define UUID_CORESIGHT_GRAPH "3ecbc8b6-1d0e-4fb3-8107-e627f805c6cd"
#define UUID_USB4_CAPABILITIES "23a0d13a-26ab-486c-9c5f-0ffa525a575a"
#endif /* __ACUUID_H__ */

View File

@ -61,7 +61,7 @@ typedef __builtin_va_list va_list;
#endif
/*
* Explictly mark intentional explicit fallthrough to silence
* Explicitly mark intentional explicit fallthrough to silence
* -Wimplicit-fallthrough in GCC 7.1+.
*/

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/******************************************************************************
*
* Module Name: cfsize - Common get file size function
* Module Name: cmfsize - Common get file size function
*
* Copyright (C) 2000 - 2021, Intel Corp.
*