From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 14213222630CD for ; Tue, 20 Mar 2018 01:40:35 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2018 01:46:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,334,1517904000"; d="scan'208";a="35286950" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 20 Mar 2018 01:46:51 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 20 Mar 2018 01:46:45 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 20 Mar 2018 01:46:45 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.226]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.235]) with mapi id 14.03.0319.002; Tue, 20 Mar 2018 16:45:35 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Fix bug for --pcd VOID* type when no max size is specified Thread-Index: AQHTwCTBWVZRcdSjKkWlqmZ9z+Alb6PYz1Ew Date: Tue, 20 Mar 2018 08:45:33 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1EA484@SHSMSX104.ccr.corp.intel.com> References: <1521534179-6984-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1521534179-6984-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Fix bug for --pcd VOID* type when no max size is specified X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2018 08:40:35 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yo= nghong Zhu > Sent: Tuesday, March 20, 2018 4:23 PM > To: edk2-devel@lists.01.org > Subject: [edk2] [Patch] BaseTools: Fix bug for --pcd VOID* type when no m= ax size is specified >=20 > when VOID* type non-structure pcd used in --pcd, and its max size is not > specified in DSC or its value is hex value, build break due to the code > int(Pcd.MaxDatumSize,10). > Now this patch remove this code, because tool will calculate the size > info in later phase. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/Workspace/DscBuildData.py | 13 ------------- > 1 file changed, 13 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTool= s/Source/Python/Workspace/DscBuildData.py > index 517385a..6e30b50 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -1252,23 +1252,10 @@ class DscBuildData(PlatformBuildClassObject): > SkuInfo.DefaultValue =3D NoFiledValues[(Pcd.= TokenSpaceGuidCName,Pcd.TokenCName)][0] > else: > SkuInfo.HiiDefaultValue =3D NoFiledValues[(P= cd.TokenSpaceGuidCName,Pcd.TokenCName)][0] > for defaultstore in SkuInfo.DefaultStoreDict= : > SkuInfo.DefaultStoreDict[defaultstore] = =3D > NoFiledValues[(Pcd.TokenSpaceGuidCName,Pcd.TokenCName)][0] > - if Pcd.DatumType =3D=3D "VOID*": > - if Pcd.MaxDatumSize is None: > - Pcd.MaxDatumSize =3D '0' > - MaxSize =3D int(Pcd.MaxDatumSize,10) > - if Pcd.DefaultValue.startswith("{") and Pcd.Defa= ultValue.endswith("}"): > - MaxSize =3D max([len(Pcd.DefaultValue.split(= ",")),MaxSize]) > - elif Pcd.DefaultValue.startswith("\"") or Pcd.De= faultValue.startswith("\'"): > - MaxSize =3D max([len(Pcd.DefaultValue)-2+1,M= axSize]) > - elif Pcd.DefaultValue.startswith("L\""): > - MaxSize =3D max([2*(len(Pcd.DefaultValue)-3+= 1),MaxSize]) > - else: > - MaxSize =3D max([len(Pcd.DefaultValue),MaxSi= ze]) > - Pcd.MaxDatumSize =3D str(MaxSize) > else: > PcdInDec =3D self.DecPcds.get((Name,Guid)) > if PcdInDec: > PcdInDec.PcdValueFromComm =3D NoFiledValues[(Guid,Na= me)][0] > if PcdInDec.Type in [self._PCD_TYPE_STRING_[MODEL_PC= D_FIXED_AT_BUILD], > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel