From: Sami Mujawar <sami.muja...@arm.com>

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

Cc: Pierre Gondois <pierre.gond...@arm.com>
Cc: Yeo Reum Yun <yeoreum....@arm.com>
Cc: AbdulLateef Attar <abdullateef.at...@amd.com>
Cc: Jeshua Smith <jesh...@nvidia.com>
Cc: Jeff Brasen <jbra...@nvidia.com>
Cc: Girish Mahadevan <gmahade...@nvidia.com>
Cc: Leif Lindholm <quic_llind...@quicinc.com>
Cc: Meenakshi Aggarwal <meenakshi.aggar...@nxp.com>
Signed-off-by: Sami Mujawar <sami.muja...@arm.com>
Signed-off-by: Pierre Gondois <pierre.gond...@arm.com>
---
 .../ConfigurationManagerObjectParser.c        | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git 
a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
 
b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
index 68d6c57acfc0..6f5dbdfd2d86 100644
--- 
a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
+++ 
b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
@@ -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));
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116966): https://edk2.groups.io/g/devel/message/116966
Mute This Topic: https://groups.io/mt/105067971/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to