Lines Matching +full:qemu +full:- +full:x86
5 # SPDX-License-Identifier: GPL-2.0+
9 # python -m unittest func_test.TestFunctional.testHelp
53 In some cases a 'real' file must be used - these are also supplied in
66 TestFunctional._MakeInputFile('u-boot.bin', U_BOOT_DATA)
67 TestFunctional._MakeInputFile('u-boot.img', U_BOOT_IMG_DATA)
68 TestFunctional._MakeInputFile('spl/u-boot-spl.bin', U_BOOT_SPL_DATA)
72 TestFunctional._MakeInputFile('u-boot.dtb', U_BOOT_DTB_DATA)
73 TestFunctional._MakeInputFile('u-boot-x86-16bit.bin', X86_START16_DATA)
74 TestFunctional._MakeInputFile('u-boot-nodtb.bin', U_BOOT_NODTB_DATA)
81 TestFunctional._MakeInputFile('u-boot', fd.read())
126 options.pager = 'binman-invalid-pager'
139 return self._DoBinman('-p', '-I', self._indir,
140 '-d', self.TestFile(fname))
142 def _SetupDtb(self, fname, outfile='u-boot.dtb'):
143 """Set up a new test device-tree file
171 Raises an assertion failure if binman returns a non-zero exit code.
176 the u-boot-dtb entry. Normally this is not needed and the
186 # Use the compiled test file as the u-boot-dtb input
203 TestFunctional._MakeInputFile('u-boot.dtb', U_BOOT_DTB_DATA)
206 """Helper function which discards the device-tree binary"""
267 result = self._RunBinman('-h')
270 """Test that the full help is displayed with -H"""
271 result = self._RunBinman('-H')
278 """Test that the full help is displayed with -H"""
281 result = self._DoBinman('-H')
287 """Test that the basic help is displayed with -h"""
288 result = self._RunBinman('-h')
296 self._SetupDtb('05_simple.dts', 'sandbox/u-boot.dtb')
297 TestFunctional._MakeInputFile('sandbox/u-boot.bin', U_BOOT_DATA)
298 result = self._DoBinman('-b', 'sandbox')
305 self.assertIn("Must provide a board to process (use -b <board>)",
311 self._RunBinman('-d', 'missing_file')
320 will come from the device-tree compiler (dtc).
323 self._RunBinman('-d', self.TestFile('01_invalid.dts'))
330 self._DoBinman('-d', self.TestFile('02_missing_node.dts'))
335 result = self._RunBinman('-d', self.TestFile('03_empty.dts'))
342 result = self._RunBinman('-d',
345 self.assertIn("Unknown entry type 'not-a-valid-type' in node "
346 "'/binman/not-a-valid-type'", str(e.exception))
383 self.assertIn("Node '/binman/u-boot': Alignment 23 must be a power "
395 # First u-boot
396 self.assertIn('u-boot', entries)
397 entry = entries['u-boot']
401 # Second u-boot, aligned to 16-byte boundary
402 self.assertIn('u-boot-align', entries)
403 entry = entries['u-boot-align']
407 # Third u-boot, size 23 bytes
408 self.assertIn('u-boot-size', entries)
409 entry = entries['u-boot-size']
414 # Fourth u-boot, placed immediate after the above
415 self.assertIn('u-boot-next', entries)
416 entry = entries['u-boot-next']
420 # Fifth u-boot, placed at a fixed position
421 self.assertIn('u-boot-fixed', entries)
422 entry = entries['u-boot-fixed']
438 # First u-boot with padding before and after
439 self.assertIn('u-boot', entries)
440 entry = entries['u-boot']
445 # Second u-boot has an aligned size, but it has no effect
446 self.assertIn('u-boot-align-size-nop', entries)
447 entry = entries['u-boot-align-size-nop']
451 # Third u-boot has an aligned size too
452 self.assertIn('u-boot-align-size', entries)
453 entry = entries['u-boot-align-size']
457 # Fourth u-boot has an aligned end
458 self.assertIn('u-boot-align-end', entries)
459 entry = entries['u-boot-align-end']
463 # Fifth u-boot immediately afterwards
464 self.assertIn('u-boot-align-both', entries)
465 entry = entries['u-boot-align-both']
476 self.assertIn("Node '/binman/u-boot': Alignment 5 must be a power "
483 self.assertIn("Node '/binman/u-boot': Alignment size 55 must be a "
490 self.assertIn("Node '/binman/u-boot': Position 0x5 (5) does not match "
497 self.assertIn("Node '/binman/u-boot': Size 0x5 (5) does not match "
498 "align-size 0x4 (4)", str(e.exception))
504 self.assertIn("Node '/binman/u-boot-align': Position 0x3 (3) overlaps "
505 "with previous entry '/binman/u-boot' ending at 0x4 (4)",
512 self.assertIn("Node '/binman/u-boot': Entry contents size is 0x4 (4) "
543 "align-size 0x8 (8)", str(e.exception))
562 fname = tools.GetOutputFilename('test-name')
566 fname = tools.GetOutputFilename('test-name.xx')
584 self.assertIn("Node '/binman/u-boot-spl': Position 0x0 (0) overlaps "
585 "with previous entry '/binman/u-boot' ending at 0x4 (4)",
589 """Test that a device tree can be added to U-Boot"""
594 """Test that the end-at-4gb property requires a size property"""
598 "using end-at-4gb", str(e.exception))
601 """Test that the end-at-4gb property checks for position boundaries"""
604 self.assertIn("Node '/binman/u-boot': Position 0x0 (0) is outside "
609 """Test that a basic x86 ROM can be created"""
610 data = self._DoReadFile('29_x86-rom.dts')
618 self._DoTestFile('31_x86-rom-me.dts')
619 self.assertIn("Node '/binman/intel-descriptor': Cannot find FD "
625 self._DoTestFile('30_x86-rom-me-no-desc.dts')
626 self.assertIn("Node '/binman/intel-me': No position set with "
627 "pos-unset: should another entry provide this correct "
631 """Test that an x86 ROM with an ME region can be created"""
632 data = self._DoReadFile('31_x86-rom-me.dts')
637 data = self._DoReadFile('32_intel-vga.dts')
641 """Test that an image with an x86 start16 region can be created"""
642 data = self._DoReadFile('33_x86-start16.dts')
646 """Test that x86 microcode can be handled correctly
649 u-boot-nodtb.bin with a microcode pointer inserted at the correct
651 u-boot.dtb with the microcode removed
687 """Test that x86 microcode can be handled correctly
690 u-boot-nodtb.bin with a microcode pointer inserted at the correct
692 u-boot.dtb with the microcode
719 """Test that x86 microcode can be handled correctly with fdt_normal.
724 """Test that u-boot.img can be put in a file"""
732 self.assertIn("Node '/binman/u-boot-dtb-with-ucode': No /microcode "
736 """Test that a missing u-boot-dtb-with-ucode node is detected"""
739 self.assertIn("Node '/binman/u-boot-with-ucode-ptr': Cannot find "
740 "microcode region u-boot-dtb-with-ucode", str(e.exception))
743 """Test that a missing u-boot-ucode node is detected"""
746 self.assertIn("Node '/binman/u-boot-with-ucode-ptr': Cannot find "
747 "microcode region u-boot-ucode", str(e.exception))
750 """Test that a U-Boot binary without the microcode symbol is detected"""
754 TestFunctional._MakeInputFile('u-boot', fd.read())
758 self.assertIn("Node '/binman/u-boot-with-ucode-ptr': Cannot locate "
759 "_dt_ucode_base_size symbol in u-boot", str(e.exception))
764 TestFunctional._MakeInputFile('u-boot', fd.read())
770 self.assertIn("Node '/binman/u-boot-with-ucode-ptr': Microcode "
775 """Test that we can cope with an image without microcode (e.g. qemu)"""
777 TestFunctional._MakeInputFile('u-boot', fd.read())
789 self.assertEqual(chr(0) * (0x200 - used_len), third)
796 "entry 'invalid-entry'", str(e.exception))
800 data = self._DoReadFile('42_intel-fsp.dts')
805 data = self._DoReadFile('43_intel-cmc.dts')