DynamicTablesPkg: Add support for ArchCommon objects in CmObjParser

Update the Cm Object Parser to support parsing of Arch Common
namespace objects.

Cc: Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Yeo Reum Yun <YeoReum.Yun@arm.com>
Cc: AbdulLateef Attar <AbdulLateef.Attar@amd.com>
Cc: Jeshua Smith <jeshuas@nvidia.com>
Cc: Jeff Brasen <jbrasen@nvidia.com>
Cc: Girish Mahadevan <gmahadevan@nvidia.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
This commit is contained in:
Sami Mujawar 2024-03-07 14:11:31 +00:00 committed by mergify[bot]
parent 15ce6edd04
commit af337d1291
1 changed files with 22 additions and 0 deletions

View File

@ -667,6 +667,13 @@ STATIC CONST CM_OBJ_PARSER CmArmPsdInfoParser[] = {
{ "NumProc", 4, "0x%x", NULL },
};
/** A parser for Arch Common namespace objects.
*/
STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjReserved),
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
};
/** A parser for Arm namespace objects.
*/
STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
@ -1050,6 +1057,21 @@ ParseCmObjDesc (
ParserArray = &ArmNamespaceObjectParser[ObjId];
break;
case EObjNameSpaceArchCommon:
if (ObjId >= EArchCommonObjMax) {
ASSERT (0);
return;
}
if (ObjId >= ARRAY_SIZE (ArchCommonNamespaceObjectParser)) {
DEBUG ((DEBUG_ERROR, "ObjId 0x%x is missing from the ArchCommonNamespaceObjectParser array\n", ObjId));
ASSERT (0);
return;
}
ParserArray = &ArchCommonNamespaceObjectParser[ObjId];
break;
default:
// Not supported
DEBUG ((DEBUG_ERROR, "NameSpaceId 0x%x, ObjId 0x%x is not supported by the parser\n", NameSpaceId, ObjId));