From: "Jeff Brasen" <jbrasen@nvidia.com>
To: <devel@edk2.groups.io>
Cc: <michael.d.kinney@intel.com>, <gaoliming@byosoft.com.cn>,
<zhiguang.liu@intel.com>, <zhichao.gao@intel.com>,
<ray.ni@intel.com>, "Jeff Brasen" <jbrasen@nvidia.com>
Subject: [PATCH 1/2] MdePkg/IndustryStandard: add definitions for ACPI APMT
Date: Thu, 27 Oct 2022 08:40:57 -0600 [thread overview]
Message-ID: <1dd062eed3bce95a7928fa41f8e3821897867b4c.1666881494.git.jbrasen@nvidia.com> (raw)
This adds #defines and struct typedefs for the various node types in
the ACPI Arm Performance Monitoring Unit (APMT) table.
Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
---
MdePkg/Include/IndustryStandard/Acpi64.h | 5 ++
.../ArmPerformanceMonitoringUnitTable.h | 69 +++++++++++++++++++
2 files changed, 74 insertions(+)
create mode 100644 MdePkg/Include/IndustryStandard/ArmPerformanceMonitoringUnitTable.h
diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h b/MdePkg/Include/IndustryStandard/Acpi64.h
index fe5ebfac2b..575ca0430c 100644
--- a/MdePkg/Include/IndustryStandard/Acpi64.h
+++ b/MdePkg/Include/IndustryStandard/Acpi64.h
@@ -2847,6 +2847,11 @@ typedef struct {
///
#define EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
+///
+/// "APMT" Arm Performance Monitoring Unit Table
+///
+#define EFI_ACPI_6_4_ARM_PERFORMANCE_MONITORING_UNIT_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'M', 'T')
+
///
/// "BERT" Boot Error Record Table
///
diff --git a/MdePkg/Include/IndustryStandard/ArmPerformanceMonitoringUnitTable.h b/MdePkg/Include/IndustryStandard/ArmPerformanceMonitoringUnitTable.h
new file mode 100644
index 0000000000..fe7084cffd
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/ArmPerformanceMonitoringUnitTable.h
@@ -0,0 +1,69 @@
+/** @file
+ ACPI Arm Performance Monitoring Unit (APMT) table
+ as specified in ARM spec DEN0117
+
+ Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+ Copyright (c) 2022, ARM Limited. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef ARM_PERFORMANCE_MONITORING_UNIT_TABLE_H_
+#define ARM_PERFORMANCE_MONITORING_UNIT_TABLE_H_
+
+#include <IndustryStandard/Acpi.h>
+
+#pragma pack(1)
+
+///
+/// Arm Performance Monitoring Unit (APMT) tabl
+///
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+} EFI_ACPI_ARM_PERFORMANCE_MONITORING_UNIT_TABLE_HEADER;
+
+///
+/// APMT Revision (as defined in DEN0117.)
+///
+#define EFI_ACPI_ARM_PERFORMANCE_MONITORING_UNIT_TABLE_REVISION 0x00
+
+///
+/// Arm PMU Node Structure
+///
+
+// Node Flags
+#define EFI_ACPI_APMT_DUAL_PAGE_EXTENSION_SUPPORTED BIT0
+#define EFI_ACPI_APMT_PROCESSOR_AFFINITY_TYPE_CONTAINER BIT1
+#define EFI_ACPI_APMT_PROCESSOR_AFFINITY_TYPE_PROCESSOR 0 // BIT 1
+#define EFI_ACPI_APMT_64BIT_SINGLE_COPY_ATOMICITY_SUPPORTED BIT2
+
+// Interrupt Flags
+#define EFI_ACPI_APMT_INTERRUPT_MODE_EDGE_TRIGGERED BIT0
+#define EFI_ACPI_APMT_INTERRUPT_MODE_LEVEL_TRIGGERED 0 // BIT 0
+#define EFI_ACPI_APMT_INTERRUPT_TYPE_WIRED 0 // BIT 1
+
+// Node Type
+#define EFI_ACPI_APMT_NODE_TYPE_MEMORY_CONTROLLER 0x00
+#define EFI_ACPI_APMT_NODE_TYPE_SMMU 0x01
+#define EFI_ACPI_APMT_NODE_TYPE_PCIE_ROOT_COMPLEX 0x02
+#define EFI_ACPI_APMT_NODE_TYPE_ACPI_DEVICE 0x03
+#define EFI_ACPI_APMT_NODE_TYPE_CPU_CACHE 0x04
+
+typedef struct {
+ UINT16 Length;
+ UINT8 NodeFlags;
+ UINT8 NodeType;
+ UINT32 Identifier;
+ UINT64 NodeInstancePrimary;
+ UINT32 NodeInstanceSecondary;
+ UINT64 BaseAddress0;
+ UINT64 BaseAddress1;
+ UINT32 OverflowInterrupt;
+ UINT32 Reserved1;
+ UINT32 OverflowInterruptFlags;
+ UINT32 ProcessorAffinity;
+ UINT32 ImplementationId;
+} EFI_ACPI_ARM_PERFORMANCE_MONITORING_UNIT_NODE;
+
+#pragma pack()
+
+#endif
--
2.25.1
next reply other threads:[~2022-10-27 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 14:40 Jeff Brasen [this message]
2022-10-27 14:40 ` [PATCH 2/2] ShellPkg/AcpiView: APMT Parser Jeff Brasen
2022-11-01 11:41 ` [edk2-devel] " Sami Mujawar
2022-11-01 11:41 ` [edk2-devel] [PATCH 1/2] MdePkg/IndustryStandard: add definitions for ACPI APMT Sami Mujawar
2022-11-02 1:05 ` 回复: " gaoliming
2022-11-03 1:42 ` Gao, Zhichao
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-list 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=1dd062eed3bce95a7928fa41f8e3821897867b4c.1666881494.git.jbrasen@nvidia.com \
--to=devel@edk2.groups.io \
/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