On 8/4/26 07:32, Thomas Weißschuh wrote:
Add a basic configuration to run kunit tests on microblaze.
Signed-off-by: Thomas Weißschuh <[email protected]>
---
tools/testing/kunit/qemu_configs/microblaze.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tools/testing/kunit/qemu_configs/microblaze.py
b/tools/testing/kunit/qemu_configs/microblaze.py
new file mode 100644
index 000000000000..ff012095e77d
--- /dev/null
+++ b/tools/testing/kunit/qemu_configs/microblaze.py
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0-only
+from ..qemu_config import QemuArchParams
+
+QEMU_ARCH = QemuArchParams(linux_arch='microblaze',
+ kconfig='''
+CONFIG_CPU_BIG_ENDIAN=y
Big endian is quite old and I am even surprised that it is working.
+CONFIG_SERIAL_UARTLITE=y
+CONFIG_SERIAL_UARTLITE_CONSOLE=y
I think it is just pure luck that this worked for you because you didn't rewrite
the most important parts of config.
You should define at least these values
CONFIG_KERNEL_BASE_ADDR=0x90000000
CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
CONFIG_XILINX_MICROBLAZE0_USE_DIV=0
CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1
CONFIG_XILINX_MICROBLAZE0_USE_FPU=0
to be aligned with s3adsp1800
It will solve these two issues too.
ERROR: Microblaze BARREL, MSR, PCMP or DIV-different for kernel and DTS
ERROR: Microblaze HW_MUL-different for kernel and DTS
+CONFIG_MB_POWER_OFF_THROUGH_UNALIGNED_PC=y
+''',
+ qemu_arch='microblaze',
+
kernel_path='arch/microblaze/boot/linux.bin',
+
kernel_command_line='kunit_shutdown=poweroff',
+ extra_qemu_params=[
+ '-M',
'petalogix-s3adsp1800',
+ ],
+)
That's bring us to different topic. When qemu runs I see these 2 issues
qemu-system-microblaze: -accel kvm: invalid accelerator kvm
qemu-system-microblaze: -accel hvf: invalid accelerator hvf
I don't have any issue if you want to wire big-endian version but would be more
useful to wire little endian version.
If there is an issue with memmove implementation I can't see any issue to
disable that options to let it pass from the beginning and solve it separately.
This should be fragment for Little endian.
[linux](next)$ cat tools/testing/kunit/qemu_configs/microblazeel.py
# SPDX-License-Identifier: GPL-2.0-only
from ..qemu_config import QemuArchParams
QEMU_ARCH = QemuArchParams(linux_arch='microblaze',
kconfig='''
CONFIG_KERNEL_BASE_ADDR=0x50000000
CONFIG_XILINX_MICROBLAZE0_FAMILY="virtex5"
CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
CONFIG_XILINX_MICROBLAZE0_USE_DIV=1
CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2
CONFIG_XILINX_MICROBLAZE0_USE_FPU=1
CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_16550A_VARIANTS=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_MB_POWER_OFF_THROUGH_UNALIGNED_PC=y
''',
qemu_arch='microblazeel',
kernel_path='arch/microblaze/boot/linux.bin',
kernel_command_line='kunit_shutdown=poweroff',
extra_qemu_params=[
'-M', 'petalogix-ml605',
],
)
Thanks,
Michal