From: Tony Luck <tony.luck@intel.com>
To: Robert Moore <robert.moore@intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
David Hildenbrand <david@redhat.com>,
Oscar Salvador <osalvador@suse.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Danilo Krummrich <dakr@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Fenghua Yu <fenghua.yu@intel.com>,
Tony Luck <tony.luck@intel.com>
Subject: [PATCH 1/4] ACPICA: Define MRRM ACPI table
Date: Mon, 10 Feb 2025 13:12:20 -0800 [thread overview]
Message-ID: <20250210211223.6139-2-tony.luck@intel.com> (raw)
In-Reply-To: <20250210211223.6139-1-tony.luck@intel.com>
From: Fenghua Yu <fenghua.yu@intel.com>
The MRRM table describes association between physical address ranges
and "region numbers". This is used by:
1) The /sys/fs/resctrl filesystem to report memory traffic per-RMID for
each region.
2) Perf subsystem to report memory related uncore events per region.
Structure defined in the Intel Resource Director Technology (RDT)
Architecture specification downloadable from www.intel.com/sdm
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
include/acpi/actbl3.h | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h
index 5cd755143b7d..1b9a03ff73ba 100644
--- a/include/acpi/actbl3.h
+++ b/include/acpi/actbl3.h
@@ -42,6 +42,7 @@
#define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Mitigations Table */
#define ACPI_SIG_XENV "XENV" /* Xen Environment table */
#define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */
+#define ACPI_SIG_MRRM "MRRM" /* Memory Range and Region Mapping table */
/*
* All tables must be byte-packed to match the ACPI specification, since
@@ -793,6 +794,45 @@ struct acpi_table_xenv {
u8 event_flags;
};
+/*******************************************************************************
+ *
+ * MRRM - Memory Range and Region Mapping (MRRM) table
+ *
+ ******************************************************************************/
+
+struct acpi_table_mrrm {
+ struct acpi_table_header header;
+ u8 max_mem_region; /* Max Memory Regions supported */
+ u8 flags; /* Region assignment type */
+ u8 reserved[26];
+ /* Memory range entry array */
+};
+#define ACPI_MRRM_FLAGS_REGION_ASSIGNMENT_OS (1<<0)
+
+/*******************************************************************************
+ *
+ * Memory Range entry - Memory Range entry in MRRM table
+ *
+ ******************************************************************************/
+
+struct acpi_table_mrrm_mem_range_entry {
+ u16 type; /* Type 0="MRRM" */
+ u16 length; /* 32B + sizeof(Region-ID Programming Reg[]) */
+ u32 reserved; /* Reserved */
+ u32 base_addr_low; /* Low 32 bits of base addr of the mem range */
+ u32 base_addr_high; /* High 32 bits of base addr of the mem range */
+ u32 len_low; /* Low 32 bits of length of the mem range */
+ u32 len_high; /* High 32 bits of length of the mem range */
+ u16 region_id_flags; /* Valid local or remote Region-ID */
+ u8 local_region_id; /* Platform-assigned static local Region-ID */
+ u8 remote_region_id; /* Platform-assigned static remote Region-ID */
+ u32 reserved1; /* Reserved */
+ /* Region-ID Programming Registers[] */
+};
+
+#define ACPI_MRRM_VALID_REGION_ID_FLAGS_LOCAL (1<<0)
+#define ACPI_MRRM_VALID_REGION_ID_FLAGS_REMOTE (1<<1)
+
/* Reset to default packing */
#pragma pack()
--
2.48.1
next prev parent reply other threads:[~2025-02-10 21:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 21:12 [PATCH 0/4] Add interfaces for ACPI MRRM table Tony Luck
2025-02-10 21:12 ` Tony Luck [this message]
2025-02-11 12:16 ` [PATCH 1/4] ACPICA: Define MRRM ACPI table Rafael J. Wysocki
2025-02-10 21:12 ` [PATCH 2/4] ACPI/MRRM: Create /sys/devices/system/memory/rangeX ABI Tony Luck
2025-02-11 0:21 ` Luck, Tony
2025-02-11 13:08 ` David Hildenbrand
2025-02-10 21:12 ` [PATCH 3/4] ACPI/MRRM: Add "node" symlink to /sys/devices/system/memory/rangeX Tony Luck
2025-02-11 6:51 ` Greg Kroah-Hartman
2025-02-11 13:27 ` David Hildenbrand
2025-02-11 18:05 ` Luck, Tony
2025-02-13 13:30 ` David Hildenbrand
2025-02-13 19:05 ` Luck, Tony
2025-02-11 17:02 ` Luck, Tony
2025-02-12 7:48 ` Greg Kroah-Hartman
2025-02-10 21:12 ` [PATCH 4/4] ACPI/MRRM: ABI documentation for /sys/devices/system/memory/rangeX Tony Luck
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=20250210211223.6139-2-tony.luck@intel.com \
--to=tony.luck@intel.com \
--cc=acpica-devel@lists.linux.dev \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=dakr@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=david@redhat.com \
--cc=fenghua.yu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=osalvador@suse.de \
--cc=rafael.j.wysocki@intel.com \
--cc=robert.moore@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox