From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.4225.1665393682763812473 for ; Mon, 10 Oct 2022 02:21:23 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AADE81570; Mon, 10 Oct 2022 02:21:28 -0700 (PDT) Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B73013F792; Mon, 10 Oct 2022 02:21:21 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [PATCH 05/14] DynamicTablesPkg: Fix GTBlock and GTBlockTimerFrame CmObjParsers Date: Mon, 10 Oct 2022 11:20:49 +0200 Message-Id: <20221010092058.118714-6-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Pierre Gondois The CmObjParsers of the following objects was inverted, probably due to a wrong ordering placement in the file defining the structures: -EArmObjGTBlockTimerFrameInfo -EArmObjPlatformGTBlockInfo Assign the correct parser for each object, and re-order the structures in the file defining them. Signed-off-by: Pierre Gondois --- .../Include/ArmNameSpaceObjects.h | 32 +++++++++---------- .../ConfigurationManagerObjectParser.c | 22 ++++++------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTabl= esPkg/Include/ArmNameSpaceObjects.h index c66b441d532d..cd39e609d6c4 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -353,6 +353,22 @@ typedef struct CmArmGenericTimerInfo { UINT32 VirtualPL2TimerFlags; } CM_ARM_GENERIC_TIMER_INFO; =20 +/** A structure that describes the + Platform Generic Block Timer information for the Platform. + + ID: EArmObjPlatformGTBlockInfo +*/ +typedef struct CmArmGTBlockInfo { + /// The physical base address for the GT Block Timer structure + UINT64 GTBlockPhysicalAddress; + + /// The number of timer frames implemented in the GT Block + UINT32 GTBlockTimerFrameCount; + + /// Reference token for the GT Block timer frame list + CM_OBJECT_TOKEN GTBlockTimerFrameToken; +} CM_ARM_GTBLOCK_INFO; + /** A structure that describes the Platform Generic Block Timer Frame information for the Platform. =20 @@ -390,22 +406,6 @@ typedef struct CmArmGTBlockTimerFrameInfo { UINT32 CommonFlags; } CM_ARM_GTBLOCK_TIMER_FRAME_INFO; =20 -/** A structure that describes the - Platform Generic Block Timer information for the Platform. - - ID: EArmObjPlatformGTBlockInfo -*/ -typedef struct CmArmGTBlockInfo { - /// The physical base address for the GT Block Timer structure - UINT64 GTBlockPhysicalAddress; - - /// The number of timer frames implemented in the GT Block - UINT32 GTBlockTimerFrameCount; - - /// Reference token for the GT Block timer frame list - CM_OBJECT_TOKEN GTBlockTimerFrameToken; -} CM_ARM_GTBLOCK_INFO; - /** A structure that describes the Arm Generic Watchdog information for the Platform. =20 diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/Configuration= ManagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/Co= nfigurationManagerObjectParser.c index f82541240ae0..040aaa4cbb17 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManager= ObjectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManager= ObjectParser.c @@ -127,6 +127,14 @@ STATIC CONST CM_OBJ_PARSER CmArmGenericTimerInfoPar= ser[] =3D { =20 /** A parser for EArmObjPlatformGTBlockInfo. */ +STATIC CONST CM_OBJ_PARSER CmArmGTBlockInfoParser[] =3D { + { "GTBlockPhysicalAddress", 8, "0x%llx", NULL }= , + { "GTBlockTimerFrameCount", 4, "0x%x", NULL }= , + { "GTBlockTimerFrameToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL } +}; + +/** A parser for EArmObjGTBlockTimerFrameInfo. +*/ STATIC CONST CM_OBJ_PARSER CmArmGTBlockTimerFrameInfoParser[] =3D { { "FrameNumber", 1, "0x%x", NULL }, { "PhysicalAddressCntBase", 8, "0x%llx", NULL }, @@ -138,14 +146,6 @@ STATIC CONST CM_OBJ_PARSER CmArmGTBlockTimerFrameIn= foParser[] =3D { { "CommonFlags", 4, "0x%x", NULL } }; =20 -/** A parser for EArmObjGTBlockTimerFrameInfo. -*/ -STATIC CONST CM_OBJ_PARSER CmArmGTBlockInfoParser[] =3D { - { "GTBlockPhysicalAddress", 8, "0x%llx", NULL }= , - { "GTBlockTimerFrameCount", 4, "0x%x", NULL }= , - { "GTBlockTimerFrameToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL } -}; - /** A parser for EArmObjPlatformGenericWatchdogInfo. */ STATIC CONST CM_OBJ_PARSER CmArmGenericWatchdogInfoParser[] =3D { @@ -560,10 +560,10 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjec= tParser[] =3D { ARRAY_SIZE (CmArmSerialPortInfoParser) }, { "EArmObjGenericTimerInfo", CmArmGenericTimerInfoParser, ARRAY_SIZE (CmArmGenericTimerInfoParser) }, - { "EArmObjPlatformGTBlockInfo", CmArmGTBlockTimerFrameInfoPar= ser, - ARRAY_SIZE (CmArmGTBlockTimerFrameInfoParser) }, - { "EArmObjGTBlockTimerFrameInfo", CmArmGTBlockInfoParser, + { "EArmObjPlatformGTBlockInfo", CmArmGTBlockInfoParser, ARRAY_SIZE (CmArmGTBlockInfoParser) }, + { "EArmObjGTBlockTimerFrameInfo", CmArmGTBlockTimerFrameInfoPar= ser, + ARRAY_SIZE (CmArmGTBlockTimerFrameInfoParser) }, { "EArmObjPlatformGenericWatchdogInfo", CmArmGenericWatchdogInfoParse= r, ARRAY_SIZE (CmArmGenericWatchdogInfoParser) }, { "EArmObjPciConfigSpaceInfo", CmArmPciConfigSpaceInfoParser= , --=20 2.25.1