From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: chasel.chiu@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by groups.io with SMTP; Wed, 29 May 2019 18:24:43 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 May 2019 18:24:42 -0700 X-ExtLoop1: 1 Received: from pgsmsx106.gar.corp.intel.com ([10.221.44.98]) by orsmga008.jf.intel.com with ESMTP; 29 May 2019 18:24:40 -0700 Received: from pgsmsx111.gar.corp.intel.com ([169.254.2.3]) by PGSMSX106.gar.corp.intel.com ([169.254.9.239]) with mapi id 14.03.0415.000; Thu, 30 May 2019 09:24:40 +0800 From: "Chiu, Chasel" To: "Zeng, Star" , "devel@edk2.groups.io" CC: "Ma, Maurice" , "Desimone, Nathaniel L" Subject: Re: [PATCH] IntelFsp2Pkg/FspSplitBin.py: Support rebasing 1.x binary. Thread-Topic: [PATCH] IntelFsp2Pkg/FspSplitBin.py: Support rebasing 1.x binary. Thread-Index: AQHVFiuxtTJXVWaTlECChk6NNesRgKaCNwlQgACpbpA= Date: Thu, 30 May 2019 01:24:40 +0000 Message-ID: <3C3EFB470A303B4AB093197B6777CCEC50338652@PGSMSX111.gar.corp.intel.com> References: <20190529143324.15956-1-chasel.chiu@intel.com> <0C09AFA07DD0434D9E2A0C6AEB048310402FAC5D@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB048310402FAC5D@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTZiMTdjZWMtNjI1ZC00Y2ZjLWI3ODUtNDQ2YjMxNjVjZGViIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaklpZFU1M1BHODdwR3NjclwveUxDSW8wSkVYRGNqQWJ1anNSUnVlb1licE84XC82dmhya0gwWXE3K1ZaT29qQkREIn0= x-ctpclassification: CTP_NT x-originating-ip: [172.30.20.205] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yes. I will update the document. Thanks! Chasel > -----Original Message----- > From: Zeng, Star > Sent: Wednesday, May 29, 2019 11:20 PM > To: Chiu, Chasel ; devel@edk2.groups.io > Cc: Ma, Maurice ; Desimone, Nathaniel L > ; Zeng, Star > Subject: RE: [PATCH] IntelFsp2Pkg/FspSplitBin.py: Support rebasing 1.x bi= nary. >=20 > Shouldn't the SplitFspBinUserManual.md also be updated? >=20 >=20 > Thanks, > Star >=20 > > -----Original Message----- > > From: Chiu, Chasel > > Sent: Wednesday, May 29, 2019 10:33 PM > > To: devel@edk2.groups.io > > Cc: Ma, Maurice ; Desimone, Nathaniel L > > ; Zeng, Star > > Subject: [PATCH] IntelFsp2Pkg/FspSplitBin.py: Support rebasing 1.x bina= ry. > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1308 > > > > Support rebasing FSP 1.X binary. > > > > Test: both FSP 2.X (Kabylake) and FSP 1.X (BroadwellDE) binary > > can be rebased successfully. > > > > Cc: Maurice Ma > > Cc: Nate DeSimone > > Cc: Star Zeng > > Signed-off-by: Chasel Chiu > > --- > > IntelFsp2Pkg/Tools/SplitFspBin.py | 21 +++++++++++++-------- > > 1 file changed, 13 insertions(+), 8 deletions(-) > > > > diff --git a/IntelFsp2Pkg/Tools/SplitFspBin.py > > b/IntelFsp2Pkg/Tools/SplitFspBin.py > > index 2458231d09..15c8bebee2 100644 > > --- a/IntelFsp2Pkg/Tools/SplitFspBin.py > > +++ b/IntelFsp2Pkg/Tools/SplitFspBin.py > > @@ -1,6 +1,6 @@ > > ## @ FspTool.py > > # > > -# Copyright (c) 2015 - 2018, Intel Corporation. All rights > > reserved.
> > +# Copyright (c) 2015 - 2019, Intel Corporation. All rights > > +reserved.
> > # SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -14,12 > > +14,12 @@ import argparse > > from ctypes import * > > > > """ > > -This utility supports some operations for Intel FSP 2.0 image. > > +This utility supports some operations for Intel FSP 1.x/2.x image. > > It supports: > > - - Display FSP 2.0 information header > > - - Split FSP 2.0 image into individual FSP-T/M/S/O component > > - - Rebase FSP 2.0 components to a different base address > > - - Generate FSP mapping C header file > > + - Display FSP 1.x/2.x information header > > + - Split FSP 2.x image into individual FSP-T/M/S/O component > > + - Rebase FSP 1.x/2.x components to a different base address > > + - Generate FSP 1.x/2.x mapping C header file > > """ > > > > CopyRightHeaderFile =3D """/* > > @@ -500,8 +500,6 @@ class FirmwareDevice: > > > > fih =3D None > > for fsp in self.FspList: > > - if fsp.Fih.HeaderRevision < 3: > > - raise Exception("ERROR: FSP 1.x is not supported by th= is tool !") > > if not fih: > > fih =3D fsp.Fih > > else: > > @@ -713,6 +711,8 @@ def SplitFspBin (fspfile, outdir, nametemplate): > > fd.ParseFsp () > > > > for fsp in fd.FspList: > > + if fsp.Fih.HeaderRevision < 3: > > + raise Exception("ERROR: FSP 1.x is not supported by the > > + split command !") > > ftype =3D fsp.Type > > if not nametemplate: > > nametemplate =3D fspfile > > @@ -742,6 +742,11 @@ def RebaseFspBin (FspBinary, FspComponent, > > FspBase, OutputDir, OutputFile): > > > > found =3D False > > for fsp in fd.FspList: > > + # Is this FSP 1.x single binary? > > + if fsp.Fih.HeaderRevision < 3: > > + found =3D True > > + ftype =3D 'X' > > + break > > ftype =3D fsp.Type.lower() > > if ftype =3D=3D fspcomp: > > found =3D True > > -- > > 2.13.3.windows.1