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 1f8eb18e1de3fe291b98ad44352677d6e41e15a9
Author: buxiasen <buxia...@xiaomi.com>
AuthorDate: Fri Apr 25 18:11:34 2025 +0800

    arch/arm/goldfish: 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/goldfish/goldfish_boot.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/src/goldfish/goldfish_boot.c 
b/arch/arm/src/goldfish/goldfish_boot.c
index 233451394c..7a7e38afc7 100644
--- a/arch/arm/src/goldfish/goldfish_boot.c
+++ b/arch/arm/src/goldfish/goldfish_boot.c
@@ -33,6 +33,7 @@
 #include "goldfish_memorymap.h"
 #include "smp.h"
 #include "gic.h"
+#include "scu.h"
 
 #ifdef CONFIG_DEVICE_TREE
 #  include <nuttx/fdt.h>
@@ -77,6 +78,12 @@ void arm_boot(void)
 
   goldfish_setupmappings();
 
+#ifdef CONFIG_SMP
+  /* Enable SMP cache coherency for CPU0 */
+
+  arm_enable_smp(0);
+#endif
+
   arm_fpuconfig();
 
 #ifdef CONFIG_ARM_PSCI

Reply via email to