implements halt using WFI if hartid!=0 and multicore
This commit is contained in:
5
env/start.S
vendored
5
env/start.S
vendored
@@ -30,11 +30,14 @@ _start:
|
||||
2:
|
||||
la t0, trap_entry
|
||||
csrw mtvec, t0
|
||||
#ifdef HARTX_WAIT4WFI
|
||||
#if defined(NUM_HARTS) && NUM_HARTS>1
|
||||
/* block other cores until hart 0 has finished initialization */
|
||||
csrr t0, mhartid
|
||||
beqz t0, hart0_init
|
||||
/* enable MSI locally */
|
||||
csrwi mie, 0x8
|
||||
wfi
|
||||
csrw mie, zero
|
||||
j hartx_start
|
||||
hart0_init:
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user