Skip to content

Commit

Permalink
arch/arm64 Fix the SP unalignment issues
Browse files Browse the repository at this point in the history
zynq-mpsoc and zcu111 borad was broken by #15437, because #15437 changes
ARM64_CONTEXT_REGS from 36 to 37, resulting in the stack no longer being
16-byte aligned which appears to violate the ARMv8-A architecture's
requirement for 16-byte stack alignment. this commit changes ARM64_CONTEXT_REGS
to 38 to fix this issues.
  • Loading branch information
zouboan authored and anchao committed Feb 4, 2025
1 parent 4f6940c commit 586b9c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm64/include/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@
#define REG_SP_EL0 (34)
#define REG_EXE_DEPTH (35)
#define REG_SCTLR_EL1 (36)
#define REG_RESERVED (37)

/* In Armv8-A Architecture, the stack must align with 16 byte */

#define ARM64_CONTEXT_REGS (37)
#define ARM64_CONTEXT_REGS (38)
#define ARM64_CONTEXT_SIZE (8 * ARM64_CONTEXT_REGS)

#ifdef CONFIG_ARCH_FPU
Expand Down

0 comments on commit 586b9c5

Please sign in to comment.