From nobody Fri Nov 1 12:29:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1516694465595896.9259916042618; Tue, 23 Jan 2018 00:01:05 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5B9F521D2BEF4; Mon, 22 Jan 2018 23:55:37 -0800 (PST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 0474C2233376C for ; Mon, 22 Jan 2018 23:55:35 -0800 (PST) Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2018 00:01:02 -0800 Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.129]) by fmsmga008.fm.intel.com with ESMTP; 23 Jan 2018 00:01:01 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,400,1511856000"; d="scan'208";a="12462141" From: BobCF To: edk2-devel@lists.01.org Date: Tue, 23 Jan 2018 16:00:59 +0800 Message-Id: <20180123080059.14692-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 Subject: [edk2] [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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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): =20 # Not found, it should be signature if not FoundFlag : # just pick the a value to determine whether i= s unicode string type SkuValueMap =3D {} + SkuObjList =3D DscPcdEntry.SkuInfoList.items() DefaultSku =3D DscPcdEntry.SkuInfoList.get('DE= FAULT') if DefaultSku: - PcdValue =3D DefaultSku.DefaultValue - if PcdValue not in SkuValueMap: - SkuValueMap[PcdValue] =3D [] - VpdFile.Add(DscPcdEntry, 'DEFAULT',Def= aultSku.VpdOffset) - SkuValueMap[PcdValue].append(DefaultSku) - for (SkuName,Sku) in DscPcdEntry.SkuInfoList.i= tems(): + defaultindex =3D SkuObjList.index(('DEFAUL= T',DefaultSku)) + SkuObjList[0],SkuObjList[defaultindex] =3D= SkuObjList[defaultindex],SkuObjList[0] + for (SkuName,Sku) in SkuObjList: Sku.VpdOffset =3D Sku.VpdOffset.strip()=20 =20 # Need to iterate DEC pcd information to g= et the value & datumtype for eachDec in self.PackageList: for DecPcd in eachDec.Pcds: --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel