Skip to content

Commit

Permalink
arch: arm64: Fix the STACK_INIT logic during the reset
Browse files Browse the repository at this point in the history
Each core should init their own stack during the reset when SMP enabled,
but do not touch others. The current init results in each core starting
init the stack from the same address which will break others.

Fix the issue by setting a correct start address.

Signed-off-by: Jaxson Han <[email protected]>
  • Loading branch information
povergoing authored and carlescufi committed May 30, 2023
1 parent 101ae5d commit f03a4ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm64/core/reset.S
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ primary_core:
* so that we don't clobber any data.
*/
#ifdef CONFIG_INIT_STACKS
ldr x0, =(z_interrupt_stacks)
mov_imm x0, CONFIG_ISR_STACK_SIZE
sub x0, sp, x0
sub x9, sp, #8
mov x10, 0xaaaaaaaaaaaaaaaa
stack_init_loop:
Expand Down

0 comments on commit f03a4ce

Please sign in to comment.