From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: bob.c.feng@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Thu, 19 Sep 2019 01:46:41 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2019 01:46:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,522,1559545200"; d="scan'208";a="388219119" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga006.fm.intel.com with ESMTP; 19 Sep 2019 01:46:40 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 19 Sep 2019 01:46:39 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 19 Sep 2019 01:46:39 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 19 Sep 2019 01:46:39 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.32]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.140]) with mapi id 14.03.0439.000; Thu, 19 Sep 2019 16:46:31 +0800 From: "Bob Feng" To: "devel@edk2.groups.io" , "Feng, Bob C" , "Fan, ZhijuX" CC: "Gao, Liming" Subject: Re: [edk2-devel] [PATCH] BaseTools:Change the way that get some VpdPcd information Thread-Topic: [edk2-devel] [PATCH] BaseTools:Change the way that get some VpdPcd information Thread-Index: AdVuBYXcIIUjTKvDS9COF4MjDC1lMAAvmMQgAACjsbA= Date: Thu, 19 Sep 2019 08:46:31 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D161537206@SHSMSX104.ccr.corp.intel.com> References: <15C5C9810B2904DB.31192@groups.io> In-Reply-To: <15C5C9810B2904DB.31192@groups.io> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Zhiju, Please update the patch title, "Change the way that get some VpdPcd inform= ation" is not clear for what this patch dose. Thanks, Bob -----Original Message----- From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Bob = Feng Sent: Thursday, September 19, 2019 4:27 PM To: Fan, ZhijuX ; devel@edk2.groups.io Cc: Gao, Liming Subject: Re: [edk2-devel] [PATCH] BaseTools:Change the way that get some V= pdPcd information Reviewed-by: Bob Feng -----Original Message----- From: Fan, ZhijuX=20 Sent: Wednesday, September 18, 2019 5:43 PM To: devel@edk2.groups.io Cc: Gao, Liming ; Feng, Bob C Subject: [PATCH] BaseTools:Change the way that get some VpdPcd information BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2201 An error occurs using special VpdPcd that is not used in the Inf file In dsc: [PcdsDynamicExVpd.common.DEFAULT] gBoardModuleTokenSpaceGuid.test1|*|{CODE({ {0x0} // terminator })} In dec: [PcdsDynamicEx] # Vpd GPIO table gBoardModuleTokenSpaceGuid.test1|{0}|GPIO_INIT_CONFIG[]|0x50000018 { Library/GpioLib.h MdePkg/MdePkg.dec } ValueError: invalid literal for int() with base 0: '*' This Patch is going to fix issue by Change the way that get some VpdPcd in= formation Cc: Liming Gao Cc: Bob Feng Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/build/BuildReport.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Sour= ce/Python/build/BuildReport.py index 6b26f1c3b0..880459d367 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -1419,10 +1419,19 @@ class PcdReport(object): FileWrite(File, '%*s' % (self.MaxLen + 4, SkuInfo= .VpdOffset)) VPDPcdItem =3D (Pcd.TokenSpaceGuidCName + '.' + P= cdTokenCName, SkuIdName, SkuInfo.VpdOffset, Pcd.MaxDatumSize, SkuInfo.Defau= ltValue) if VPDPcdItem not in VPDPcdList: - VPDPcdList.append(VPDPcdItem) + PcdGuidList =3D self.UnusedPcds.get(Pcd.Token= SpaceGuidCName) + if PcdGuidList: + PcdList =3D PcdGuidList.get(Pcd.Type) + if not PcdList: + VPDPcdList.append(VPDPcdItem) + for VpdPcd in PcdList: + if PcdTokenCName =3D=3D VpdPcd.TokenC= Name: + break + else: + VPDPcdList.append(VPDPcdItem) if IsStructure: FiledOverrideFlag =3D False - OverrideValues =3D Pcd.SkuOverrideValues[Sku] + OverrideValues =3D Pcd.SkuOverrideValues.get(Sku) if OverrideValues: Keys =3D list(OverrideValues.keys()) OverrideFieldStruct =3D self.OverrideFieldVal= ue(Pcd, OverrideValues[Keys[0]]) -- 2.14.1.windows.1