From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gakldTRp; spf=pass (domain: gmail.com, ip: 209.85.208.177, mailfrom: aladyshev22@gmail.com) Received: by mail-lj1-f177.google.com with SMTP id s9so6594471ljs.6 for ; Mon, 01 Aug 2022 07:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=C5taUl2cfW16Ur1E78XmMyJZb98bU7HNkVmwsX6wYpo=; b=gakldTRpFgT9svPLSEQm9QR+ZT2APgPlhXXIzVU75ERm3jc3VPjHDMZxkqQ946WVmA 7Lj21Sqhbfy+i7flCnuPm0iQjK3k4NjxVqR17r2BSybthLt9vMc1kEjxPoTZ/rPypBr6 Xc49vAc5/Ec0ebBPMXNLjxcdquMXjplpeZFypl/KVOjuAW2dmczpNJ2uZDkvTtOMBZ9b X3drYjXz1P30I2OAs9YO7IqWEcdvHPUaMymMod5nSNFS2OQnuf0yPD4uJUP14K4grXEH OcNyOfvGA1615Ol9a7zhh0dWBcP+BuGe3u7OAuE7TOKhd2YXtIEoQPs87u+UY+p0wEnG +rlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=C5taUl2cfW16Ur1E78XmMyJZb98bU7HNkVmwsX6wYpo=; b=XntKeIb0CJNmnAdgqWNldmSfJzT1VfEAIr/XtwEugETltWV6L/j8ZKldyCdCn0G/JF v3I3TfbTZZZ4KAaj84jh6tCN9eRf28LJ4LY9BPXCxX3Duhl3BrdpJupaAcIq+TM6IlBE 6EpgNCZRkbg/itXaB/Hs/+tgUUJEDjlUBiHj6fyYJIDSkNYXSLzCB3bCHivkGVAGquab KzUT7kTw72Q9RdJij2QXLc/6+pWf5wtkb11SfuYYJA4B24rcPdxiK2H74P53r/IWrAVa SYndf1dz2L11JUHpfPdGbCwpBcLjCJyPR/kDbLj7GN5C7hWpx9p+kNDag8nG74IQOSbu Zk8w== X-Gm-Message-State: AJIora/0b4ptI4IvoNLXPCgwRJq2nc0VEP3EM/1ostGISqKaFf561oi7 EXzPRp5Y9L1NJQpfIUlIRnFD7Zo4QPQ= 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) Return-Path: 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: [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> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=0D =0D if Size > 0:=0D - PcdValue =3D '{' + ','.join(AllPcdValueLis= t) + '}'=0D + PcdValue =3D '{' + ', '.join(AllPcdValueLi= st) + '}'=0D else:=0D raise BadExpression("Type: %s, Value: %s, %s"= %(self.PcdType, PcdValue, Value))=0D =0D --=20 2.25.1