]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFsp2Pkg/Tools/SplitFspBin.py
IntelFsp2Pkg/SplitFspBin.py: Revert FSP 1.x support.
[mirror_edk2.git] / IntelFsp2Pkg / Tools / SplitFspBin.py
index 15c8bebee27839731b73daaaadd20d99cd12fd9b..2458231d090d07ae4ca2f7fa0f8a405e819c8ca0 100644 (file)
@@ -1,6 +1,6 @@
 ## @ FspTool.py\r
 #\r
-# Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
 ##\r
@@ -14,12 +14,12 @@ import argparse
 from   ctypes import *\r
 \r
 """\r
-This utility supports some operations for Intel FSP 1.x/2.x image.\r
+This utility supports some operations for Intel FSP 2.0 image.\r
 It supports:\r
-    - Display FSP 1.x/2.x information header\r
-    - Split FSP 2.x image into individual FSP-T/M/S/O component\r
-    - Rebase FSP 1.x/2.x components to a different base address\r
-    - Generate FSP 1.x/2.x mapping C header file\r
+    - Display FSP 2.0 information header\r
+    - Split FSP 2.0 image into individual FSP-T/M/S/O component\r
+    - Rebase FSP 2.0 components to a different base address\r
+    - Generate FSP mapping C header file\r
 """\r
 \r
 CopyRightHeaderFile = """/*\r
@@ -500,6 +500,8 @@ class FirmwareDevice:
 \r
         fih = None\r
         for fsp in self.FspList:\r
+            if fsp.Fih.HeaderRevision < 3:\r
+                raise Exception("ERROR: FSP 1.x is not supported by this tool !")\r
             if not fih:\r
                 fih = fsp.Fih\r
             else:\r
@@ -711,8 +713,6 @@ def SplitFspBin (fspfile, outdir, nametemplate):
     fd.ParseFsp ()\r
 \r
     for fsp in fd.FspList:\r
-        if fsp.Fih.HeaderRevision < 3:\r
-            raise Exception("ERROR: FSP 1.x is not supported by the split command !")\r
         ftype = fsp.Type\r
         if not nametemplate:\r
             nametemplate = fspfile\r
@@ -742,11 +742,6 @@ def RebaseFspBin (FspBinary, FspComponent, FspBase, OutputDir, OutputFile):
 \r
         found = False\r
         for fsp in fd.FspList:\r
-            # Is this FSP 1.x single binary?\r
-            if fsp.Fih.HeaderRevision < 3:\r
-                found = True\r
-                ftype = 'X'\r
-                break\r
             ftype = fsp.Type.lower()\r
             if ftype == fspcomp:\r
                 found = True\r