From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 1876421D2BEE8 for ; Thu, 25 Jan 2018 01:50:10 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jan 2018 01:55:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,411,1511856000"; d="scan'208";a="198529708" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 25 Jan 2018 01:55:38 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 25 Jan 2018 01:55:38 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 25 Jan 2018 01:55:38 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.213]) with mapi id 14.03.0319.002; Thu, 25 Jan 2018 17:55:37 +0800 From: "Gao, Liming" To: "Feng, Bob C" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Fixed incorrect VPD size. Thread-Index: AQHTlCBc/lpeNM0kcEqHP5M7FJ0pF6OEXQcg Date: Thu, 25 Jan 2018 09:55:36 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1AC715@SHSMSX104.ccr.corp.intel.com> References: <20180123080059.14692-1-bob.c.feng@intel.com> In-Reply-To: <20180123080059.14692-1-bob.c.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Fixed incorrect VPD size. 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: Thu, 25 Jan 2018 09:50:10 -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 >BobCF >Sent: Tuesday, January 23, 2018 4:01 PM >To: edk2-devel@lists.01.org >Subject: [edk2] [Patch] BaseTools: Fixed incorrect VPD size. > >The VPD size is incorrect if that VPD is not used in Module. > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Feng Bob C >Reviewed-by: Liming Gao >--- > BaseTools/Source/Python/AutoGen/AutoGen.py | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > >diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py >b/BaseTools/Source/Python/AutoGen/AutoGen.py >index ce8bc64ca5..848378f3d4 100644 >--- a/BaseTools/Source/Python/AutoGen/AutoGen.py >+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py >@@ -1744,18 +1744,16 @@ class PlatformAutoGen(AutoGen): > > # Not found, it should be signature > if not FoundFlag : > # just pick the a value to determine whether = is unicode string >type > SkuValueMap =3D {} >+ SkuObjList =3D DscPcdEntry.SkuInfoList.items(= ) > DefaultSku =3D DscPcdEntry.SkuInfoList.get('D= EFAULT') > if DefaultSku: >- PcdValue =3D DefaultSku.DefaultValue >- if PcdValue not in SkuValueMap: >- SkuValueMap[PcdValue] =3D [] >- VpdFile.Add(DscPcdEntry, 'DEFAULT',De= faultSku.VpdOffset) >- SkuValueMap[PcdValue].append(DefaultSku) >- for (SkuName,Sku) in DscPcdEntry.SkuInfoList.= items(): >+ defaultindex =3D SkuObjList.index(('DEFAU= LT',DefaultSku)) >+ SkuObjList[0],SkuObjList[defaultindex] = =3D >SkuObjList[defaultindex],SkuObjList[0] >+ for (SkuName,Sku) in SkuObjList: > Sku.VpdOffset =3D Sku.VpdOffset.strip() > > # Need to iterate DEC pcd information to = get the value & >datumtype > for eachDec in self.PackageList: > for DecPcd in eachDec.Pcds: >-- >2.14.3.windows.1 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel