From nobody Fri Mar 29 11:13:18 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+92009+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+92009+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1659365463; cv=none; d=zohomail.com; s=zohoarc; b=gCA8v1pJeZGYAdv9uBLC5cjqkRCs8oZNc8ObqsoiqNAFsigZ3vb2noB42sUAqOfZtklih/yjq5TYMFdFs95eR9KANtL2QrPU0U61BP/r8mKGKraGVrQQ/WGrUuYd+QUgY2kAAd88FTGfaC/1Sx/P5N7hR7KDokQi3hd1LVckWkc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659365463; 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=xggltrQmt0uvuzfYlY24NH4d3ONT2JedX8buQr8Nyfk=; b=gI5kT2p1WykDChKFYRTZUMrB3JQ8j9KBA2J7AukL7ox4emWRic7paML8al17sr5urzlo+lc9oo/l0ThU6/3ekRsYFopPgnwpyyPSUYuTx/np+yMamo5HUKxMtCSAb2k5E1eSetvmAJUZN9C1jm/Dirp/BidKJZmJQiv9tbcAla4= 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+92009+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 1659365463859770.1925915059187; Mon, 1 Aug 2022 07:51:03 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id sVetYY1788612xuNFHXu4A6j; Mon, 01 Aug 2022 07:51:03 -0700 X-Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) by mx.groups.io with SMTP id smtpd.web10.25723.1659365462350646168 for ; Mon, 01 Aug 2022 07:51:02 -0700 X-Received: by mail-lj1-f177.google.com with SMTP id s9so6594471ljs.6 for ; Mon, 01 Aug 2022 07:51:02 -0700 (PDT) X-Gm-Message-State: 2g7OJW5jZlfURivMknfLMIqZx1787277AA= X-Google-Smtp-Source: AGRyM1s1b1T+YWIS1cLAmY+fqDCjTPzK4hk73yg1mX6qW0/nDu4RsiePdL0WyLzMljldK7mjhEzggw== X-Received: by 2002:a2e:3919:0:b0:25e:566:89cf with SMTP id g25-20020a2e3919000000b0025e056689cfmr5431611lja.73.1659365460292; Mon, 01 Aug 2022 07:51:00 -0700 (PDT) X-Received: from PC10319.67 ([82.97.198.254]) by smtp.googlemail.com with ESMTPSA id y17-20020a2e3211000000b0025e4e7c016dsm438674ljy.16.2022.08.01.07.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Aug 2022 07:50:59 -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] BaseTools: Add missing spaces for PCD expression values in AutoGenC Date: Mon, 1 Aug 2022 17:51:16 +0300 Message-Id: <20220801145116.4951-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=1659365463; bh=yrsdrKKIHZ91VZMQFudlBFw6aodrHs3gDpXxxSqtT0A=; h=Cc:Date:From:Reply-To:Subject:To; b=KhDFrrcWwjXRiZejCHJuKgyWQvxSK7fmwnSSsiPCFJBIeTtUcJuWNx6QMI+FcI80/n2 VPyX7iQzRn3YnR8PHC8Qpzw0wZgUSkkBQuHdN6yS9FF7sOLqWSu/fv8rhbAFYlF3yob3d ybqx8ooz4a1VWfcNvpKiFd7M3c8fJsFhHhc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1659365464961100001 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 --- 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 (#92009): https://edk2.groups.io/g/devel/message/92009 Mute This Topic: https://groups.io/mt/92749764/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-