ACPICA release 20210331 (ACPI 6.4 support)
v2 cover ACPICA release 20210331 (ACPI 6.4 support)
This series contains the Linux-ized patches of ACPICA version 20210331. This release implements changes to implement the ACPI 6.4 specification as well as several new tables defined outside of the ACPI specification.
v2: fix build issue stemming modified NFIT structure
This patch set is also available here:
https://github.com/SchmErik/linux/tree/20210331
Alexander Monakov (1):
ACPICA: Add parsing for IVRS IVHD 40h and device entry F0h
Ben Widawsky (1):
ACPICA: CXL 2.0: CEDT: Add new CEDT table
Bob Moore (8):
ACPICA: ACPI 6.4: NFIT: add Location Cookie field
ACPICA: ACPI 6.4: HMAT: add new fields/flags
ACPICA: ACPI 6.4: Add new flags in SRAT
ACPICA: ACPI 6.4: PMTT: add new fields/structures
ACPICA: ACPI 6.4: add CSI2Bus resource template
ACPICA: iASL: Add support for CEDT table
ACPICA: iASL: Decode subtable type field for VIOT
ACPICA: Update version to 20210331
Colin Ian King (1):
ACPICA: Tree-wide: fix various typos and spelling mistakes
Erik Kaneda (8):
ACPICA: ACPI 6.4: Add new predefined objects _BPC, _BPS, and _BPT
ACPICA: ACPI 6.4: add USB4 capabilities UUID
ACPICA: ACPI 6.4: add CXL ACPI device ID and _CBR object
ACPICA: ACPI 6.4: MADT: add Multiprocessor Wakeup Structure
ACPICA: ACPI 6.4: PCCT: add support for subtable type 5
ACPICA: ACPI 6.4: PPTT: add new version of subtable type 1
ACPICA: ACPI 6.4: add SDEV secure access components
ACPICA: ACPI 6.4: add support for PHAT table
Jean-Philippe Brucker (2):
ACPICA: iASL: Add definitions for the VIOT table
ACPICA: acpisrc: Add missing conversion for VIOT support
Shameer Kolothum (1):
ACPICA: IORT: Updates for revision E.b
drivers/acpi/acpica/acpredef.h | 15 ++ drivers/acpi/acpica/acresrc.h | 4 + drivers/acpi/acpica/acutils.h | 1 + drivers/acpi/acpica/amlresrc.h | 19 ++- drivers/acpi/acpica/rscalc.c | 4 +- drivers/acpi/acpica/rsdump.c | 8 + drivers/acpi/acpica/rsdumpinfo.c | 26 ++++ drivers/acpi/acpica/rsinfo.c | 6 +- drivers/acpi/acpica/rslist.c | 9 +- drivers/acpi/acpica/rsmisc.c | 19 +++ drivers/acpi/acpica/rsserial.c | 75 ++++++++++ drivers/acpi/acpica/utresdecode.c | 10 +- drivers/acpi/acpica/utresrc.c | 1 + drivers/acpi/nfit/core.c | 2 +- include/acpi/acoutput.h | 2 +- include/acpi/acpixf.h | 2 +- include/acpi/acrestyp.h | 9 +- include/acpi/actbl1.h | 54 ++++++- include/acpi/actbl2.h | 240 ++++++++++++++++++++++++++---- include/acpi/actbl3.h | 70 ++++++++- include/acpi/acuuid.h | 1 + include/acpi/platform/acgcc.h | 2 +- tools/power/acpi/common/cmfsize.c | 2 +- 23 files changed, 537 insertions(+), 44 deletions(-)
Signature · 1 line
2.29.2
PATCH v2 1/22 ACPICA: Add parsing for IVRS IVHD 40h and device entry F0h
From: Alexander Monakov <[email protected]>
ACPICA commit eefb865355514048380d921de5efcf30027d6b02
IVHD type 40h uses the same field layout as type 11h, but adds support for a new device entry type F0h (ACPI HID device entry). The new device entry type has variable length: after fixed-length fields occupying 22 bytes, there's a field of length up to 255 (as given by the preceding field).
--- include/acpi/actbl2.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
include/acpi/actbl2.h +16 -1
@@ -276,6 +276,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 +365,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 +421,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 {
Signature · 1 line
2.29.2
PATCH v2 2/22 ACPICA: ACPI 6.4: Add new predefined objects _BPC, _BPS, and _BPT
In reply to Erik KanedaACPICA commit 3cfef24ae2d98babbbfbe4ba612a2f5d9014d3ba
The object definition for these can be found in the ACPI 6.4 specification.
--- drivers/acpi/acpica/acpredef.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/acpi/acpica/acpredef.h +11 -0
@@ -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)}},
Signature · 1 line
2.29.2
PATCH v2 3/22 ACPICA: ACPI 6.4: add USB4 capabilities UUID
In reply to Erik KanedaACPICA commit 619e6df02edbebe95b2765cdd5159f02607e45fc
This change allows iASL to a list of know UUID's. iASL uses this list to point out any UUID's that are not publically known.
--- include/acpi/acuuid.h | 1 + 1 file changed, 1 insertion(+)
include/acpi/acuuid.h +1 -0
@@ -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__ */
Signature · 1 line
2.29.2
PATCH v2 4/22 ACPICA: ACPI 6.4: add CXL ACPI device ID and _CBR object
In reply to Erik KanedaACPICA commit 7f634ac53fe1e480c01ceff7532cd8dc6430f1b9
The ACPI device ID represents the CXL host bridge. _CBR objects gets the memory location of CXL Host Bridge Registers.
--- drivers/acpi/acpica/acpredef.h | 4 ++++ 1 file changed, 4 insertions(+)
drivers/acpi/acpica/acpredef.h +4 -0
@@ -358,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 */
Signature · 1 line
2.29.2
PATCH v2 5/22 ACPICA: ACPI 6.4: MADT: add Multiprocessor Wakeup Structure
In reply to Erik KanedaACPICA commit b9eb6f3a19b816824d6f47a6bc86fd8ce690e04b
--- include/acpi/actbl2.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
include/acpi/actbl2.h +11 -1
@@ -531,7 +531,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 */ };/*
@@ -738,6 +739,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 */
Signature · 1 line
2.29.2
PATCH v2 6/22 ACPICA: ACPI 6.4: PCCT: add support for subtable type 5
In reply to Erik KanedaACPICA commit 208d7e27ebc473feb4182cc8e58f3789c4efaca6
--- include/acpi/actbl2.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
include/acpi/actbl2.h +20 -1
@@ -1209,7 +1209,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 */ };/*
@@ -1324,6 +1325,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)
Signature · 1 line
2.29.2
PATCH v2 7/22 ACPICA: ACPI 6.4: PPTT: add new version of subtable type 1
In reply to Erik KanedaThis commit squashes the following:
ACPICA commit 475c5e89f8f701ccdfee6ca567e33c854ecd6c9e ACPICA commit 82cf78ac175a4b7d8842c5b786be24031c817cfd
This new subtable is only valid for PPTT version 3.
Elyes fixed a misspelled identifier in this commit.
--- include/acpi/actbl2.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/acpi/actbl2.h +7 -0
@@ -1529,6 +1529,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 */
@@ -1538,6 +1544,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 */
Signature · 1 line
2.29.2
PATCH v2 8/22 ACPICA: Tree-wide: fix various typos and spelling mistakes
In reply to Erik KanedaFrom: Colin Ian King <[email protected]>
This commit squashes the following:
ACPICA commit bc8939e2d902653e71bb1601b129a993c37fcfad ACPICA commit 2d9e5e98e23f2a569e5691e6bed183146e25798d ACPICA commit 937358156631ea7a0eef3569c213c82a031097d5
Fix more spelling issues found using the codespell checker and found without tools.
--- include/acpi/acoutput.h | 2 +- include/acpi/platform/acgcc.h | 2 +- tools/power/acpi/common/cmfsize.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
include/acpi/acoutput.h +1 -1
@@ -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 */
include/acpi/platform/acgcc.h +1 -1
@@ -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+. */
tools/power/acpi/common/cmfsize.c +1 -1
@@ -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. *
Signature · 1 line
2.29.2
PATCH v2 9/22 ACPICA: ACPI 6.4: NFIT: add Location Cookie field
In reply to Erik KanedaFrom: Bob Moore <[email protected]>
Also, update struct size to reflect these changes in nfit core driver.
ACPICA commit af60199a9a1de9e6844929fd4cc22334522ed195
--- drivers/acpi/nfit/core.c | 2 +- include/acpi/actbl2.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/acpi/nfit/core.c +1 -1
@@ -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 );
include/acpi/actbl2.h +2 -0
@@ -1008,12 +1008,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 */
Signature · 1 line
2.29.2
PATCH v2 10/22 ACPICA: ACPI 6.4: HMAT: add new fields/flags
In reply to Erik KanedaFrom: Bob Moore <[email protected]>
ACPICA commit 18a77ca6fc3edd26a24d8f32ae5c0ea66d84ccff
--- include/acpi/actbl1.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
include/acpi/actbl1.h +7 -3
@@ -1445,7 +1445,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 +1455,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 */
Signature · 1 line
2.29.2
PATCH v2 11/22 ACPICA: ACPI 6.4: Add new flags in SRAT
In reply to Erik KanedaFrom: Bob Moore <[email protected]>
ACPICA commit 44633fa72f1e4ede718733aec16e7fb7572042f8
--- include/acpi/actbl3.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/acpi/actbl3.h +2 -1
@@ -285,7 +285,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 */ /******************************************************************************* *
Signature · 1 line
2.29.2
PATCH v2 12/22 ACPICA: ACPI 6.4: add SDEV secure access components
In reply to Erik KanedaACPICA commit 44ca5f4f9be24bf64524cdb1de46322509319056
This entails adding an optional subtable indicating secure access components as well as two different types of secure access components (ID-based or Memory). For definitons and uses, consult the ACPI specification.
--- include/acpi/actbl2.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+)
include/acpi/actbl2.h +41 -0
@@ -1732,6 +1732,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
@@ -1747,6 +1748,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 {
Signature · 1 line
2.29.2
PATCH v2 13/22 ACPICA: iASL: Add definitions for the VIOT table
In reply to Erik KanedaFrom: Jean-Philippe Brucker <[email protected]>
ACPICA commit fc4e33319c1ee08f20f5c44853dd8426643f6dfd
Add definitions for the VIOT table and its subtables.
--- include/acpi/actbl3.h | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+)
include/acpi/actbl3.h +66 -0
@@ -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 */
@@ -484,6 +485,71 @@ 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 , +}; + +/* VIOT subtables */ + +struct acpi_viot_pci_range { +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 { +ACPI_VIOT_HEADER header; +u32 endpoint; +u64 base_address; +u16 output_node; +u8 reserved[6 ]; +}; + +struct acpi_viot_virtio_iommu_pci { +ACPI_VIOT_HEADER header; +u16 segment; +u16 bdf; +u8 reserved[8 ]; +}; + +struct acpi_viot_virtio_iommu_mmio { +ACPI_VIOT_HEADER header; +u8 reserved[4 ]; +u64 base_address; +}; +/******************************************************************************* * * WAET - Windows ACPI Emulated devices Table
Signature · 1 line
2.29.2
PATCH v2 14/22 ACPICA: CXL 2.0: CEDT: Add new CEDT table
In reply to Erik KanedaFrom: Ben Widawsky <[email protected]>
ACPICA commit 0b03aa8ebd7a5b2b9407893f123ee587af45926f
This sets up all of the boilerplate without actually doing anything.
--- include/acpi/actbl1.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
include/acpi/actbl1.h +43 -0
@@ -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,48 @@ 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 , +}; + +/* +* CEDT subtables +*/ + +/* 0: CXL Host Bridge Structure */ + +struct acpi_cedt_chbs { +ACPI_CEDT_HEADER header; +u32 uid; +u32 cxl_version; +u32 reserved; +u64 base; +u64 length; +}; +/******************************************************************************* * * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
Signature · 1 line
2.29.2
PATCH v2 15/22 ACPICA: ACPI 6.4: PMTT: add new fields/structures
In reply to Erik KanedaFrom: Bob Moore <[email protected]>
ACPICA commit 036290735ad8020f762c4d94bcbc0e84b2e307b6
--- include/acpi/actbl2.h | 53 ++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 18 deletions(-)
include/acpi/actbl2.h +35 -18
@@ -1410,7 +1410,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 */
@@ -1421,6 +1425,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 */
@@ -1428,7 +1438,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 */
@@ -1447,37 +1458,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)
Signature · 1 line
2.29.2
PATCH v2 16/22 ACPICA: ACPI 6.4: add CSI2Bus resource template
In reply to Erik KanedaFrom: Bob Moore <[email protected]>
This commit the result of squashing the following:
ACPICA commit 21a316fdaa46b3fb245a1920f3829cb05d6ced6e ACPICA commit f5506fc7dad08c2a25ef52cf836c2d67385a612c
--- drivers/acpi/acpica/acresrc.h | 4 ++ drivers/acpi/acpica/acutils.h | 1 + drivers/acpi/acpica/amlresrc.h | 19 +++++++- drivers/acpi/acpica/rscalc.c | 4 +- drivers/acpi/acpica/rsdump.c | 8 ++++ drivers/acpi/acpica/rsdumpinfo.c | 26 +++++++++++ drivers/acpi/acpica/rsinfo.c | 6 ++- drivers/acpi/acpica/rslist.c | 9 +++- drivers/acpi/acpica/rsmisc.c | 19 ++++++++ drivers/acpi/acpica/rsserial.c | 75 +++++++++++++++++++++++++++++++ drivers/acpi/acpica/utresdecode.c | 10 ++++- drivers/acpi/acpica/utresrc.c | 1 + include/acpi/acrestyp.h | 9 +++- 13 files changed, 183 insertions(+), 8 deletions(-)
drivers/acpi/acpica/acresrc.h +4 -0
@@ -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[];
drivers/acpi/acpica/acutils.h +1 -0
@@ -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[];
drivers/acpi/acpica/amlresrc.h +18 -1
@@ -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;
drivers/acpi/acpica/rscalc.c +2 -2
@@ -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
drivers/acpi/acpica/rsdump.c +8 -0
@@ -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
drivers/acpi/acpica/rsdumpinfo.c +26 -0
@@ -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 },
drivers/acpi/acpica/rsinfo.c +5 -1
@@ -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), };
drivers/acpi/acpica/rslist.c +7 -2
@@ -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
drivers/acpi/acpica/rsmisc.c +19 -0
@@ -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);
drivers/acpi/acpica/rsserial.c +75 -0
81 lines not on this page · raw message
drivers/acpi/acpica/utresdecode.c +9 -1
@@ -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 */
drivers/acpi/acpica/utresrc.c +1 -0
@@ -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), };/*
include/acpi/acrestyp.h +8 -1
@@ -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;
Signature · 1 line
2.29.2
PATCH v2 17/22 ACPICA: ACPI 6.4: add support for PHAT table
In reply to Erik KanedaACPICA commit de805b6a355c01f3aff4044a4ba60e9845b7668c
This table displays health information about the platform firmware. For full definition, see the ACPI specification.
--- include/acpi/actbl2.h | 61 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+)
include/acpi/actbl2.h +61 -0
@@ -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 */
@@ -1401,6 +1402,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)
Signature · 1 line
2.29.2
PATCH v2 18/22 ACPICA: iASL: Add support for CEDT table
In reply to Erik KanedaFrom: Bob Moore <[email protected]>
Also, update the CEDT template.
ACPICA commit 1e6dded267b13c4aa0c3e16de0fa89d3b9c880e9
--- include/acpi/actbl1.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/acpi/actbl1.h +2 -1
@@ -327,6 +327,7 @@ struct acpi_cedt_header {enum acpi_cedt_type {ACPI_CEDT_TYPE_CHBS =0 , +ACPI_CEDT_TYPE_RESERVED =1 };/*
@@ -336,7 +337,7 @@ enum acpi_cedt_type {/* 0: CXL Host Bridge Structure */ struct acpi_cedt_chbs { -ACPI_CEDT_HEADER header; +struct acpi_cedt_header header;u32 uid;u32 cxl_version;u32 reserved;
Signature · 1 line
2.29.2
PATCH v2 19/22 ACPICA: iASL: Decode subtable type field for VIOT
In reply to Erik KanedaFrom: Bob Moore <[email protected]>
For the table disassembler, decode the subtable type field to a descriptive string.
ACPICA commit 2197e354fb5dcafaddd2016ffeb0620e5bc3d5e2
--- include/acpi/actbl3.h | 1 + 1 file changed, 1 insertion(+)
include/acpi/actbl3.h +1 -0
@@ -514,6 +514,7 @@ enum acpi_viot_node_type {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 */
Signature · 1 line
2.29.2
PATCH v2 20/22 ACPICA: acpisrc: Add missing conversion for VIOT support
In reply to Erik KanedaFrom: Jean-Philippe Brucker <[email protected]>
ACPICA commit 856a96fdf4b51b2b8da17529df0255e6f51f1b5b
struct acpi_viot_header is missing from identifier table, causing linuxize failures.
--- include/acpi/actbl3.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
include/acpi/actbl3.h +4 -4
@@ -520,7 +520,7 @@ enum acpi_viot_node_type {/* VIOT subtables */ struct acpi_viot_pci_range { -ACPI_VIOT_HEADER header; +struct acpi_viot_header header;u32 endpoint_start;u16 segment_start;u16 segment_end;
@@ -531,7 +531,7 @@ struct acpi_viot_pci_range { };struct acpi_viot_mmio { -ACPI_VIOT_HEADER header; +struct acpi_viot_header header;u32 endpoint;u64 base_address;u16 output_node;
@@ -539,14 +539,14 @@ struct acpi_viot_mmio { };struct acpi_viot_virtio_iommu_pci { -ACPI_VIOT_HEADER header; +struct acpi_viot_header header;u16 segment;u16 bdf;u8 reserved[8 ]; };struct acpi_viot_virtio_iommu_mmio { -ACPI_VIOT_HEADER header; +struct acpi_viot_header header;u8 reserved[4 ];u64 base_address; };
Signature · 1 line
2.29.2
PATCH v2 21/22 ACPICA: IORT: Updates for revision E.b
In reply to Erik KanedaFrom: Shameer Kolothum <[email protected]>
ACPICA commit 8710a708faed728ea2672b8da842b2e9af1cf5bd
IORT revision E.b (ARM DEN 0049E.b) contains a few additions like,
-Added an identifier field in the node descriptors to aid table
cross-referencing.
-Introduced the Reserved Memory Range(RMR) node. This is used
to describe memory ranges that are used by endpoints and require a unity mapping in SMMU.
-Introduced a flag in the RC node to express support for PRI. -Added a flag in the RC node to declare support for PASID forward
information.
Please note that IORT Rev E and E.a have known issues and are not supported.
--- include/acpi/actbl2.h | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-)
include/acpi/actbl2.h +20 -6
@@ -68,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 * ******************************************************************************/
@@ -86,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 ];
@@ -100,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 {
@@ -167,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 */
@@ -241,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
Signature · 1 line
2.29.2
PATCH v2 22/22 ACPICA: Update version to 20210331
In reply to Erik KanedaFrom: Bob Moore <[email protected]>
ACPICA commit eb423b7d5440472d0d2115cb81b52b1b7c56d95a
--- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/acpixf.h +1 -1
@@ -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>
Signature · 1 line
2.29.2
Rafael J. Wysocki
maintainerQuoted 41 lines · Erik Kaneda
This series contains the Linux-ized patches of ACPICA version 20210331. This release implements changes to implement the ACPI 6.4 specification as well as several new tables defined outside of the ACPI specification.
v2: fix build issue stemming modified NFIT structure
This patch set is also available here:
https://github.com/SchmErik/linux/tree/20210331
Alexander Monakov (1):
ACPICA: Add parsing for IVRS IVHD 40h and device entry F0hBen Widawsky (1):
ACPICA: CXL 2.0: CEDT: Add new CEDT tableBob Moore (8):
ACPICA: ACPI 6.4: NFIT: add Location Cookie field
ACPICA: ACPI 6.4: HMAT: add new fields/flags
ACPICA: ACPI 6.4: Add new flags in SRAT
ACPICA: ACPI 6.4: PMTT: add new fields/structures
ACPICA: ACPI 6.4: add CSI2Bus resource template
ACPICA: iASL: Add support for CEDT table
ACPICA: iASL: Decode subtable type field for VIOT
ACPICA: Update version to 20210331Colin Ian King (1):
ACPICA: Tree-wide: fix various typos and spelling mistakesErik Kaneda (8):
ACPICA: ACPI 6.4: Add new predefined objects_BPC,_BPS, and_BPT
ACPICA: ACPI 6.4: add USB4 capabilities UUID
ACPICA: ACPI 6.4: add CXL ACPI device ID and_CBRobject
ACPICA: ACPI 6.4: MADT: add Multiprocessor Wakeup Structure
ACPICA: ACPI 6.4: PCCT: add support for subtable type 5
ACPICA: ACPI 6.4: PPTT: add new version of subtable type 1
ACPICA: ACPI 6.4: add SDEV secure access components
ACPICA: ACPI 6.4: add support for PHAT table
Quoted 6 lines
Jean-Philippe Brucker (2):
ACPICA: iASL: Add definitions for the VIOT table
ACPICA: acpisrc: Add missing conversion for VIOT supportShameer Kolothum (1):
ACPICA: IORT: Updates for revision E.b
All applied as 5.13 material, thank you!