This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit d28c15bd06b7bfdcb268a4239b149222a1c6f5ca Author: buxiasen <buxia...@xiaomi.com> AuthorDate: Fri Apr 25 17:56:30 2025 +0800 arch/arm/qemu: fix mmu not enabled when smp If smp enabled, mmu default disabled in arm_head.S, We have to re-enable it in arm_boot per-chip. Causing knsh-smp failed with user-space memory access Signed-off-by: buxiasen <buxia...@xiaomi.com> --- arch/arm/src/qemu/qemu_boot.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/src/qemu/qemu_boot.c b/arch/arm/src/qemu/qemu_boot.c index f45b980faf..bab72cb119 100644 --- a/arch/arm/src/qemu/qemu_boot.c +++ b/arch/arm/src/qemu/qemu_boot.c @@ -37,6 +37,7 @@ #include "qemu_userspace.h" #include "smp.h" #include "gic.h" +#include "scu.h" #ifdef CONFIG_DEVICE_TREE # include <nuttx/fdt.h> @@ -87,6 +88,12 @@ void arm_boot(void) qemu_setupmappings(); #endif +#ifdef CONFIG_SMP + /* Enable SMP cache coherency for CPU0 */ + + arm_enable_smp(0); +#endif + arm_fpuconfig(); #ifdef CONFIG_ARM_PSCI