Skip to content

Commit

Permalink
arm64: fix fvp smp faild to boot
Browse files Browse the repository at this point in the history
reason:
we should give a busy wait addr

This commit fixes the regression from #13640

Signed-off-by: hujun5 <[email protected]>
  • Loading branch information
hujun260 committed Oct 23, 2024
1 parent eb72279 commit 11f3441
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/src/common/arm64_cpustart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions boards/arm64/fvp-v8r/fvp-armv8r/scripts/dramboot.ld
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*
****************************************************************************/

#include <nuttx/config.h>

OUTPUT_ARCH(aarch64)

ENTRY(__start)
Expand Down Expand Up @@ -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 = .;
Expand Down

0 comments on commit 11f3441

Please sign in to comment.