From 73b9bced17e8981fd5d37f6b9a771ca3698e6ce9 Mon Sep 17 00:00:00 2001 From: ENJOU1224 Date: Mon, 5 Jan 2026 18:32:05 +0800 Subject: [PATCH] boards/risc-v: Enable VPU initialization for QEMU RV The riscv_vpuconfig() was defined but never called in qemu_rv_start. This caused mstatus.VS to remain disabled, leading to Illegal Instruction exceptions when the OS attempted to use vector registers. This patch adds the missing initialization call. Signed-off-by: ENJOU1224 --- arch/risc-v/src/qemu-rv/qemu_rv_start.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/risc-v/src/qemu-rv/qemu_rv_start.c b/arch/risc-v/src/qemu-rv/qemu_rv_start.c index 0128ba1d1b2..de4c49a671a 100644 --- a/arch/risc-v/src/qemu-rv/qemu_rv_start.c +++ b/arch/risc-v/src/qemu-rv/qemu_rv_start.c @@ -166,10 +166,12 @@ void qemu_rv_start(int mhartid, const char *dtb) } #endif - /* Configure FPU */ + /* Configure FPU and VPU */ riscv_fpuconfig(); + riscv_vpuconfig(); + if (mhartid > 0) { goto cpux;