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 9e313bddbf01e1d3ffe42625ba3008030de1a4f4 Author: buxiasen <buxia...@xiaomi.com> AuthorDate: Fri Apr 25 18:06:04 2025 +0800 arch/arm/goldfish: copy mmu table when SMP As out current design, each cpu manage task mmu table by insert and erase like-behavior for arm32, have to per-cpu mmu-table when kernel build. Signed-off-by: buxiasen <buxia...@xiaomi.com> --- arch/arm/src/goldfish/goldfish_boot.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/src/goldfish/goldfish_boot.c b/arch/arm/src/goldfish/goldfish_boot.c index ff2d2c4735..233451394c 100644 --- a/arch/arm/src/goldfish/goldfish_boot.c +++ b/arch/arm/src/goldfish/goldfish_boot.c @@ -109,6 +109,14 @@ int up_cpu_start(int cpu) sched_note_cpu_start(this_task(), cpu); #endif +#ifdef CONFIG_ARCH_ADDRENV + /* Copy cpu0 page table to target cpu. */ + + memcpy((uint32_t *)(PGTABLE_BASE_VADDR + PGTABLE_SIZE * cpu), + (uint32_t *)PGTABLE_BASE_VADDR, PGTABLE_SIZE); + UP_DSB(); +#endif + return psci_cpu_on(cpu, (uintptr_t)__start); } #endif