X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFsp2Pkg%2FTools%2FSplitFspBin.py;fp=IntelFsp2Pkg%2FTools%2FSplitFspBin.py;h=2458231d090d07ae4ca2f7fa0f8a405e819c8ca0;hp=15c8bebee27839731b73daaaadd20d99cd12fd9b;hb=9d73c5608d228413d999f9148ba3012491c1d995;hpb=591b8cb7f3d026d2fa4483c59f3d5fb14be181bf
diff --git a/IntelFsp2Pkg/Tools/SplitFspBin.py b/IntelFsp2Pkg/Tools/SplitFspBin.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 *
"""
-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
"""
CopyRightHeaderFile = """/*
@@ -500,6 +500,8 @@ class FirmwareDevice:
fih = 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 = fsp.Fih
else:
@@ -711,8 +713,6 @@ 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 = fsp.Type
if not nametemplate:
nametemplate = fspfile
@@ -742,11 +742,6 @@ def RebaseFspBin (FspBinary, FspComponent, FspBase, OutputDir, OutputFile):
found = False
for fsp in fd.FspList:
- # Is this FSP 1.x single binary?
- if fsp.Fih.HeaderRevision < 3:
- found = True
- ftype = 'X'
- break
ftype = fsp.Type.lower()
if ftype == fspcomp:
found = True