mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
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>
This commit is contained in:
parent
70b95818da
commit
9455c8536e
2 changed files with 80 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue