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:
Huang Qi 2019-09-12 12:07:16 +00:00 committed by Anas Nashif
commit 19da4ee379

View file

@ -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