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.115; helo=mga14.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 DF525208AE3FC for ; Tue, 19 Feb 2019 01:06:24 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Feb 2019 01:06:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,387,1544515200"; d="scan'208";a="116032338" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga007.jf.intel.com with ESMTP; 19 Feb 2019 01:06:23 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Feb 2019 01:06:23 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Feb 2019 01:06:23 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.102]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.194]) with mapi id 14.03.0415.000; Tue, 19 Feb 2019 17:06:21 +0800 From: "Gao, Liming" To: "Feng, Bob C" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Fixed a bug in Vpd handling Thread-Index: AQHUx29bazO7KzzSeUuspgRygQW3AKXm1eOQ Date: Tue, 19 Feb 2019 09:06:21 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3E16D4@SHSMSX104.ccr.corp.intel.com> References: <20190218094947.38416-1-bob.c.feng@intel.com> In-Reply-To: <20190218094947.38416-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 a bug in Vpd handling X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2019 09:06:25 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Feng, Bob C >Sent: Monday, February 18, 2019 5:50 PM >To: edk2-devel@lists.01.org >Cc: Feng, Bob C ; Gao, Liming >Subject: [Patch] BaseTools: Fixed a bug in Vpd handling > >If there are multiple sku used in a platform and >gEfiMdeModulePkgTokenSpaceGuid.PcdNvStoreDefaultValueBuffer PCD >is used, build will fail. > >This is a regression issue introduced by the commit: >5695877ec8f636bd4ad873ef50eceb9da7a0f382 which only update the >Vpd offset for default SKU but not other SKUs. > >This patch is going to fix this issue. > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Bob Feng >Cc: Liming Gao >--- > BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py >b/BaseTools/Source/Python/AutoGen/AutoGen.py >index 2452ecbcba..8370ee0c93 100644 >--- a/BaseTools/Source/Python/AutoGen/AutoGen.py >+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py >@@ -1686,11 +1686,11 @@ class PlatformAutoGen(AutoGen): > PcdNvStoreDfBuffer =3D [item for item in self._DynamicPcd= List if >item.TokenCName =3D=3D "PcdNvStoreDefaultValueBuffer" and >item.TokenSpaceGuidCName =3D=3D "gEfiMdeModulePkgTokenSpaceGuid"] > if PcdNvStoreDfBuffer: > PcdName,PcdGuid =3D PcdNvStoreDfBuffer[0].TokenCName, >PcdNvStoreDfBuffer[0].TokenSpaceGuidCName > if (PcdName,PcdGuid) in VpdSkuMap: > DefaultSku =3D >PcdNvStoreDfBuffer[0].SkuInfoList.get(TAB_DEFAULT) >- VpdSkuMap[(PcdName,PcdGuid)] =3D >{DefaultSku.DefaultValue:[DefaultSku]} >+ VpdSkuMap[(PcdName,PcdGuid)] =3D >{DefaultSku.DefaultValue:[SkuObj for SkuObj in >PcdNvStoreDfBuffer[0].SkuInfoList.values() ]} > > # Process VPD map file generated by third party BPDG tool > if NeedProcessVpdMapFile: > VpdMapFilePath =3D os.path.join(self.BuildDir, TAB_FV= _DIRECTORY, >"%s.map" % self.Platform.VpdToolGuid) > if os.path.exists(VpdMapFilePath): >-- >2.20.1.windows.1