mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 10:46:28 +08:00
riscv/cpustart: Ensure we receive Soft IRQ / IPI before booting CPU
Some spurious interrupt might wake WFI, ensure we got woken by IPI before continuing CPU boot.
This commit is contained in:
@@ -77,7 +77,11 @@ void riscv_cpu_boot(int cpu)
|
||||
|
||||
/* Wait interrupt */
|
||||
|
||||
asm("WFI");
|
||||
do
|
||||
{
|
||||
asm("WFI");
|
||||
}
|
||||
while (READ_CSR(CSR_IP) != IP_SIP);
|
||||
|
||||
#ifdef CONFIG_RISCV_PERCPU_SCRATCH
|
||||
/* Initialize the per CPU areas */
|
||||
|
||||
Reference in New Issue
Block a user