mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 23:28:29 +08:00
arm64: fix stack pointer initialization when CONFIG_STACK_COLORATION disabled
Add else clause to advance stack pointer (x24) by SMP_STACK_SIZE when CONFIG_STACK_COLORATION is not defined in ARM64 boot code. Ensures each CPU's stack is properly skipped in multi-core initialization even when stack coloration/validation is disabled, preventing stack corruption from overlapping CPU stacks. Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
@@ -179,6 +179,8 @@ real_start:
|
||||
str w2, [x24], #4
|
||||
cmp w1, #0
|
||||
bne .loop
|
||||
# else
|
||||
add x24, x24, #(SMP_STACK_SIZE)
|
||||
# endif
|
||||
|
||||
/* Initialize percpu reg tpidr_el1 */
|
||||
|
||||
Reference in New Issue
Block a user