diff --git a/arch/arm64/src/common/arm64_cpustart.c b/arch/arm64/src/common/arm64_cpustart.c index 5aeb600944f78..ef8e7a90bb00c 100644 --- a/arch/arm64/src/common/arm64_cpustart.c +++ b/arch/arm64/src/common/arm64_cpustart.c @@ -210,7 +210,7 @@ int up_cpu_start(int cpu) #ifdef CONFIG_ARM64_SMP_BUSY_WAIT uint32_t *address = (uint32_t *)CONFIG_ARM64_SMP_BUSY_WAIT_FLAG_ADDR; *address = 1; - up_flush_dcache((uintptr_t)address, sizeof(address)); + up_flush_dcache((uintptr_t)address, (uintptr_t)address + sizeof(address)); #endif arm64_start_cpu(cpu); diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig b/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig index 2aa238cb9025a..dd53a940a3097 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig +++ b/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig @@ -14,6 +14,8 @@ CONFIG_ARCH_CHIP_FVP_ARMV8R=y CONFIG_ARCH_CHIP_FVP_R82=y CONFIG_ARCH_EARLY_PRINT=y CONFIG_ARCH_INTERRUPTSTACK=4096 +CONFIG_ARM64_SMP_BUSY_WAIT=y +CONFIG_ARM64_SMP_BUSY_WAIT_FLAG_ADDR=0x60000 CONFIG_ARM64_STRING_FUNCTION=y CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/scripts/dramboot.ld b/boards/arm64/fvp-v8r/fvp-armv8r/scripts/dramboot.ld index 5153f3fb55ae7..1694e722aa5b3 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/scripts/dramboot.ld +++ b/boards/arm64/fvp-v8r/fvp-armv8r/scripts/dramboot.ld @@ -18,6 +18,8 @@ * ****************************************************************************/ +#include + OUTPUT_ARCH(aarch64) ENTRY(__start) @@ -93,6 +95,10 @@ SECTIONS } :text _edata = .; /* End+1 of .data */ +#ifdef CONFIG_SMP + . = CONFIG_ARM64_SMP_BUSY_WAIT_FLAG_ADDR + 4; +#endif + .bss : { /* BSS */ . = ALIGN(8); _sbss = .;