public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Dumbre, Saket" <saket.dumbre@intel.com>
Subject: [PATCH v1 01/26] ACPICA: Add support for the new ACPI Table: DTPR
Date: Wed, 14 Jan 2026 13:16:23 +0100	[thread overview]
Message-ID: <6234415.lOV4Wx5bFT@rafael.j.wysocki> (raw)
In-Reply-To: <12822121.O9o76ZdvQC@rafael.j.wysocki>

From: Michal Camacho Romero <michal.camacho.romero@intel.com>

Define a new the ACPI Table, structure and registers, related with it, according
to the latest version of the Intel TXT DMA Protection Ranges (TPR) specification
(Revision 0.73):

*    DTPR ACPI Table
*    TPR Base Register
*    TPR Serialize Request Register
*    TPR Limit Register
*    TPR Instance Structure
*    DMAR TXT Protected Reporting Structure

These structures will be used to handle TPRs on the Intel CPU's.

Link: https://github.com/acpica/acpica/commit/10e7a88f70da
Link: https://uefi.org/sites/default/files/resources/633933_Intel_TXT_DMA_Protection_Ranges_rev_0p73.pdf
Signed-off-by: Michal Camacho Romero <michal.camacho.romero@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 include/acpi/actbl1.h | 86 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)

diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 7f35eb0e8458..23449a068c5c 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -47,6 +47,7 @@
 #define ACPI_SIG_HPET           "HPET"	/* High Precision Event Timer table */
 #define ACPI_SIG_IBFT           "IBFT"	/* iSCSI Boot Firmware Table */
 #define ACPI_SIG_MSCT           "MSCT"	/* Maximum System Characteristics Table */
+#define ACPI_SIG_DTPR           "DTPR"	/* TXT DMA Protection Ranges reporting table */
 
 #define ACPI_SIG_S3PT           "S3PT"	/* S3 Performance (sub)Table */
 #define ACPI_SIG_PCCS           "PCC"	/* PCC Shared Memory Region */
@@ -1973,6 +1974,91 @@ struct acpi_ibft_target {
 	u16 reverse_chap_secret_offset;
 };
 
+/*******************************************************************************
+ *
+ * DTPR - DMA TPR Reporting
+ *        Version 1
+ *
+ * Conforms to "Intel® Trusted Execution Technology (Intel® TXT) DMA Protection
+ *              Ranges",
+ * Revision 0.73, August 2021
+ *
+ ******************************************************************************/
+
+struct acpi_table_dtpr {
+	struct acpi_table_header header;
+	u32 flags;		// 36
+};
+
+struct acpi_tpr_array {
+	u64 base;
+};
+
+struct acpi_dtpr_instance {
+	u32 flags;
+	u32 tpr_cnt;
+	struct acpi_tpr_array tpr_array[];
+};
+
+/*******************************************************************************
+ * TPRn_BASE
+ *
+ * Specifies the start address of TPRn region. TPR region address and size must
+ * be with 1MB resolution. These bits are compared with the result of the
+ * TPRn_LIMIT[63:20] * applied to the incoming address, to determine if an
+ * access fall within the TPRn defined region.
+*******************************************************************************/
+struct acpi_dtprn_base_reg {
+	u64 reserved0:3;
+	u64 rw:1;		// access: 1 == RO, 0 == RW (for TPR must be RW)
+	u64 enable:1;		// 0 == range enabled, 1 == range disabled
+	u64 reserved1:15;
+	u64 tpr_base_rw:44;	// minimal TPrn_base resolution is 1MB.
+	// applied to the incoming address, to determine if an
+	// access fall within the TPrn defined region.
+	// width is determined by a bus width which can be
+	// obtainedvia CPUID function 0x80000008.
+	//u64 unused : 1;
+};
+
+/*******************************************************************************
+ * TPRn_LIMIT
+ *
+ * This register defines an isolated region of memory that can be enabled
+ * to prohibit certain system agents from accessing memory. When an agent
+ * sends a request upstream, whether snooped or not, a TPR prevents that
+ * transaction from changing the state of memory.
+*******************************************************************************/
+
+struct acpi_dtprn_limit_reg {
+	u64 reserved0:3;
+	u64 rw:1;		// access: 1 == RO, 0 == RW (for TPR must be RW)
+	u64 enable:1;		// 0 == range enabled, 1 == range disabled
+	u64 reserved1:15;
+	u64 tpr_limit_rw:44;	// minimal TPrn_limit resolution is 1MB.
+	// these bits define TPR limit address.
+	// width is determined by a bus width.
+
+	//u64 unused : 1;
+};
+
+/*******************************************************************************
+ * SERIALIZE_REQUEST
+ *
+ * This register is used to request serialization of non-coherent DMA
+ * transactions. OS shall  issue it before changing of TPR settings
+ * (base / size).
+*******************************************************************************/
+
+struct acpi_tpr_serialize_request {
+	u64 sts:1;		// status of serialization request (RO)
+	// 0 == register idle, 1 == serialization in progress
+	u64 ctrl:1;		// control field to initiate serialization (RW)
+	// 0 == normal, 1 == initialize serialization
+	// (self-clear to allow multiple serialization requests)
+	u64 unused:62;
+};
+
 /* Reset to default packing */
 
 #pragma pack()
-- 
2.51.0





  reply	other threads:[~2026-01-14 12:42 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14 12:14 [PATCH v1 00/26] ACPICA: ACPICA 20251212 Rafael J. Wysocki
2026-01-14 12:16 ` Rafael J. Wysocki [this message]
2026-01-14 12:17 ` [PATCH v1 02/26] ACPICA: ACPICA: replace ACPI_FREE() with acpi_ut_delete_object_desc() Rafael J. Wysocki
2026-01-14 12:18 ` [PATCH v1 03/26] ACPICA: Add UUID for Microsoft fan extensions Rafael J. Wysocki
2026-01-14 12:19 ` [PATCH v1 04/26] ACPICA: Add UUIDs associated with TPM 2.0 devices Rafael J. Wysocki
2026-01-14 12:20 ` [PATCH v1 05/26] ACPICA: Fix NULL pointer dereference in acpi_ev_address_space_dispatch() Rafael J. Wysocki
2026-03-16 17:46   ` Guenter Roeck
2026-03-17 20:44     ` Rafael J. Wysocki
     [not found]       ` <SJ0PR11MB500584283698C48BD431BE5D804BA@SJ0PR11MB5005.namprd11.prod.outlook.com>
2026-03-24  4:21         ` Guenter Roeck
2026-01-14 12:21 ` [PATCH v1 06/26] ACPICA: Add KEYP table definition Rafael J. Wysocki
2026-01-14 12:21 ` [PATCH v1 07/26] ACPICA: Add support for the Microsoft display mux _OSI string Rafael J. Wysocki
2026-01-14 12:22 ` [PATCH v1 08/26] ACPICA: iASL: Add definitions for the IOVT table Rafael J. Wysocki
2026-01-14 12:23 ` [PATCH v1 09/26] ACPICA: Add DTPR table support for the ASL compiler Rafael J. Wysocki
2026-01-14 12:24 ` [PATCH v1 10/26] ACPICA: Define DTPR structure related info tables and data template Rafael J. Wysocki
2026-01-14 12:25 ` [PATCH v1 11/26] ACPICA: Abort AML bytecode execution when executing AML_FATAL_OP Rafael J. Wysocki
2026-01-14 12:26 ` [PATCH v1 12/26] ACPICA: ACPI 6.4: PPTT: include all fields in subtable type1 Rafael J. Wysocki
2026-01-14 12:27 ` [PATCH v1 13/26] ACPICA: Fix asltests using the Fatal() opcode Rafael J. Wysocki
2026-01-14 12:29 ` [PATCH v1 14/26] ACPICA: Add GICv5 MADT structures Rafael J. Wysocki
2026-01-14 12:29 ` [PATCH v1 15/26] ACPICA: Add Arm IORT IWB node definitions Rafael J. Wysocki
2026-01-14 12:31 ` [PATCH v1 16/26] ACPICA: actbl2.h: ACPI 6.6: RAS2: Update Parameter Block structure Rafael J. Wysocki
2026-01-14 12:31 ` [PATCH v1 17/26] ACPICA: actbl3.h: ACPI 6.6: SRAT: New flag in Memory Affinity Structure Rafael J. Wysocki
2026-01-14 12:32 ` [PATCH v1 18/26] ACPICA: ACPI 6.6: Add _VDM (Voltage Domain) object Rafael J. Wysocki
2026-01-14 12:33 ` [PATCH v1 19/26] ACPICA: Create auxiliary ACPI_TPR_AUX_SR structure for iASL compiler Rafael J. Wysocki
2026-01-14 12:34 ` [PATCH v1 20/26] ACPICA: Fix Segmentation Fault error related to DTPR Rafael J. Wysocki
2026-01-14 12:35 ` [PATCH v1 21/26] ACPICA: Verify DTPR and TPR Instance buffer pointers Rafael J. Wysocki
2026-01-14 12:36 ` [PATCH v1 22/26] ACPICA: Cleanup comments and DTPR Table handle functions Rafael J. Wysocki
2026-01-14 12:37 ` [PATCH v1 23/26] ACPICA: Align comments in TPRn-related structures Rafael J. Wysocki
2026-01-14 12:38 ` [PATCH v1 24/26] ACPICA: Logfile: Changes for version 20251212 Rafael J. Wysocki
2026-01-14 12:39 ` [PATCH v1 25/26] ACPICA: Replace TPRn Base and Limit registers Rafael J. Wysocki
2026-01-14 12:40 ` [PATCH v1 26/26] ACPICA: Refactor for TPR Base/Limit registers bitmasks 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=6234415.lOV4Wx5bFT@rafael.j.wysocki \
    --to=rafael@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saket.dumbre@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox