public inbox for linux-acpi@vger.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 13/20] ACPICA: Add support for ARM Performance Monitoring Unit Table.
Date: Mon, 11 Apr 2022 20:58:04 +0200	[thread overview]
Message-ID: <3370028.QJadu78ljV@kreacher> (raw)
In-Reply-To: <5578328.DvuYhMxLoT@kreacher>

From: Besar Wicaksono <bwicaksono@nvidia.com>

ACPICA commit 002165ecc0a3dc703bb24c789aaa02fdada01675

The specification of this table is described in
"ARM Performance Monitoring Unit Architecture 1.0 Platform Design Document"
ARM DEN0117.

This patch adds the necessary types and support for
compiling/disassembling APMT.

Link: https://github.com/acpica/acpica/commit/002165ec
Signed-off-by: Besar Wicaksono <bwicaksono@nvidia.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 actbl2.h |   80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)

diff -Nurp linux.before_name/include/acpi/actbl2.h linux.after_name/include/acpi/actbl2.h
--- linux.before_name/include/acpi/actbl2.h	2022-04-01 18:26:31.909335052 +0200
+++ linux.after_name/include/acpi/actbl2.h	2022-04-01 18:26:28.746374585 +0200
@@ -25,6 +25,7 @@
  * the wrong signature.
  */
 #define ACPI_SIG_AGDI           "AGDI"	/* Arm Generic Diagnostic Dump and Reset Device Interface */
+#define ACPI_SIG_APMT           "APMT"	/* Arm Performance Monitoring Unit table */
 #define ACPI_SIG_BDAT           "BDAT"	/* BIOS Data ACPI Table */
 #define ACPI_SIG_IORT           "IORT"	/* IO Remapping Table */
 #define ACPI_SIG_IVRS           "IVRS"	/* I/O Virtualization Reporting Structure */
@@ -260,6 +261,85 @@ struct acpi_table_agdi {
 
 /*******************************************************************************
  *
+ * APMT - ARM Performance Monitoring Unit Table
+ *
+ * Conforms to:
+ * ARM Performance Monitoring Unit Architecture 1.0 Platform Design Document
+ * ARM DEN0117 v1.0 November 25, 2021
+ *
+ ******************************************************************************/
+
+struct acpi_table_apmt {
+	struct acpi_table_header header;	/* Common ACPI table header */
+};
+
+#define ACPI_APMT_NODE_ID_LENGTH                4
+
+/*
+ * APMT subtables
+ */
+struct acpi_apmt_node {
+	u16 length;
+	u8 flags;
+	u8 type;
+	u32 id;
+	u64 inst_primary;
+	u32 inst_secondary;
+	u64 base_address0;
+	u64 base_address1;
+	u32 ovflw_irq;
+	u32 reserved;
+	u32 ovflw_irq_flags;
+	u32 proc_affinity;
+	u32 impl_id;
+};
+
+/* Masks for Flags field above */
+
+#define ACPI_APMT_FLAGS_DUAL_PAGE               (1<<0)
+#define ACPI_APMT_FLAGS_AFFINITY                (1<<1)
+#define ACPI_APMT_FLAGS_ATOMIC                  (1<<2)
+
+/* Values for Flags dual page field above */
+
+#define ACPI_APMT_FLAGS_DUAL_PAGE_NSUPP         (0<<0)
+#define ACPI_APMT_FLAGS_DUAL_PAGE_SUPP          (1<<0)
+
+/* Values for Flags processor affinity field above */
+#define ACPI_APMT_FLAGS_AFFINITY_PROC           (0<<1)
+#define ACPI_APMT_FLAGS_AFFINITY_PROC_CONTAINER (1<<1)
+
+/* Values for Flags 64-bit atomic field above */
+#define ACPI_APMT_FLAGS_ATOMIC_NSUPP            (0<<2)
+#define ACPI_APMT_FLAGS_ATOMIC_SUPP             (1<<2)
+
+/* Values for Type field above */
+
+enum acpi_apmt_node_type {
+	ACPI_APMT_NODE_TYPE_MC = 0x00,
+	ACPI_APMT_NODE_TYPE_SMMU = 0x01,
+	ACPI_APMT_NODE_TYPE_PCIE_ROOT = 0x02,
+	ACPI_APMT_NODE_TYPE_ACPI = 0x03,
+	ACPI_APMT_NODE_TYPE_CACHE = 0x04,
+	ACPI_APMT_NODE_TYPE_COUNT
+};
+
+/* Masks for ovflw_irq_flags field above */
+
+#define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE          (1<<0)
+#define ACPI_APMT_OVFLW_IRQ_FLAGS_TYPE          (1<<1)
+
+/* Values for ovflw_irq_flags mode field above */
+
+#define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE_LEVEL    (0<<0)
+#define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE_EDGE     (1<<0)
+
+/* Values for ovflw_irq_flags type field above */
+
+#define ACPI_APMT_OVFLW_IRQ_FLAGS_TYPE_WIRED    (0<<1)
+
+/*******************************************************************************
+ *
  * BDAT - BIOS Data ACPI Table
  *
  * Conforms to "BIOS Data ACPI Table", Interface Specification v4.0 Draft 5




  parent reply	other threads:[~2022-04-11 19:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 18:46 [PATCH 00/20] ACPICA: ACPICA 20220331 Rafael J. Wysocki
2022-04-11 18:47 ` [PATCH 01/20] ACPICA: Add support for the Windows 11 _OSI string Rafael J. Wysocki
2022-04-11 18:47 ` [PATCH 02/20] ACPICA: Add the subtable CFMWS to the CEDT table Rafael J. Wysocki
2022-04-11 18:48 ` [PATCH 03/20] ACPICA: iASL: NHLT: Treat Terminator as specific_config Rafael J. Wysocki
2022-04-11 18:49 ` [PATCH 04/20] ACPICA: iASL: NHLT: Fix parsing undocumented bytes at the end of Endpoint Descriptor Rafael J. Wysocki
2022-04-11 18:50 ` [PATCH 05/20] ACPICA: iASL: NHLT: Rename linux specific strucures to device_info Rafael J. Wysocki
2022-04-11 18:51 ` [PATCH 06/20] ACPICA: Add new ACPI 6.4 semantics to the Load() operator Rafael J. Wysocki
2022-04-11 18:52 ` [PATCH 07/20] ACPICA: Add new ACPI 6.4 semantics for LoadTable() operator Rafael J. Wysocki
2022-04-11 18:53 ` [PATCH 08/20] ACPICA: Clean up double word in comment Rafael J. Wysocki
2022-04-11 18:54 ` [PATCH 09/20] ACPICA: Update copyright notices to the year 2022 Rafael J. Wysocki
2022-04-11 18:55 ` [PATCH 10/20] ACPICA: Removed some tabs and // comments Rafael J. Wysocki
2022-04-11 18:56 ` [PATCH 11/20] ACPICA: Headers: Replace zero-length array with flexible-array member Rafael J. Wysocki
2022-04-11 18:57 ` [PATCH 12/20] ACPICA: executer/exsystem: Add units to time variable names Rafael J. Wysocki
2022-04-11 18:58 ` Rafael J. Wysocki [this message]
2022-04-11 18:59 ` [PATCH 14/20] ACPICA: executer/exsystem: Inform users about ACPI spec violation Rafael J. Wysocki
2022-04-12  2:53   ` kernel test robot
2022-04-12 12:47     ` Rafael J. Wysocki
2022-04-11 18:59 ` [PATCH 15/20] ACPICA: executer/exsystem: Warn about sleeps greater than 10 ms Rafael J. Wysocki
2022-04-12  5:22   ` kernel test robot
2022-05-21 16:11   ` Rafael J. Wysocki
2022-05-21 23:28     ` Paul Menzel
2022-06-14 13:25       ` Rafael J. Wysocki
2022-04-11 19:00 ` [PATCH 16/20] ACPICA: iASL/MADT: Add OEM-defined subtable Rafael J. Wysocki
2022-04-11 19:01 ` [PATCH 17/20] ACPICA: executer/exsystem: Fix some typo mistakes Rafael J. Wysocki
2022-04-11 19:02 ` [PATCH 18/20] ACPICA: IORT: Updates for revision E.d Rafael J. Wysocki
2022-04-11 19:03 ` [PATCH 19/20] ACPICA: exsystem.c: Use ACPI_FORMAT_UINT64 for 64-bit output Rafael J. Wysocki
2022-04-11 19:04 ` [PATCH 20/20] ACPICA: Update version to 20220331 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=3370028.QJadu78ljV@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox