From nobody Tue May 14 16:13:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+92977+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+92977+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1661854828; cv=none; d=zohomail.com; s=zohoarc; b=VZoyq/aK0/PfAzYKKQh1EolgnZyU1LTjT1w/LTc4qj39NndUCUzLie8ZZ4/rtT72dhDdFPCmRiMP7tA9n5D4j0H7gAm8O2pGEiiDHtqF8GVZE1tNL9mLfpEQbLUIyFyQ2q90qEejTeKiK6iqdhYq5nlU/ITu1w/YJ4OT1+oZjZQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661854828; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=SHFaFdBjuUZJz0D0mrafvd8V6dGv8+tdPNNq+SD9UBE=; b=DkHTMV2M9Hk/KC+yCdTFhzNHTmo1yBtvzv/TP1Z0dpLSvf3KH5S5V23nFYK4PZHM83EIp/oh2PteFNZvBvajaEU1xY+CdjZzZJQNHT0h5gtGXt9Ypww5l4t7haXCDQN7YhU0qD+LFNlAuwx938n8PpPh1G1qp3QpMbT1rA06Lg0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+92977+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1661854828174320.0894558316437; Tue, 30 Aug 2022 03:20:28 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id iCKeYY1788612xQcn21lijgg; Tue, 30 Aug 2022 03:20:27 -0700 X-Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by mx.groups.io with SMTP id smtpd.web09.9892.1661854826799024276 for ; Tue, 30 Aug 2022 03:20:27 -0700 X-Received: by mail-lf1-f46.google.com with SMTP id p5so11723938lfc.6 for ; Tue, 30 Aug 2022 03:20:26 -0700 (PDT) X-Gm-Message-State: KrhzsX4q9uMrzc0Bvs64nBZTx1787277AA= X-Google-Smtp-Source: AA6agR7y+NB3jZ/mmjfIaApHJiia7EkzXcurcRtJYDMON/ZcQ0YsB6lCm4uoYDy/eWHwT5SPsAm0Ww== X-Received: by 2002:a05:6512:1399:b0:486:2ae5:be71 with SMTP id p25-20020a056512139900b004862ae5be71mr7196378lfa.246.1661854824662; Tue, 30 Aug 2022 03:20:24 -0700 (PDT) X-Received: from PC10319.67 ([82.97.198.254]) by smtp.googlemail.com with ESMTPSA id 11-20020a2eb94b000000b0026766d44385sm240797ljs.42.2022.08.30.03.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 03:20:24 -0700 (PDT) From: "Konstantin Aladyshev" To: devel@edk2.groups.io Cc: bob.c.feng@intel.com, gaoliming@byosoft.com.cn, yuwei.chen@intel.com, Konstantin Aladyshev Subject: [edk2-devel] [PATCH v2] BaseTools: Add missing spaces for PCD expression values in AutoGenC Date: Tue, 30 Aug 2022 13:20:27 +0300 Message-Id: <20220830102027.18579-1-aladyshev22@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,aladyshev22@gmail.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1661854827; bh=gTcHHkMf0wNker1qjuoqMNet+NBF5g6Ho7IGBiljWnw=; h=Cc:Date:From:Reply-To:Subject:To; b=fjzLssoh0wh07e2SSuJyMDjU/nt0WggCBBE9MrtFGNgegEb9t2o5vS0VK5ieRf7S2rd NbJbeT9yVyEg0e+3pJ+kXUznm+UeCel+VQUgs7lbBxUddUVeoKw3buCOgUJrbMBPZl52Q LwwTJXzo8mdGTfUmXNlCkjNX4BcrKuVtK50= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1661854829721100002 Content-Type: text/plain; charset="utf-8" Currently the PCD values calculated from the expressions have different formating from the simple byte arrays in AutoGenC. Example: The following definition in DEC: gTokenSpaceGuid.PcdArray|{0x44, 0x33, 0x22, 0x11}|VOID*|0x55555555 gTokenSpaceGuid.PcdArrayByExpression|{UINT32(0x11223344)}|VOID*|0x66666666 Produces these strings in AutoGenC: <...> _gPcd_<...>_PcdArray[4] =3D {0x44, 0x33, 0x22, 0x11}; <...> _gPcd_<...>_PcdArrayByExpression[4] =3D {0x44,0x33,0x22,0x11}; Add missing space character between the array elements to unify PCD value formatting. Signed-off-by: Konstantin Aladyshev Reviewed-by: Bob Feng Reviewed-by: Liming Gao --- BaseTools/Source/Python/Common/Expression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Sourc= e/Python/Common/Expression.py index 31bf0e4b6c..b62efe6f9b 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -1026,7 +1026,7 @@ class ValueExpressionEx(ValueExpression): Size +=3D ItemSize =20 if Size > 0: - PcdValue =3D '{' + ','.join(AllPcdValueLis= t) + '}' + PcdValue =3D '{' + ', '.join(AllPcdValueLi= st) + '}' else: raise BadExpression("Type: %s, Value: %s, %s"= %(self.PcdType, PcdValue, Value)) =20 --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92977): https://edk2.groups.io/g/devel/message/92977 Mute This Topic: https://groups.io/mt/93345721/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-