From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ml01.01.org (Postfix) with ESMTP id A8DE81A1E13 for ; Tue, 2 Aug 2016 02:31:52 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 02 Aug 2016 02:31:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,459,1464678000"; d="scan'208";a="1006879510" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga001.jf.intel.com with ESMTP; 02 Aug 2016 02:31:52 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 2 Aug 2016 02:31:51 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 2 Aug 2016 02:31:51 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.150]) with mapi id 14.03.0248.002; Tue, 2 Aug 2016 17:31:49 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Keep the Pcd order in the Asbuilt Inf is same with Source Thread-Index: AQHR5xY29D2ioFkFhUWhWPoM1+qDJqA1cx/A Date: Tue, 2 Aug 2016 09:31:48 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155E43F4@shsmsx102.ccr.corp.intel.com> References: <1469521061-72696-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1469521061-72696-1-git-send-email-yonghong.zhu@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: Keep the Pcd order in the Asbuilt Inf is same with Source X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2016 09:31:52 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Zhu, Yonghong > Sent: Tuesday, July 26, 2016 4:18 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [Patch] BaseTools: Keep the Pcd order in the Asbuilt Inf is same= with > Source >=20 > The original behavior is that in the Asbuilt inf Pcd's order is base on > the Pcd's offset. Now we change the order to keep it is same with the Pcd > order in the source inf file. >=20 > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/AutoGen/AutoGen.py | 20 +++++++++++--------- > 1 file changed, 11 insertions(+), 9 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py > b/BaseTools/Source/Python/AutoGen/AutoGen.py > index 8da441f..9758861 100644 > --- a/BaseTools/Source/Python/AutoGen/AutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py > @@ -3571,17 +3571,17 @@ class ModuleAutoGen(AutoGen): > ### TODO: How to handles mixed source and binary modules >=20 > # Find all DynamicEx and PatchableInModule PCDs used by this mod= ule > and dependent libraries > # Also find all packages that the DynamicEx PCDs depend on > Pcds =3D [] > - PatchablePcds =3D {} > + PatchablePcds =3D [] > Packages =3D [] > PcdCheckList =3D [] > PcdTokenSpaceList =3D [] > for Pcd in self.ModulePcdList + self.LibraryPcdList: > if Pcd.Type =3D=3D TAB_PCDS_PATCHABLE_IN_MODULE: > - PatchablePcds[Pcd.TokenCName] =3D Pcd > + PatchablePcds +=3D [Pcd] > PcdCheckList.append((Pcd.TokenCName, > Pcd.TokenSpaceGuidCName, 'PatchableInModule')) > elif Pcd.Type in GenC.gDynamicExPcd: > if Pcd not in Pcds: > Pcds +=3D [Pcd] > PcdCheckList.append((Pcd.TokenCName, > Pcd.TokenSpaceGuidCName, 'DynamicEx')) > @@ -3730,19 +3730,21 @@ class ModuleAutoGen(AutoGen): > PatchList =3D parsePcdInfoFromMapFile( > os.path.join(self.OutputDir, self.Name + '.m= ap'), > os.path.join(self.OutputDir, self.Name + '.e= fi') > ) > if PatchList: > - for PatchPcd in PatchList: > - if PatchPcd[0] in PatchablePcds: > - key =3D PatchPcd[0] > - elif PatchPcd[0] + '_PatchableInModule' in PatchablePcds= : > - key =3D PatchPcd[0] + '_PatchableInModule' > + for Pcd in PatchablePcds: > + TokenCName =3D Pcd.TokenCName > + for PcdItem in GlobalData.MixedPcd: > + if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in > GlobalData.MixedPcd[PcdItem]: > + TokenCName =3D PcdItem[0] > + break > + for PatchPcd in PatchList: > + if TokenCName =3D=3D PatchPcd[0]: > + break > else: > continue > - Pcd =3D PatchablePcds[key] > - TokenCName =3D PatchPcd[0] > PcdValue =3D '' > if Pcd.DatumType !=3D 'VOID*': > HexFormat =3D '0x%02x' > if Pcd.DatumType =3D=3D 'UINT16': > HexFormat =3D '0x%04x' > -- > 2.6.1.windows.1