From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mx.groups.io with SMTP id smtpd.web09.34992.1658190347337957327 for ; Mon, 18 Jul 2022 17:25:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=S7DEYO4Z; spf=pass (domain: gmail.com, ip: 209.85.215.172, mailfrom: kuqin12@gmail.com) Received: by mail-pg1-f172.google.com with SMTP id bh13so12084236pgb.4 for ; Mon, 18 Jul 2022 17:25:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fFimhh0e4Iy5q3hpYVkiuCHspl/0dSEsVEhgwZL8r9E=; b=S7DEYO4ZwroeWha0IymSwNS0EaGDYHWOKJQUwOe2GHpGN/eQ5n216/oZ74783ms5zA uPXR2t0ykPfVPCSQpjhTZA5eY9NE6ddKipBnA8R4Fz4Ay7FZRkVYLvY2y1nkAC55KzMt bgJyft2km0St+Hj9jayCRwVdJyYQFBDMCOQ0sVD16HNLBywNvkZw5bgW9DMl0c4X5uDW c7MqKWaxyglRcCuqLfzi6DQxdYjRJcaHlDcmVvynxRiBvRDLCPewowcBALMC6ufuhEtF ppABnVA95BbLS1c9X7UF7l0CASz8WnCe+eaNqmY/3issp0/tm+YOaEJMPWkhHacpTkN/ RTcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fFimhh0e4Iy5q3hpYVkiuCHspl/0dSEsVEhgwZL8r9E=; b=jNmz6m/jixeRVinPRbvvFEXgJbRBa3rcrIIBt2MCVeL1y03eIINa1UYOmJr1L6tY4N rQOPQdULlXVZ9zfJbmeGyma24gtseo24WlcG9xx/oyz2GE791+v8Iy8Zca71JsyGtdd4 oq3mcgyEEe/yZP0VmMs6FJW+tHYzVpgO2uG0XnIkN2jpjscZEYX7X+/7VCdfe9RIBcgC qMC7E95xxMB3YFyi4FP3EI42E4llW//CtjYkXJCKaVpbzCarMXXsdtBGcKgrp8mJTVhi 75rqE3qU6nwB8a/alM7H5cUPyLFtWGeZWoM7e6+qXrFoE4E5kAbubwVH5tEZwu+FZE03 WuIA== X-Gm-Message-State: AJIora+MJ5lKjTxAutiHIMj57b9/wxzEAGHwQEl/c1MtYzpMc9U+HANt EVyACltZeXWQPakhVXZsWDSjqNbd6Yw= X-Google-Smtp-Source: AGRyM1tu12vdlr/uodLjTzrDuQwjwGmgxv126tLKFHuK4fRbpYJ/ppacIL8tYXVoaaeGisZ3ug5X1g== X-Received: by 2002:a05:6a00:188e:b0:52a:b545:559f with SMTP id x14-20020a056a00188e00b0052ab545559fmr30767306pfh.18.1658190346531; Mon, 18 Jul 2022 17:25:46 -0700 (PDT) Return-Path: Received: from MININT-0U7P5GU.redmond.corp.microsoft.com ([2001:4898:80e8:9:6532:8264:ce7d:ced]) by smtp.gmail.com with ESMTPSA id n10-20020aa7984a000000b005251c6fbd0csm9941521pfq.29.2022.07.18.17.25.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 17:25:46 -0700 (PDT) From: "Kun Qin" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov , Joe Lopez Subject: [PATCH v1 3/6] DynamicTablesPkg: DynamicPlatRepoLib: Adding more token fixers Date: Mon, 18 Jul 2022 17:22:51 -0700 Message-Id: <20220719002254.1891-4-kuqin12@gmail.com> X-Mailer: git-send-email 2.36.0.windows.1 In-Reply-To: <20220719002254.1891-1-kuqin12@gmail.com> References: <20220719002254.1891-1-kuqin12@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3996 This change added more token fixers for other node types, including NamedComponentNode, RootComplexNode, and SmmuV3Node. The corresponding entries for tokenFixer functions table is also updated. Cc: Sami Mujawar Cc: Alexei Fedorov Co-authored-by: Joe Lopez Signed-off-by: Kun Qin --- DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c | = 78 +++++++++++++++++++- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTok= enFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectToke= nFixer.c index 84e4bb7e3bc8..345acab53f74 100644 --- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer= .c +++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer= .c @@ -64,6 +64,78 @@ TokenFixerItsGroup ( return EFI_SUCCESS;=0D }=0D =0D +/** EArmObjNamedComponent token fixer.=0D +=0D + CmObjectToken fixer function that updates the Tokens in the CmObjects.=0D +=0D + @param [in] CmObject Pointer to the Configuration Manager Object.=0D + @param [in] Token Token to be updated in the CmObject.=0D +=0D + @retval EFI_SUCCESS Success.=0D + @retval EFI_INVALID_PARAMETER A parameter is invalid.=0D + @retval EFI_UNSUPPORTED Not supported.=0D +**/=0D +STATIC=0D +EFI_STATUS=0D +EFIAPI=0D +TokenFixerNamedComponentNode (=0D + IN CM_OBJ_DESCRIPTOR *CmObject,=0D + IN CM_OBJECT_TOKEN Token=0D + )=0D +{=0D + ASSERT (CmObject !=3D NULL);=0D + ((CM_ARM_NAMED_COMPONENT_NODE *)CmObject->Data)->Token =3D Token;=0D + return EFI_SUCCESS;=0D +}=0D +=0D +/** EArmObjRootComplex token fixer.=0D +=0D + CmObjectToken fixer function that updates the Tokens in the CmObjects.=0D +=0D + @param [in] CmObject Pointer to the Configuration Manager Object.=0D + @param [in] Token Token to be updated in the CmObject.=0D +=0D + @retval EFI_SUCCESS Success.=0D + @retval EFI_INVALID_PARAMETER A parameter is invalid.=0D + @retval EFI_UNSUPPORTED Not supported.=0D +**/=0D +STATIC=0D +EFI_STATUS=0D +EFIAPI=0D +TokenFixerRootComplexNode (=0D + IN CM_OBJ_DESCRIPTOR *CmObject,=0D + IN CM_OBJECT_TOKEN Token=0D + )=0D +{=0D + ASSERT (CmObject !=3D NULL);=0D + ((CM_ARM_ROOT_COMPLEX_NODE *)CmObject->Data)->Token =3D Token;=0D + return EFI_SUCCESS;=0D +}=0D +=0D +/** EArmObjSmmuV3 token fixer.=0D +=0D + CmObjectToken fixer function that updates the Tokens in the CmObjects.=0D +=0D + @param [in] CmObject Pointer to the Configuration Manager Object.=0D + @param [in] Token Token to be updated in the CmObject.=0D +=0D + @retval EFI_SUCCESS Success.=0D + @retval EFI_INVALID_PARAMETER A parameter is invalid.=0D + @retval EFI_UNSUPPORTED Not supported.=0D +**/=0D +STATIC=0D +EFI_STATUS=0D +EFIAPI=0D +TokenFixerSmmuV3Node (=0D + IN CM_OBJ_DESCRIPTOR *CmObject,=0D + IN CM_OBJECT_TOKEN Token=0D + )=0D +{=0D + ASSERT (CmObject !=3D NULL);=0D + ((CM_ARM_SMMUV3_NODE *)CmObject->Data)->Token =3D Token;=0D + return EFI_SUCCESS;=0D +}=0D +=0D /** TokenFixer functions table.=0D =0D A CmObj having a CM_OBJECT_TOKEN field might need to have its=0D @@ -90,10 +162,10 @@ CM_OBJECT_TOKEN_FIXER TokenFixer[EArmObjMax] =3D { NULL, ///< 16 - Hypervisor Vendor Id=0D NULL, ///< 17 - Fixed feature flags for FADT= =0D TokenFixerItsGroup, ///< 18 - ITS Group=0D - TokenFixerNotImplemented, ///< 19 - Named Component=0D - TokenFixerNotImplemented, ///< 20 - Root Complex=0D + TokenFixerNamedComponentNode, ///< 19 - Named Component=0D + TokenFixerRootComplexNode, ///< 20 - Root Complex=0D TokenFixerNotImplemented, ///< 21 - SMMUv1 or SMMUv2=0D - TokenFixerNotImplemented, ///< 22 - SMMUv3=0D + TokenFixerSmmuV3Node, ///< 22 - SMMUv3=0D TokenFixerNotImplemented, ///< 23 - PMCG=0D NULL, ///< 24 - GIC ITS Identifier Array=0D NULL, ///< 25 - ID Mapping Array=0D --=20 2.36.0.windows.1