Skip to content

Commit

Permalink
qemu: fix smp boot not enter idle
Browse files Browse the repository at this point in the history
Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
   -machine virt,virtualization=on,gic-version=3 \
   -net none -chardev stdio,id=con,mux=on -serial chardev:con \
   -mon chardev=con,mode=readline -kernel ./nuttx

Signed-off-by: hujun5 <[email protected]>
  • Loading branch information
hujun260 committed Sep 16, 2024
1 parent 872208f commit 8a48fba
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions arch/arm/src/qemu/qemu_cpuboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <nuttx/sched.h>
#include <arch/irq.h>

#include "init/init.h"
#include "arm_internal.h"
#include "sctlr.h"
#include "smp.h"
Expand Down Expand Up @@ -159,14 +160,8 @@ void arm_cpu_boot(int cpu)
up_irq_enable();
#endif

/* The next thing that we expect to happen is for logic running on CPU0
* to call up_cpu_start() which generate an SGI and a context switch to
* the configured NuttX IDLE task.
*/
/* Then transfer control to the IDLE task */

for (; ; )
{
asm("WFI");
}
nx_idle_trampoline();
}
#endif /* CONFIG_SMP */

0 comments on commit 8a48fba

Please sign in to comment.