diff options
| author | Yeoreum Yun <yeoreum.yun@arm.com> | 2026-08-10 12:04:11 +0100 |
|---|---|---|
| committer | pierregondois <41638958+pierregondois@users.noreply.github.com> | 2026-08-27 10:04:16 +0200 |
| commit | 3304d02e6967be44a269dd1c15f109cf7e9b8eac (patch) | |
| tree | 3d962a6910b9d12533597a091fb757adcc0ae036 /DynamicTablesPkg | |
| parent | 0d74fcf72b0a172549756c10acb4f53c355e937b (diff) | |
| download | edk2-3304d02e6967be44a269dd1c15f109cf7e9b8eac.tar.gz edk2-3304d02e6967be44a269dd1c15f109cf7e9b8eac.zip | |
DynamicTablesPkg: introduce Arm coresight PMU CM object
To generate Arm Performance Moniteroing Unit Table (APMT), introduce
Arm coresight PMU CM object.
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
Diffstat (limited to 'DynamicTablesPkg')
| -rw-r--r-- | DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 62 | ||||
| -rw-r--r-- | DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c | 18 |
2 files changed, 80 insertions, 0 deletions
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h index 0bdb12a059..f4ba0b05eb 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -55,6 +55,7 @@ typedef enum ArmObjectID { EArmObjDmc620PmuRegInfo, ///< 25 - DMC620 PMU Reg Info
EArmObjProcessorSpecificBlockInfo, ///< 26 - Processor Specific Block.
EArmObjProcessorSpecificSubDataArchInfo, ///< 27 - Processor Specific Sub Data (ArchData)
+ EArmObjCoresightPmuInfo, ///< 28 - Coresight PMU Info
EArmObjMax
} EARM_OBJECT_ID;
@@ -873,4 +874,65 @@ typedef struct CmArmProcessorSpecificSubDataArchInfo { UINT64 IdAA64Zfr0;
} CM_ARM_PROCESSOR_SPECIFIC_SUB_DATA_ARCH_INFO;
+/** A structure that describes Coresight PMU information.
+
+ ID: EArmObjCoresightPmuInfo
+*/
+typedef struct CmArmCoresightPmuInfo {
+ /// Node Flags.
+ UINT8 Flags;
+
+ /// Node Type.
+ UINT16 Type;
+
+ /// Unique identifier for this node.
+ UINT32 Identifier;
+
+ /// Base address of Page 0 of the PMU.
+ UINT64 BaseAddress0;
+
+ ///
+ /// Base address of Page 1 of the PMU if the PMU
+ /// implements the dual-page extension otherwise 0.
+ ///
+ UINT64 BaseAddress1;
+
+ /// Overflow Interrupt.
+ UINT32 OverflowInterrupt;
+
+ /// Overflow Interrupt Flags.
+ UINT32 OverflowInterruptFlags;
+
+ /// Proc node token for processor affinity
+ CM_OBJECT_TOKEN ProcNodeToken;
+
+ ///
+ /// Token pointing to the monitored device.
+ /// The Token is evaluated in regards to the node Type and might resolve
+ /// to a CM Object such as CPU cache, Smmu and etc.
+ ///
+ CM_OBJECT_TOKEN TypeInstanceToken;
+
+ ///
+ /// This is valid when type is EFI_ACPI_APMT_NODE_TYPE_ACPI_DEVICE only.
+ /// Specify the associated acpi device's HID with this Coresight PMU
+ /// including NULL characther.
+ ///
+ CHAR8 AcpiDeviceHid[9];
+
+ ///
+ /// This is valid when type is EFI_ACPI_APMT_NODE_TYPE_ACPI_DEVICE only.
+ /// Specify the associated acpi device's UID with this Coresight PMU.
+ ///
+ UINT32 AcpiDeviceUid;
+
+ ///
+ /// This field is used for specifying the identity of the
+ /// implementer of this PMU.
+ /// This field must be set to 0 and ignored if the
+ /// PMIIDR or PMPIDR register is present in this PMU implementation.
+ ///
+ UINT32 ImplementationId;
+} CM_ARM_CORESIGHT_PMU_INFO;
+
#pragma pack()
diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c index 7f1e5205c4..20ae13d4b1 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c @@ -469,6 +469,23 @@ STATIC CONST CM_OBJ_PARSER CmArmProcessorSpecificSubDataArchInfoParser[] = { { "IdAA64Zfr0", sizeof (UINT64), "0x%llx", NULL },
};
+/** A parser for EArmObjCoresightPmuInfo.
+*/
+STATIC CONST CM_OBJ_PARSER CmArmCoresightPmuInfoParser[] = {
+ { "Flags", sizeof (UINT8), "0x%x", NULL },
+ { "Type", sizeof (UINT16), "0x%x", NULL },
+ { "Identifier", sizeof (UINT32), "0x%x", NULL },
+ { "BaseAddress0", sizeof (UINT64), "0x%llx", NULL },
+ { "BaseAddress1", sizeof (UINT64), "0x%llx", NULL },
+ { "OverflowInterrupt", sizeof (UINT32), "0x%x", NULL },
+ { "OverflowInterruptFlags", sizeof (UINT32), "0x%x", NULL },
+ { "ProcNodeToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
+ { "TypeInstanceToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
+ { "AcpiDeviceHid", sizeof (CHAR8) * 9, "0x%a", PrintString },
+ { "AcpiDeviceUid", sizeof (UINT32), "0x%x", NULL },
+ { "ImplementationId", sizeof (UINT32), "0x%x", NULL },
+};
+
/** A parser for EArmObjCmn600Info.
*/
STATIC CONST CM_OBJ_PARSER CmArmCmn600InfoParser[] = {
@@ -1588,6 +1605,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = { CM_PARSER_ADD_OBJECT (EArmObjDmc620PmuRegInfo, CmArmDmc620PmuRegInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjProcessorSpecificBlockInfo, CmArmProcessorSpecificBlockInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjProcessorSpecificSubDataArchInfo,CmArmProcessorSpecificSubDataArchInfoParser),
+ CM_PARSER_ADD_OBJECT (EArmObjCoresightPmuInfo, CmArmCoresightPmuInfoParser),
CM_PARSER_ADD_OBJECT_RESERVED (EArmObjMax)
};
|
