All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Bob Moore <robert.moore@intel.com>
Subject: [PATCH 07/32] ACPICA: Add support for Arm's MPAM ACPI table version 2
Date: Wed, 05 Apr 2023 15:37:35 +0200	[thread overview]
Message-ID: <7533327.EvYhyI6sBW@kreacher> (raw)
In-Reply-To: <4845957.31r3eYUQgx@kreacher>

From: Hesham Almatary <hesham.almatary@huawei.com>

ACPICA commit 005e24bcaa6e4c7db327b4f81fb63b2715aac7e6

Complies with ACPI for Memory System Resource Partitioning and
Monitoring 2.0 [1]. Document number: DEN0065, as of December 2022.

Support for all types of MPAM resources. No support yet for:
1) MPAM PCC Interface Type
2) The optional Resource-specific data per MSC node, introduced in v2 of the
MPAM ACPI spec.

[1] https://developer.arm.com/documentation/den0065/latest

Link: https://github.com/acpica/acpica/commit/005e24bc
Signed-off-by: Hesham Almatary <hesham.almatary@huawei.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 include/acpi/actbl2.h | 116 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 116 insertions(+)

diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 65f9e834e921..b082175906ba 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -35,6 +35,7 @@
 #define ACPI_SIG_MADT           "APIC"	/* Multiple APIC Description Table */
 #define ACPI_SIG_MCFG           "MCFG"	/* PCI Memory Mapped Configuration table */
 #define ACPI_SIG_MCHI           "MCHI"	/* Management Controller Host Interface table */
+#define ACPI_SIG_MPAM           "MPAM"	/* Memory System Resource Partitioning and Monitoring Table */
 #define ACPI_SIG_MPST           "MPST"	/* Memory Power State Table */
 #define ACPI_SIG_MSDM           "MSDM"	/* Microsoft Data Management Table */
 #define ACPI_SIG_NFIT           "NFIT"	/* NVDIMM Firmware Interface Table */
@@ -1332,6 +1333,121 @@ struct acpi_table_mchi {
 	u8 pci_function;
 };
 
+/*******************************************************************************
+ *
+ * MPAM - Memory System Resource Partitioning and Monitoring
+ *
+ * Conforms to "ACPI for Memory System Resource Partitioning and Monitoring 2.0"
+ * Document number: ARM DEN 0065, December, 2022.
+ *
+ ******************************************************************************/
+
+/* MPAM RIS locator types. Table 11, Location types */
+enum acpi_mpam_locator_type {
+	ACPI_MPAM_LOCATION_TYPE_PROCESSOR_CACHE = 0,
+	ACPI_MPAM_LOCATION_TYPE_MEMORY = 1,
+	ACPI_MPAM_LOCATION_TYPE_SMMU = 2,
+	ACPI_MPAM_LOCATION_TYPE_MEMORY_CACHE = 3,
+	ACPI_MPAM_LOCATION_TYPE_ACPI_DEVICE = 4,
+	ACPI_MPAM_LOCATION_TYPE_INTERCONNECT = 5,
+	ACPI_MPAM_LOCATION_TYPE_UNKNOWN = 0xFF
+};
+
+/* MPAM Functional dependency descriptor. Table 10 */
+struct acpi_mpam_func_deps {
+	u32 producer;
+	u32 reserved;
+};
+
+/* MPAM Processor cache locator descriptor. Table 13 */
+struct acpi_mpam_resource_cache_locator {
+	u64 cache_reference;
+	u32 reserved;
+};
+
+/* MPAM Memory locator descriptor. Table 14 */
+struct acpi_mpam_resource_memory_locator {
+	u64 proximity_domain;
+	u32 reserved;
+};
+
+/* MPAM SMMU locator descriptor. Table 15 */
+struct acpi_mpam_resource_smmu_locator {
+	u64 smmu_interface;
+	u32 reserved;
+};
+
+/* MPAM Memory-side cache locator descriptor. Table 16 */
+struct acpi_mpam_resource_memcache_locator {
+	u8 reserved[7];
+	u8 level;
+	u32 reference;
+};
+
+/* MPAM ACPI device locator descriptor. Table 17 */
+struct acpi_mpam_resource_acpi_locator {
+	u64 acpi_hw_id;
+	u32 acpi_unique_id;
+};
+
+/* MPAM Interconnect locator descriptor. Table 18 */
+struct acpi_mpam_resource_interconnect_locator {
+	u64 inter_connect_desc_tbl_off;
+	u32 reserved;
+};
+
+/* MPAM Locator structure. Table 12 */
+struct acpi_mpam_resource_generic_locator {
+	u64 descriptor1;
+	u32 descriptor2;
+};
+
+union acpi_mpam_resource_locator {
+	struct acpi_mpam_resource_cache_locator cache_locator;
+	struct acpi_mpam_resource_memory_locator memory_locator;
+	struct acpi_mpam_resource_smmu_locator smmu_locator;
+	struct acpi_mpam_resource_memcache_locator mem_cache_locator;
+	struct acpi_mpam_resource_acpi_locator acpi_locator;
+	struct acpi_mpam_resource_interconnect_locator interconnect_ifc_locator;
+	struct acpi_mpam_resource_generic_locator generic_locator;
+};
+
+/* Memory System Component Resource Node Structure Table 9 */
+struct acpi_mpam_resource_node {
+	u32 identifier;
+	u8 ris_index;
+	u16 reserved1;
+	u8 locator_type;
+	union acpi_mpam_resource_locator locator;
+	u32 num_functional_deps;
+};
+
+/* Memory System Component (MSC) Node Structure. Table 4 */
+struct acpi_mpam_msc_node {
+	u16 length;
+	u8 interface_type;
+	u8 reserved;
+	u32 identifier;
+	u64 base_address;
+	u32 mmio_size;
+	u32 overflow_interrupt;
+	u32 overflow_interrupt_flags;
+	u32 reserved1;
+	u32 overflow_interrupt_affinity;
+	u32 error_interrupt;
+	u32 error_interrupt_flags;
+	u32 reserved2;
+	u32 error_interrupt_affinity;
+	u32 max_nrdy_usec;
+	u64 hardware_id_linked_device;
+	u32 instance_id_linked_device;
+	u32 num_resouce_nodes;
+};
+
+struct acpi_table_mpam {
+	struct acpi_table_header header;	/* Common ACPI table header */
+};
+
 /*******************************************************************************
  *
  * MPST - Memory Power State Table (ACPI 5.0)
-- 
2.35.3





  parent reply	other threads:[~2023-04-05 14:04 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05 13:29 [PATCH 00/32] ACPICA: ACPICA 20230331 Rafael J. Wysocki
2023-04-05 13:32 ` [PATCH 01/32] ACPICA: Headers: Delete bogus node_array array of pointers from AEST table Rafael J. Wysocki
2023-04-05 13:33 ` [PATCH 02/32] ACPICA: ACPI 6.5: MADT: add support for trace buffer extension in GICC Rafael J. Wysocki
2023-04-05 13:34 ` [PATCH 03/32] ACPICA: Add missing macro ACPI_FUNCTION_TRACE() for acpi_ns_repair_HID() Rafael J. Wysocki
2023-04-05 13:35 ` [PATCH 04/32] ACPICA: acpisrc: Add missing tables to astable Rafael J. Wysocki
2023-04-05 13:36 ` [PATCH 05/32] ACPICA: Add support for 64 bit loong_arch compilation Rafael J. Wysocki
2023-04-05 13:36 ` [PATCH 06/32] ACPICA: Add support for ASPT table in disassembler Rafael J. Wysocki
2023-04-05 13:37 ` Rafael J. Wysocki [this message]
2023-04-05 13:38 ` [PATCH 08/32] ACPICA: Update all copyrights/signons to 2023 Rafael J. Wysocki
2023-04-05 13:39 ` [PATCH 09/32] ACPICA: add support for ClockInput resource (v6.5) Rafael J. Wysocki
2023-04-05 13:40 ` [PATCH 10/32] ACPICA: MADT: Add RISC-V INTC interrupt controller Rafael J. Wysocki
2023-04-05 13:40 ` [PATCH 11/32] ACPICA: Add structure definitions for RISC-V RHCT Rafael J. Wysocki
2023-04-05 13:41 ` [PATCH 12/32] ACPICA: Avoid undefined behavior: load of misaligned address Rafael J. Wysocki
2023-04-05 13:42 ` [PATCH 13/32] ACPICA: Avoid undefined behavior: applying zero offset to null pointer Rafael J. Wysocki
2023-04-05 13:43 ` [PATCH 14/32] ACPICA: Avoid undefined behavior: member access within " Rafael J. Wysocki
2023-04-05 13:44 ` [PATCH 15/32] ACPICA: Avoid undefined behavior: member access within misaligned address Rafael J. Wysocki
2023-04-05 13:44 ` [PATCH 16/32] " Rafael J. Wysocki
2023-04-05 13:45 ` [PATCH 17/32] " Rafael J. Wysocki
2023-04-05 13:46 ` [PATCH 18/32] " Rafael J. Wysocki
2023-04-05 13:47 ` [PATCH 19/32] ACPICA: Avoid undefined behavior: load of " Rafael J. Wysocki
2023-04-05 13:48 ` [PATCH 20/32] ACPICA: struct acpi_resource_vendor: Replace 1-element array with flexible array Rafael J. Wysocki
2023-04-05 13:48 ` [PATCH 21/32] ACPICA: actbl1: Replace 1-element arrays with flexible arrays Rafael J. Wysocki
2023-04-05 13:50 ` [PATCH 22/32] ACPICA: actbl2: " Rafael J. Wysocki
2023-04-05 23:11   ` Dan Williams
2023-04-06  0:22     ` Dan Williams
2023-04-06  0:37       ` Kees Cook
2023-04-06  0:43         ` Dan Williams
2023-04-06  0:36   ` Dan Williams
2023-04-06 18:32     ` Rafael J. Wysocki
2023-04-05 13:51 ` [PATCH 23/32] ACPICA: struct acpi_nfit_interleave: Replace 1-element array with flexible array Rafael J. Wysocki
2023-04-06  0:36   ` Dan Williams
2023-04-05 13:52 ` [PATCH 24/32] ACPICA: Introduce ACPI_FLEX_ARRAY Rafael J. Wysocki
2023-04-05 13:53 ` [PATCH 25/32] ACPICA: struct acpi_resource_dma: Replace 1-element array with flexible array Rafael J. Wysocki
2023-04-05 13:54 ` [PATCH 26/32] ACPICA: acpi_pci_routing_table: Replace fixed-size array with flex array member Rafael J. Wysocki
2023-04-05 13:55 ` [PATCH 27/32] ACPICA: acpi_dmar_andd: Replace 1-element array with flexible array Rafael J. Wysocki
2023-04-05 13:56 ` [PATCH 28/32] ACPICA: acpi_madt_oem_data: Fix flexible array member definition Rafael J. Wysocki
2023-04-05 13:56 ` [PATCH 29/32] ACPICA: acpi_resource_irq: Replace 1-element arrays with flexible array Rafael J. Wysocki
2023-04-05 13:57 ` [PATCH 30/32] ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects Rafael J. Wysocki
2023-04-05 13:59 ` [PATCH 31/32] ACPICA: add os specific support for Zephyr RTOS Rafael J. Wysocki
2023-04-05 13:59 ` [PATCH 32/32] ACPICA: Update version to 20230331 Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7533327.EvYhyI6sBW@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robert.moore@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.