summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg/Library
diff options
context:
space:
mode:
authorPierre Gondois <pierre.gondois@arm.com>2022-10-10 11:20:54 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-10-31 12:32:32 +0000
commitdab7bac94c6ca31b9c9ed1da97eba7dade0c54a6 (patch)
tree66d7089e0c526411b61cebb9f4a50c937de2339e /DynamicTablesPkg/Library
parenta5672d43a6e5caab92c2a8067167af2484dff486 (diff)
downloadedk2-dab7bac94c6ca31b9c9ed1da97eba7dade0c54a6.tar.gz
edk2-dab7bac94c6ca31b9c9ed1da97eba7dade0c54a6.tar.bz2
edk2-dab7bac94c6ca31b9c9ed1da97eba7dade0c54a6.zip
DynamicTablesPkg: Add PCCT related objects
Introduce the following CmObj in the ArmNameSpaceObjects: - CM_ARM_MAILBOX_REGISTER_INFO - CM_ARM_PCC_SUBSPACE_CHANNEL_TIMING_INFO - CM_ARM_PCC_SUBSPACE_GENERIC_INFO - CM_ARM_PCC_SUBPSACE_TYPE0_INFO - CM_ARM_PCC_SUBPSACE_TYPE1_INFO - CM_ARM_PCC_SUBPSACE_TYPE2_INFO - CM_ARM_PCC_SUBPSACE_TYPE3_INFO - CM_ARM_PCC_SUBPSACE_TYPE4_INFO - CM_ARM_PCC_SUBPSACE_TYPE5_INFO These objects allow to describe mailbox registers, pcc timings and PCCT subspaces. They prepare the enablement of a PCCT generator. Also add the CmObjParsers associated to each object. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Diffstat (limited to 'DynamicTablesPkg/Library')
-rw-r--r--DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c107
1 files changed, 107 insertions, 0 deletions
diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
index 467b3072bf..5a01ed0fb8 100644
--- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
+++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
@@ -539,6 +539,101 @@ STATIC CONST CM_OBJ_PARSER CmArmCpcInfoParser[] = {
{ "NominalFrequencyInteger", 4, "0x%lx", NULL },
};
+/** A parser for the PCC_MAILBOX_REGISTER_INFO struct.
+*/
+STATIC CONST CM_OBJ_PARSER CmArmMailboxRegisterInfoParser[] = {
+ { "Register", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE), NULL, NULL,
+ AcpiGenericAddressParser, ARRAY_SIZE (AcpiGenericAddressParser) },
+ { "PreserveMask", 8, "0x%llx", NULL },
+ { "WriteMask", 8, "0x%llx", NULL },
+};
+
+/** A parser for the PCC_SUBSPACE_CHANNEL_TIMING_INFO struct.
+*/
+STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceChannelTimingInfoParser[] = {
+ { "NominalLatency", 4, "0x%x", NULL },
+ { "MaxPeriodicAccessRate", 4, "0x%x", NULL },
+ { "MinRequestTurnaroundTime", 2, "0x%x", NULL },
+};
+
+/** A parser for EArmObjPccSubspaceType0Info.
+*/
+STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType0InfoParser[] = {
+ { "SubspaceId", 1, "0x%x", NULL },
+ { "Type", 1, "0x%x", NULL },
+ { "BaseAddress", 8, "0x%llx", NULL },
+ { "AddressLength", 8, "0x%llx", NULL },
+ { "DoorbellReg", sizeof (PCC_MAILBOX_REGISTER_INFO),
+ NULL, NULL, CmArmMailboxRegisterInfoParser,
+ ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
+ { "ChannelTiming", sizeof (PCC_SUBSPACE_CHANNEL_TIMING_INFO),
+ NULL, NULL, CmArmPccSubspaceChannelTimingInfoParser,
+ ARRAY_SIZE (CmArmPccSubspaceChannelTimingInfoParser) },
+};
+
+/** A parser for EArmObjPccSubspaceType1Info.
+*/
+STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType1InfoParser[] = {
+ { "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),
+ NULL, NULL, CmArmPccSubspaceType0InfoParser,
+ ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) },
+ { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT),
+ NULL, NULL, CmArmGenericInterruptParser,
+ ARRAY_SIZE (CmArmGenericInterruptParser) },
+};
+
+/** A parser for EArmObjPccSubspaceType2Info.
+*/
+STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType2InfoParser[] = {
+ { "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),
+ NULL, NULL, CmArmPccSubspaceType0InfoParser,
+ ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) },
+ { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL,NULL,
+ CmArmGenericInterruptParser, ARRAY_SIZE (CmArmGenericInterruptParser) },
+ { "PlatIrqAckReg", sizeof (PCC_MAILBOX_REGISTER_INFO),
+ NULL, NULL, CmArmMailboxRegisterInfoParser,
+ ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
+};
+
+/** A parser for EArmObjPccSubspaceType3Info or EArmObjPccSubspaceType4Info.
+*/
+STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType34InfoParser[] = {
+ { "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),
+ NULL, NULL, CmArmPccSubspaceType0InfoParser,
+ ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) },
+ { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL,NULL,
+ CmArmGenericInterruptParser, ARRAY_SIZE (CmArmGenericInterruptParser) },
+ { "PlatIrqAckReg", sizeof (PCC_MAILBOX_REGISTER_INFO),
+ NULL, NULL, CmArmMailboxRegisterInfoParser,
+ ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
+ { "CmdCompleteCheckReg", sizeof (PCC_MAILBOX_REGISTER_INFO),
+ NULL, NULL, CmArmMailboxRegisterInfoParser,
+ ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
+ { "CmdCompleteUpdateReg", sizeof (PCC_MAILBOX_REGISTER_INFO),
+ NULL, NULL, CmArmMailboxRegisterInfoParser,
+ ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
+ { "ErrorStatusReg", sizeof (PCC_MAILBOX_REGISTER_INFO),
+ NULL, NULL, CmArmMailboxRegisterInfoParser,
+ ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
+};
+
+/** A parser for EArmObjPccSubspaceType5Info.
+*/
+STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType5InfoParser[] = {
+ { "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),
+ NULL, NULL, CmArmPccSubspaceType0InfoParser,
+ ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) },
+ { "Version", 2, "0x%x",NULL },
+ { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL, NULL,
+ CmArmGenericInterruptParser, ARRAY_SIZE (CmArmGenericInterruptParser) },
+ { "CmdCompleteCheckReg", sizeof (PCC_MAILBOX_REGISTER_INFO),
+ NULL, NULL, CmArmMailboxRegisterInfoParser,
+ ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
+ { "ErrorStatusReg", sizeof (PCC_MAILBOX_REGISTER_INFO),
+ NULL, NULL, CmArmMailboxRegisterInfoParser,
+ ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
+};
+
/** A parser for Arm namespace objects.
*/
STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
@@ -623,6 +718,18 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
ARRAY_SIZE (CmArmMemoryRangeDescriptorInfoParser) },
{ "EArmObjCpcInfo", CmArmCpcInfoParser,
ARRAY_SIZE (CmArmCpcInfoParser) },
+ { "EArmObjPccSubspaceType0Info", CmArmPccSubspaceType0InfoParser,
+ ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) },
+ { "EArmObjPccSubspaceType1Info", CmArmPccSubspaceType1InfoParser,
+ ARRAY_SIZE (CmArmPccSubspaceType1InfoParser) },
+ { "EArmObjPccSubspaceType2Info", CmArmPccSubspaceType2InfoParser,
+ ARRAY_SIZE (CmArmPccSubspaceType2InfoParser) },
+ { "EArmObjPccSubspaceType3Info", CmArmPccSubspaceType34InfoParser,
+ ARRAY_SIZE (CmArmPccSubspaceType34InfoParser) },
+ { "EArmObjPccSubspaceType4Info", CmArmPccSubspaceType34InfoParser,
+ ARRAY_SIZE (CmArmPccSubspaceType34InfoParser) },
+ { "EArmObjPccSubspaceType5Info", CmArmPccSubspaceType5InfoParser,
+ ARRAY_SIZE (CmArmPccSubspaceType5InfoParser) },
{ "EArmObjMax", NULL, 0 },
};