
hulk inclusion category: feature bugzilla: 28055 CVE: NA ------------------------------ Add structures for the ACPI MPAM table. Code was partially borrowed from James's: http://www.linux-arm.org/git?p=linux-jm.git;a=commit;h=b307d07f49d11a b6841153315309a67e3163cac7, "ACPI 6.x: Add definitions for MPAM table [dead]". Different with James's, we add several fields in acpi_mpam_header structure according to MPAM ACPI Description 1.0. Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com> Reviewed-By: Xie XiuQi <xiexiuqi@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- include/acpi/actbl2.h | 58 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 26d65f7fb043..20fa5e60e328 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -32,6 +32,7 @@ #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */ +#define ACPI_SIG_MPAM "MPAM" /* Memory Partitioning and Monitoring Table */ #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */ #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */ @@ -905,6 +906,63 @@ struct acpi_msct_proximity { u64 memory_capacity; /* In bytes */ }; +/* + * MPAM - Memory Partitioning and Monitoring table + * + * Conforms to "MPAM ACPI Description 1.0", + * Null 0, 2017. Copyright 2017 ARM Limited or its affiliates. + * + ******************************************************************************/ +struct acpi_table_mpam { + struct acpi_table_header header;/* Common ACPI table header */ +}; + +/* Subtable header for MPAM */ + +struct acpi_mpam_header { + u8 type; + u16 length; + u8 reserved; + u64 base_address; + u32 overflow_interrupt; + u32 overflow_flags; + u32 error_interrupt; + u32 error_interrupt_flags; + u32 not_ready_max; + u32 offset; +}; + +/* Values for subtable type in ACPI_MPAM_NODE_HEADER */ + +enum AcpiMpamType { + ACPI_MPAM_TYPE_SMMU = 0, + ACPI_MPAM_TYPE_CACHE = 1, + ACPI_MPAM_TYPE_MEMORY = 2, + ACPI_MPAM_TYPE_UNKNOWN = 3 +}; + +/* Flags */ +#define ACPI_MPAM_IRQ_FLAGS (1) /* Interrupt mode */ + +/* + * MPAM Subtables + */ +struct acpi_mpam_node_smmu { + struct acpi_mpam_header header; + u32 IORT_ref; +}; + +struct acpi_mpam_node_cache { + struct acpi_mpam_header header; + u32 PPTT_ref; +}; + +struct acpi_mpam_node_memory { + struct acpi_mpam_header header; + u8 proximity_domain; + u8 reserved1[3]; +}; + /******************************************************************************* * * MSDM - Microsoft Data Management table -- 2.20.1