From nobody Mon Apr 29 16:26:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+41714+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+41714+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1559286540; cv=none; d=zoho.com; s=zohoarc; b=okfWGeytLLIsgx9dX/o+AEaFgHDwj9HKJCaDECDOwYQY5tvg/fcaUSHeLG3PmlWRF9E9px4ci8QkBIlwQ7B0JX4MQ+780sB0c0frh+6+YM2Aam74dFfjgQMuOjCqXKEblCOXEnFQkzpCG0fPFQC1PvlWqzxdsgxkacueID0ZAh4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559286540; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=cFNXhHgcy9pxASCGv4SwAmIqeNXLYUGLRlDQL0V37Ys=; b=CogTMFZ2k3pa0QURvC79FKKrx6uFQpyec/amGZYzDMA8fHCH+J7Bu9CidSYDBtWk/CeK29hFfRQ8Kurz1so5zpoyR7rJOWoe7qh5D9f29q07PcPJOPrrFA+h6gDWvzDW4qHDOARseXz2ZA6FCio+9L5emZAaThFmyRcGe3tkgt4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+41714+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1559286540216770.9534773720845; Fri, 31 May 2019 00:09:00 -0700 (PDT) Return-Path: X-Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Fri, 31 May 2019 00:08:59 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 May 2019 00:08:58 -0700 X-ExtLoop1: 1 X-Received: from cchiu4-mobl1.gar.corp.intel.com ([10.5.240.72]) by orsmga003.jf.intel.com with ESMTP; 31 May 2019 00:08:57 -0700 From: "Chiu, Chasel" To: devel@edk2.groups.io Cc: Liming Gao Subject: [edk2-devel] [PATCH] IntelFsp2Pkg/SplitFspBin.py: Revert FSP 1.x support. Date: Fri, 31 May 2019 15:08:54 +0800 Message-Id: <20190531070854.2892-1-chasel.chiu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,chasel.chiu@intel.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1559286539; bh=qo+nORGGLNlYK8VV3rGGjT/IeRdQF3khPDBhPy+Cn34=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=D7HKkC59noy3pCOa8zNtUW234oi9A2C/KtpAHWY7LSqEpuLG3YkNxdQAEqmQB1X3jV0 ANH9/2tcCInM+E0AIVQS3bfcv7siWgEx0EeYLdkhl+pZ+j8Dw8wIKkhmwDKjcOrtUxkHz vj3Ellsi7h0bxMsLAhKktl2DNodos05VSYc= X-ZohoMail-DKIM: pass (identity @groups.io) This reverts commit: 591b8cb7f3d026d2fa4483c59f3d5fb14be181bf. Will submit again after freeze done. Cc: Liming Gao Signed-off-by: Chasel Chiu Reviewed-by: Liming Gao Reviewed-by: Nate DeSimone --- IntelFsp2Pkg/Tools/SplitFspBin.py | 21 ++++++++-----= -------- IntelFsp2Pkg/Tools/UserManuals/SplitFspBinUserManual.md | 47 +++++++++++++= +++++++++------------------------- 2 files changed, 30 insertions(+), 38 deletions(-) diff --git a/IntelFsp2Pkg/Tools/SplitFspBin.py b/IntelFsp2Pkg/Tools/SplitFs= pBin.py index 15c8bebee2..2458231d09 100644 --- a/IntelFsp2Pkg/Tools/SplitFspBin.py +++ b/IntelFsp2Pkg/Tools/SplitFspBin.py @@ -1,6 +1,6 @@ ## @ FspTool.py # -# Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2015 - 2018, 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 1.x/2.x image. +This utility supports some operations for Intel FSP 2.0 image. It supports: - - 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 + - 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 """ =20 CopyRightHeaderFile =3D """/* @@ -500,6 +500,8 @@ 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 t= ool !") if not fih: fih =3D fsp.Fih else: @@ -711,8 +713,6 @@ 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,11 +742,6 @@ def RebaseFspBin (FspBinary, FspComponent, FspBase, Ou= tputDir, 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 diff --git a/IntelFsp2Pkg/Tools/UserManuals/SplitFspBinUserManual.md b/Inte= lFsp2Pkg/Tools/UserManuals/SplitFspBinUserManual.md index 06d87bbb2e..064e0ac845 100644 --- a/IntelFsp2Pkg/Tools/UserManuals/SplitFspBinUserManual.md +++ b/IntelFsp2Pkg/Tools/UserManuals/SplitFspBinUserManual.md @@ -1,71 +1,68 @@ -# SplitFspBin.py is a python script to support some operations on Intel FS= P 1.x/2.x image. +# SplitFspBin.py is a python script to support some operations on Intel FS= P 2.0 image. =20 It supports: =20 -- Split Intel FSP 2.x image into individual FSP-T/M/S/O component +- Split Intel FSP 2.0 image into individual FSP-T/M/S/O component =20 -- Rebase Intel FSP 1.x/2.x components to different base addresses +- Rebase Intel FSP 2.0 components to different base addresses =20 -- Generate Intel FSP 1.x/2.x C header file +- Generate Intel FSP 2.0 C header file =20 -- Display Intel FSP 1.x/2.x information header for each FSP component +- Display Intel FSP 2.0 information header for each FSP component =20 -## Split Intel FSP 2.x image +## Split Intel FSP 2.0 image =20 -FSP 1.x image is not supported by split command. -To split individual FSP component in Intel FSP 2.x image, the following +To split individual FSP component in Intel FSP 2.0 image, the following command can be used: =20 **python SplitFspBin.py split [-h] -f FSPBINARY [-o OUTPUTDIR] [-n NAME= TEMPLATE]** =20 -For example: +For example: =20 =20 `python SplitFspBin.py split -f FSP.bin` =20 It will create FSP_T.bin, FSP_M.bin and FSP_S.bin in current directory. =20 -## Rebase Intel FSP 1.x/2.x components +## Rebase Intel FSP 2.0 components =20 -To rebase one or multiple FSP components in Intel FSP 1.x/2.x image, the f= ollowing +To rebase one or multiple FSP components in Intel FSP 2.0 image, the follo= wing command can be used: =20 **python SplitFspBin.py rebase [-h] -f FSPBINARY -c {t,m,s,o} [{t,m,s,o= } ...] -b FSPBASE [FSPBASE ...] [-o OUTPUTDIR] [-n OUTPUTFILE]** =20 -For example: +For example: =20 =20 - `python SplitFspBin.py rebase -f FSP.bin -c t -b 0xFFF00000 -n FSP_new.= bin` + `python SplitFspBin.py rebase -f FSP.bin =E2=80=93c t =E2=80=93b 0xFFF0= 0000 =E2=80=93n FSP_new.bin` =20 It will rebase FSP-T component inside FSP.bin to new base 0xFFF00000 an= d save the - rebased Intel FSP 2.x image into file FSP_new.bin. - For FSP 1.x image there is only one component in binary so above comman= d also - works for FSP 1.x image. + rebased Intel FSP 2.0 image into file FSP_new.bin. =20 - `python SplitFspBin.py rebase -f FSP.bin -c t m -b 0xFFF00000 0xFEF8000= 0 -n FSP_new.bin` + `python SplitFspBin.py rebase -f FSP.bin =E2=80=93c t m =E2=80=93b 0xFF= F00000 0xFEF80000 =E2=80=93n FSP_new.bin` =20 It will rebase FSP-T and FSP-M components inside FSP.bin to new base 0x= FFF00000 - and 0xFEF80000 respectively, and save the rebased Intel FSP 2.x image i= nto file + and 0xFEF80000 respectively, and save the rebased Intel FSP 2.0 image i= nto file=20 FSP_new.bin file. =20 -## Generate Intel FSP 1.x/2.x C header file +## Generate Intel FSP 2.0 C header file =20 -To generate Intel FSP 1.x/2.x C header file, the following command can be = used: +To generate Intel FSP 2.0 C header file, the following command can be used: =20 **Python SplitFspBin.py genhdr [-h] -f FSPBINARY [-o OUTPUTDIR] [-n HFI= LENAME]** =20 -For example: +For example: =20 =20 - `python SplitFspBin.py genhdr -f FSP.bin -n FSP.h` + `python SplitFspBin.py genhdr -f FSP.bin =E2=80=93n FSP.h` =20 It will create the C header file FSP.h containing the image ID, revisio= n, offset and size for each individual FSP component. =20 -## Display Intel FSP 1.x/2.x information header +## Display Intel FSP 2.0 information header =20 -To display Intel FSP 1.x/2.x information headers, the following command ca= n be used: +To display Intel FSP 2.0 information headers, the following command can be= used: =20 **Python SplitFspBin.py info [-h] -f FSPBINARY** =20 -For example: +For example: =20 =20 `python SplitFspBin.py info -f FSP.bin` =20 --=20 2.13.3.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#41714): https://edk2.groups.io/g/devel/message/41714 Mute This Topic: https://groups.io/mt/31877953/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-