From nobody Mon Dec 23 14:01:57 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 1516676590849253.6519162881399; Mon, 22 Jan 2018 19:03:10 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 994DA22333789; Mon, 22 Jan 2018 18:57:42 -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 8F9152233376C for ; Mon, 22 Jan 2018 18:57:41 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2018 19:03:07 -0800 Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.129]) by FMSMGA003.fm.intel.com with ESMTP; 22 Jan 2018 19:03:07 -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="21797637" From: BobCF To: edk2-devel@lists.01.org Date: Tue, 23 Jan 2018 11:03:05 +0800 Message-Id: <20180123030305.10300-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 Subject: [edk2] [Patch] BaseTools: Add comments for the Structure Pcd definition in PcdValueInit.c file 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 Reviewed-by: Liming Gao --- BaseTools/Source/Python/Workspace/BuildClassObject.py | 4 ++++ BaseTools/Source/Python/Workspace/DecBuildData.py | 2 ++ BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTo= ols/Source/Python/Workspace/BuildClassObject.py index 0e3081cfc5..8d02e78b27 100644 --- a/BaseTools/Source/Python/Workspace/BuildClassObject.py +++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py @@ -117,10 +117,12 @@ class StructurePcd(PcdClassObject): self.DefaultValues =3D collections.OrderedDict({}) self.PcdMode =3D None self.SkuOverrideValues =3D collections.OrderedDict({}) self.FlexibleFieldName =3D None self.StructName =3D None + self.PcdDefineLineNo =3D 0 + self.PkgPath =3D "" def __repr__(self): return self.TypeName =20 def AddDefaultValue (self, FieldName, Value, FileName=3D"", LineNo=3D0= ): if FieldName in self.DefaultValues: @@ -169,10 +171,12 @@ class StructurePcd(PcdClassObject): self.PcdMode =3D PcdObject.PcdMode if PcdObject.PcdMode else s= elf.PcdMode self.DefaultFromDSC=3DNone self.SkuOverrideValues =3D PcdObject.SkuOverrideValues if PcdO= bject.SkuOverrideValues else self.SkuOverrideValues self.FlexibleFieldName =3D PcdObject.FlexibleFieldName if PcdO= bject.FlexibleFieldName else self.FlexibleFieldName self.StructName =3D PcdObject.DatumType if PcdObject.DatumType= else self.StructName + self.PcdDefineLineNo =3D PcdObject.PcdDefineLineNo if PcdObjec= t.PcdDefineLineNo else self.PcdDefineLineNo + self.PkgPath =3D PcdObject.PkgPath if PcdObject.PkgPath else s= elf.PkgPath =20 ## LibraryClassObject # # This Class defines LibraryClassObject used in BuildDatabase # diff --git a/BaseTools/Source/Python/Workspace/DecBuildData.py b/BaseTools/= Source/Python/Workspace/DecBuildData.py index 13fb8686b6..2fd3820dcc 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -381,10 +381,12 @@ class DecBuildData(PackageBuildClassObject): dep_pkgs.append(item.DefaultValue) elif item.DatumType =3D=3D item.TokenCName: struct_pcd.copy(item) struct_pcd.TokenValue =3D struct_pcd.TokenValue.strip(= "{").strip() struct_pcd.TokenSpaceGuidCName, struct_pcd.TokenCName = =3D pcdname.split(".") + struct_pcd.PcdDefineLineNo =3D LineNo + struct_pcd.PkgPath =3D self.MetaFile.File else: struct_pcd.AddDefaultValue(item.TokenCName, item.Defau= ltValue,self.MetaFile.File,LineNo) =20 struct_pcd.PackageDecs =3D dep_pkgs =20 diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index b042c4306a..60aa4868ed 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1284,11 +1284,11 @@ class DscBuildData(PlatformBuildClassObject): CApp =3D CApp + ' UINT32 Size;\n' CApp =3D CApp + ' UINT32 FieldSize;\n' CApp =3D CApp + ' CHAR8 *Value;\n' CApp =3D CApp + ' UINT32 OriginalSize;\n' CApp =3D CApp + ' VOID *OriginalPcd;\n' - CApp =3D CApp + ' %s *Pcd;\n' % (Pcd.DatumType) + 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) =20 --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel