summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/binman/ftest.py10
-rw-r--r--tools/binman/test/48_x86-start16-spl.dts13
2 files changed, 22 insertions, 1 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 4e6aaad9d6..c381a70031 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -34,6 +34,7 @@ ME_DATA = '0abcd'
VGA_DATA = 'vga'
U_BOOT_DTB_DATA = 'udtb'
X86_START16_DATA = 'start16'
+X86_START16_SPL_DATA = 'start16spl'
U_BOOT_NODTB_DATA = 'nodtb with microcode pointer somewhere in here'
FSP_DATA = 'fsp'
CMC_DATA = 'cmc'
@@ -74,6 +75,8 @@ class TestFunctional(unittest.TestCase):
TestFunctional._MakeInputFile('vga.bin', VGA_DATA)
TestFunctional._MakeInputFile('u-boot.dtb', U_BOOT_DTB_DATA)
TestFunctional._MakeInputFile('u-boot-x86-16bit.bin', X86_START16_DATA)
+ TestFunctional._MakeInputFile('spl/u-boot-x86-16bit-spl.bin',
+ X86_START16_SPL_DATA)
TestFunctional._MakeInputFile('u-boot-nodtb.bin', U_BOOT_NODTB_DATA)
TestFunctional._MakeInputFile('fsp.bin', FSP_DATA)
TestFunctional._MakeInputFile('cmc.bin', CMC_DATA)
@@ -677,7 +680,7 @@ class TestFunctional(unittest.TestCase):
# Check that the microcode appears immediately after the Fdt
# This matches the concatenation of the data properties in
- # the /microcode/update@xxx nodes in x86_ucode.dts.
+ # the /microcode/update@xxx nodes in 34_x86_ucode.dts.
ucode_data = struct.pack('>4L', 0x12345678, 0x12345679, 0xabcd0000,
0x78235609)
self.assertEqual(ucode_data, third[:len(ucode_data)])
@@ -823,6 +826,11 @@ class TestFunctional(unittest.TestCase):
data = self._DoReadFile('47_spl_bss_pad.dts')
self.assertEqual(U_BOOT_SPL_DATA + (chr(0) * 10) + U_BOOT_DATA, data)
+ def testPackStart16Spl(self):
+ """Test that an image with an x86 start16 region can be created"""
+ data = self._DoReadFile('48_x86-start16-spl.dts')
+ self.assertEqual(X86_START16_SPL_DATA, data[:len(X86_START16_SPL_DATA)])
+
if __name__ == "__main__":
unittest.main()
diff --git a/tools/binman/test/48_x86-start16-spl.dts b/tools/binman/test/48_x86-start16-spl.dts
new file mode 100644
index 0000000000..e2009f15f0
--- /dev/null
+++ b/tools/binman/test/48_x86-start16-spl.dts
@@ -0,0 +1,13 @@
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ size = <16>;
+
+ x86-start16-spl {
+ };
+ };
+};