This is an automated email from the ASF dual-hosted git repository.
ligd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 7e02f08a831 arm64: fix stack pointer initialization when
CONFIG_STACK_COLORATION disabled
7e02f08a831 is described below
commit 7e02f08a831b629c79bbeb23c7bb8c60c43136df
Author: hujun5 <[email protected]>
AuthorDate: Sun Apr 27 13:11:57 2025 +0800
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 <[email protected]>
---
arch/arm64/src/common/arm64_head.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/src/common/arm64_head.S
b/arch/arm64/src/common/arm64_head.S
index d521d2a6e06..de4d7132453 100644
--- a/arch/arm64/src/common/arm64_head.S
+++ b/arch/arm64/src/common/arm64_head.S
@@ -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 */