summaryrefslogtreecommitdiff
path: root/tools/binman/ftest.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-08-24 07:23:07 -0600
committerSimon Glass <sjg@chromium.org>2019-10-15 08:40:02 -0600
commitea0fff929b3e5337c5fcc61c8123659de81eff4f (patch)
treea8251335dae3f875d8a1fbf13293268bd56544df /tools/binman/ftest.py
parentb87064c2496785dde9e33fcdf84175d64163db57 (diff)
binman: Add support for Intel FSP meminit
The Intel FSP supports initialising memory early during boot using a binary blob called 'fspm'. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r--tools/binman/ftest.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 6d59fa4874e..481f0dd21a1 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -72,6 +72,7 @@ FILES_DATA = (b"sorry I'm late\nOh, don't bother apologising, I'm " +
b"sorry you're alive\n")
COMPRESS_DATA = b'compress xxxxxxxxxxxxxxxxxxxxxx data'
REFCODE_DATA = b'refcode'
+FSP_M_DATA = b'fsp_m'
# The expected size for the device tree in some tests
EXTRACT_DTB_SIZE = 0x3c9
@@ -147,6 +148,7 @@ class TestFunctional(unittest.TestCase):
TestFunctional._MakeInputDir('devkeys')
TestFunctional._MakeInputFile('bmpblk.bin', BMPBLK_DATA)
TestFunctional._MakeInputFile('refcode.bin', REFCODE_DATA)
+ TestFunctional._MakeInputFile('fsp_m.bin', FSP_M_DATA)
cls._elf_testdir = os.path.join(cls._indir, 'elftest')
elf_test.BuildElfTestFiles(cls._elf_testdir)
@@ -3327,6 +3329,12 @@ class TestFunctional(unittest.TestCase):
data = self._DoReadFile('151_x86_rom_ifwi_section.dts')
self._CheckIfwi(data)
+ def testPackFspM(self):
+ """Test that an image with a FSP memory-init binary can be created"""
+ data = self._DoReadFile('152_intel_fsp_m.dts')
+ self.assertEqual(FSP_M_DATA, data[:len(FSP_M_DATA)])
+
+
if __name__ == "__main__":
unittest.main()