Skip to content

Commit 1c5d62f

Browse files
bwicaksononvrafaeljw
authored andcommitted
ACPICA: Add support for ARM Performance Monitoring Unit Table.
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: acpica/acpica@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>
1 parent 1838ffe commit 1c5d62f

1 file changed

Lines changed: 80 additions & 0 deletions

File tree

include/acpi/actbl2.h

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* the wrong signature.
2626
*/
2727
#define ACPI_SIG_AGDI "AGDI" /* Arm Generic Diagnostic Dump and Reset Device Interface */
28+
#define ACPI_SIG_APMT "APMT" /* Arm Performance Monitoring Unit table */
2829
#define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */
2930
#define ACPI_SIG_IORT "IORT" /* IO Remapping Table */
3031
#define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
@@ -258,6 +259,85 @@ struct acpi_table_agdi {
258259

259260
#define ACPI_AGDI_SIGNALING_MODE (1)
260261

262+
/*******************************************************************************
263+
*
264+
* APMT - ARM Performance Monitoring Unit Table
265+
*
266+
* Conforms to:
267+
* ARM Performance Monitoring Unit Architecture 1.0 Platform Design Document
268+
* ARM DEN0117 v1.0 November 25, 2021
269+
*
270+
******************************************************************************/
271+
272+
struct acpi_table_apmt {
273+
struct acpi_table_header header; /* Common ACPI table header */
274+
};
275+
276+
#define ACPI_APMT_NODE_ID_LENGTH 4
277+
278+
/*
279+
* APMT subtables
280+
*/
281+
struct acpi_apmt_node {
282+
u16 length;
283+
u8 flags;
284+
u8 type;
285+
u32 id;
286+
u64 inst_primary;
287+
u32 inst_secondary;
288+
u64 base_address0;
289+
u64 base_address1;
290+
u32 ovflw_irq;
291+
u32 reserved;
292+
u32 ovflw_irq_flags;
293+
u32 proc_affinity;
294+
u32 impl_id;
295+
};
296+
297+
/* Masks for Flags field above */
298+
299+
#define ACPI_APMT_FLAGS_DUAL_PAGE (1<<0)
300+
#define ACPI_APMT_FLAGS_AFFINITY (1<<1)
301+
#define ACPI_APMT_FLAGS_ATOMIC (1<<2)
302+
303+
/* Values for Flags dual page field above */
304+
305+
#define ACPI_APMT_FLAGS_DUAL_PAGE_NSUPP (0<<0)
306+
#define ACPI_APMT_FLAGS_DUAL_PAGE_SUPP (1<<0)
307+
308+
/* Values for Flags processor affinity field above */
309+
#define ACPI_APMT_FLAGS_AFFINITY_PROC (0<<1)
310+
#define ACPI_APMT_FLAGS_AFFINITY_PROC_CONTAINER (1<<1)
311+
312+
/* Values for Flags 64-bit atomic field above */
313+
#define ACPI_APMT_FLAGS_ATOMIC_NSUPP (0<<2)
314+
#define ACPI_APMT_FLAGS_ATOMIC_SUPP (1<<2)
315+
316+
/* Values for Type field above */
317+
318+
enum acpi_apmt_node_type {
319+
ACPI_APMT_NODE_TYPE_MC = 0x00,
320+
ACPI_APMT_NODE_TYPE_SMMU = 0x01,
321+
ACPI_APMT_NODE_TYPE_PCIE_ROOT = 0x02,
322+
ACPI_APMT_NODE_TYPE_ACPI = 0x03,
323+
ACPI_APMT_NODE_TYPE_CACHE = 0x04,
324+
ACPI_APMT_NODE_TYPE_COUNT
325+
};
326+
327+
/* Masks for ovflw_irq_flags field above */
328+
329+
#define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE (1<<0)
330+
#define ACPI_APMT_OVFLW_IRQ_FLAGS_TYPE (1<<1)
331+
332+
/* Values for ovflw_irq_flags mode field above */
333+
334+
#define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE_LEVEL (0<<0)
335+
#define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE_EDGE (1<<0)
336+
337+
/* Values for ovflw_irq_flags type field above */
338+
339+
#define ACPI_APMT_OVFLW_IRQ_FLAGS_TYPE_WIRED (0<<1)
340+
261341
/*******************************************************************************
262342
*
263343
* BDAT - BIOS Data ACPI Table

0 commit comments

Comments
 (0)