From nobody Fri Nov 1 12:22:34 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 1516678490731839.5951310456574; Mon, 22 Jan 2018 19:34:50 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6FDD62233378F; Mon, 22 Jan 2018 19:29:22 -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 0202F2233378D for ; Mon, 22 Jan 2018 19:29:20 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2018 19:34:47 -0800 Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.129]) by fmsmga006.fm.intel.com with ESMTP; 22 Jan 2018 19:34:46 -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,398,1511856000"; d="scan'208";a="197956915" From: BobCF To: edk2-devel@lists.01.org Date: Tue, 23 Jan 2018 11:34:45 +0800 Message-Id: <20180123033445.13468-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 Subject: [edk2] [Patch] BaseTools: Fixed some small issues 1. The structure pcd default value should use the default value under sku. 2. Incorrect VpdOffset value for those un-used in module Vpd 3. Add a checkpoint for Structure Pcd Name 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: , Cc: Liming Gao 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" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao --- BaseTools/Source/Python/AutoGen/AutoGen.py | 4 ++-- BaseTools/Source/Python/Workspace/DscBuildData.py | 7 +++++-- BaseTools/Source/Python/Workspace/MetaFileParser.py | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/= Python/AutoGen/AutoGen.py index 604d38a4d6..ce8bc64ca5 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -1749,12 +1749,12 @@ class PlatformAutoGen(AutoGen): 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',Sku= .VpdOffset) - SkuValueMap[PcdValue].append(Sku) + VpdFile.Add(DscPcdEntry, 'DEFAULT',Def= aultSku.VpdOffset) + SkuValueMap[PcdValue].append(DefaultSku) for (SkuName,Sku) in DscPcdEntry.SkuInfoList.i= tems(): 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: diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index 60aa4868ed..6e4f8ac390 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1287,12 +1287,15 @@ class DscBuildData(PlatformBuildClassObject): CApp =3D CApp + ' UINT32 OriginalSize;\n' CApp =3D CApp + ' VOID *OriginalPcd;\n' CApp =3D CApp + ' %s *Pcd; // From %s Line %d \n' % (Pc= d.DatumType, Pcd.PkgPath, Pcd.PcdDefineLineNo) CApp =3D CApp + '\n' =20 - Pcd.DefaultValue =3D Pcd.DefaultValue.strip() - PcdDefaultValue =3D StringToArray(Pcd.DefaultValue) + if SkuName in Pcd.SkuInfoList: + DefaultValue =3D Pcd.SkuInfoList[SkuName].DefaultStoreDict= .get(DefaultStoreName,Pcd.SkuInfoList[SkuName].HiiDefaultValue) if Pcd.SkuI= nfoList[SkuName].HiiDefaultValue else Pcd.SkuInfoList[SkuName].DefaultValue + else: + DefaultValue =3D Pcd.DefaultValue + PcdDefaultValue =3D StringToArray(DefaultValue.strip()) =20 InitByteValue +=3D '%s.%s.%s.%s|%s|%s\n' % (SkuName, DefaultSt= oreName, Pcd.TokenSpaceGuidCName, Pcd.TokenCName, Pcd.DatumType, PcdDefault= Value) =20 # # Get current PCD value and size diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTool= s/Source/Python/Workspace/MetaFileParser.py index 7469cd7ab7..f404db7b7a 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1915,10 +1915,13 @@ class DecParser(MetaFileParser): PcdTockens =3D self._CurrentLine.split(TAB_VALUE_SPLIT) PcdNames =3D PcdTockens[0].split(TAB_SPLIT) if len(PcdNames) =3D=3D 2: self._CurrentStructurePcdName =3D "" else: + if self._CurrentStructurePcdName !=3D TAB_SPLIT.join(P= cdNames[:2]): + EdkLogger.error('Parser', FORMAT_INVALID, "Pcd Nam= e does not match: %s and %s " % (self._CurrentStructurePcdName , TAB_SPLIT.= join(PcdNames[:2])), + File=3Dself.MetaFile, Line=3Dself._LineInd= ex + 1) self._ValueList[1] =3D TAB_SPLIT.join(PcdNames[2:]) self._ValueList[2] =3D PcdTockens[1] if not self._CurrentStructurePcdName: TokenList =3D GetSplitValueList(self._CurrentLine, TAB_VALUE_S= PLIT, 1) self._ValueList[0:1] =3D GetSplitValueList(TokenList[0], TAB_S= PLIT) --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel