Question about RISCV cpu_start
Open
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
Since RISCV spec allows WFI to be implemented as a NOP, shouldn't asm("WFI"); be in a while loop, as is commonly done?
https://github.com/apache/nuttx/blob/master/arch/risc-v/src/common/riscv_cpustart.c#L78
```
void riscv_cpu_boot(int cpu)
{
....
/* Enable machine software interrupt for IPI to boot */
up_enable_irq(RISCV_IRQ_SOFT);
/* Wait interrupt */
asm("WFI");
#ifdef CONFIG_BUILD_KERNEL
/* Initialize the per CPU areas */
...
}
```
Contributor guide
Assessment
This issue has not been assessed yet.