From: Sami Mujawar <sami.muja...@arm.com> Update the Token Fixer to return objects other than Arm Namespace objects as unsupported.
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> --- .../Common/DynamicPlatRepoLib/CmObjectTokenFixer.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c index 9a6ab2a274aa..bbbb81ea31b0 100644 --- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c +++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c @@ -209,12 +209,15 @@ FixupCmObjectSelfToken ( CM_OBJECT_TOKEN_FIXER TokenFixerFunc; CM_OBJECT_ID ArmNamespaceObjId; + if (CmObjDesc == NULL) { + ASSERT (0); + return EFI_INVALID_PARAMETER; + } + // Only support Arm objects for now. - if ((CmObjDesc == NULL) || - (GET_CM_NAMESPACE_ID (CmObjDesc->ObjectId) != EObjNameSpaceArm)) - { + if (GET_CM_NAMESPACE_ID (CmObjDesc->ObjectId) != EObjNameSpaceArm) { ASSERT (0); - return EFI_INVALID_PARAMETER; + return EFI_UNSUPPORTED; } ArmNamespaceObjId = GET_CM_OBJECT_ID (CmObjDesc->ObjectId); -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116967): https://edk2.groups.io/g/devel/message/116967 Mute This Topic: https://groups.io/mt/105067972/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-