arch: riscv: Add simple wrokaround to boot multicore system
Just boot master core, halt others Signed-off-by: Huang Qi <757509347@qq.com>
This commit is contained in:
parent
e85407db41
commit
19da4ee379
1 changed files with 10 additions and 0 deletions
|
@ -31,6 +31,16 @@ SECTION_FUNC(reset, __reset)
|
||||||
* the C domain
|
* the C domain
|
||||||
*/
|
*/
|
||||||
SECTION_FUNC(TEXT, __initialize)
|
SECTION_FUNC(TEXT, __initialize)
|
||||||
|
/*
|
||||||
|
* This will boot master core, just halt other cores.
|
||||||
|
* Note: need to be updated for complete SMP support
|
||||||
|
*/
|
||||||
|
csrr a0, mhartid
|
||||||
|
beqz a0, boot_master_core
|
||||||
|
wfi
|
||||||
|
|
||||||
|
boot_master_core:
|
||||||
|
|
||||||
#ifdef CONFIG_INIT_STACKS
|
#ifdef CONFIG_INIT_STACKS
|
||||||
/* Pre-populate all bytes in _interrupt_stack with 0xAA */
|
/* Pre-populate all bytes in _interrupt_stack with 0xAA */
|
||||||
la t0, _interrupt_stack
|
la t0, _interrupt_stack
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue