## @ 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
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
\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
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
\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