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.115, mailfrom: star.zeng@intel.com) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by groups.io with SMTP; Wed, 29 May 2019 08:20:01 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 May 2019 08:20:01 -0700 X-ExtLoop1: 1 Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga006.jf.intel.com with ESMTP; 29 May 2019 08:19:59 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 29 May 2019 08:20:00 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.134]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.10]) with mapi id 14.03.0415.000; Wed, 29 May 2019 23:19:58 +0800 From: "Zeng, Star" 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 binary. Thread-Topic: [PATCH] IntelFsp2Pkg/FspSplitBin.py: Support rebasing 1.x binary. Thread-Index: AQHVFiuxtTJXVWaTlECChk6NNesRgKaCNwlQ Date: Wed, 29 May 2019 15:19:58 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB048310402FAC5D@shsmsx102.ccr.corp.intel.com> References: <20190529143324.15956-1-chasel.chiu@intel.com> In-Reply-To: <20190529143324.15956-1-chasel.chiu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTZiMTdjZWMtNjI1ZC00Y2ZjLWI3ODUtNDQ2YjMxNjVjZGViIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaklpZFU1M1BHODdwR3NjclwveUxDSW8wSkVYRGNqQWJ1anNSUnVlb1licE84XC82dmhya0gwWXE3K1ZaT29qQkREIn0= dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: star.zeng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Shouldn't the SplitFspBinUserManual.md also be updated? Thanks, Star > -----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 binary= . >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1308 >=20 > Support rebasing FSP 1.X binary. >=20 > Test: both FSP 2.X (Kabylake) and FSP 1.X (BroadwellDE) binary > can be rebased successfully. >=20 > 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(-) >=20 > 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 * >=20 > """ > -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 > """ >=20 > CopyRightHeaderFile =3D """/* > @@ -500,8 +500,6 @@ class FirmwareDevice: >=20 > fih =3D None > for fsp in self.FspList: > - if fsp.Fih.HeaderRevision < 3: > - raise Exception("ERROR: FSP 1.x is not supported by this= tool !") > if not fih: > fih =3D fsp.Fih > else: > @@ -713,6 +711,8 @@ def SplitFspBin (fspfile, outdir, nametemplate): > fd.ParseFsp () >=20 > 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): >=20 > 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