On 10/28/2026 11:25 AM, Philippe Mathieu-Daudé wrote: > There is no libc for the R5900, so its tests can not run in user > mode [*]. Provide what is needed to run them bare-metal on the > 'none' machine: start-up code, linker script, minimal assert.h, > inttypes.h, stdio.h and string.h, and a gdb script. > > A first generic loader loads the ELF at its physical addresses, a > second one sets the PC to the KSEG0 entry point, sign-extended as the > CPU is 64-bit. Tests end in test_done(), where the gdb script checks > the status and kills QEMU. Tests use 32-bit pointers, so gdb must > send 64-bit addresses to the remote stub. > > No test is registered yet. > > [*] > https://lore.kernel.org/qemu-devel/[email protected]/ > > Inspired-by: Maciej W. Rozycki <[email protected]> > Signed-off-by: Philippe Mathieu-Daudé <[email protected]> > --- > tests/tcg/mips64el/system/include/assert.h | 15 +++++ > tests/tcg/mips64el/system/include/inttypes.h | 7 +++ > tests/tcg/mips64el/system/include/stdio.h | 17 +++++ > tests/tcg/mips64el/system/include/string.h | 16 +++++ > tests/tcg/mips64el/system/harness.c | 66 ++++++++++++++++++++ > tests/tcg/mips64el/meson.build | 2 + > tests/tcg/mips64el/system/boot.S | 23 +++++++ > tests/tcg/mips64el/system/kernel.ld | 43 +++++++++++++ > tests/tcg/mips64el/system/meson.build | 33 ++++++++++ > tests/tcg/mips64el/system/test-r5900.py | 30 +++++++++ > 10 files changed, 252 insertions(+) > create mode 100644 tests/tcg/mips64el/system/include/assert.h > create mode 100644 tests/tcg/mips64el/system/include/inttypes.h > create mode 100644 tests/tcg/mips64el/system/include/stdio.h > create mode 100644 tests/tcg/mips64el/system/include/string.h > create mode 100644 tests/tcg/mips64el/system/harness.c > create mode 100644 tests/tcg/mips64el/system/boot.S > create mode 100644 tests/tcg/mips64el/system/kernel.ld > create mode 100644 tests/tcg/mips64el/system/meson.build > create mode 100644 tests/tcg/mips64el/system/test-r5900.py >
Reviewed-by: Pierrick Bouvier <[email protected]>
