diff options
| author | Shell <[email protected]> | 2024-04-11 00:02:49 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-11 00:02:49 +0800 |
| commit | b14e0c08e1e540a4634fb493a44be95ba679c0d5 (patch) | |
| tree | 114e445e0a750ce14ba865c08ee54a7ab33f459e /libcpu/aarch64/common/stack.c | |
| parent | 48f83a5416abae7a00bda5848a8385b5c43b4101 (diff) | |
[bsp/rpi4] fixup startup failure (#8754)
[bsp/rpi4] fixup startup issues
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'libcpu/aarch64/common/stack.c')
| -rw-r--r-- | libcpu/aarch64/common/stack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcpu/aarch64/common/stack.c b/libcpu/aarch64/common/stack.c index 18d6271a79..c554ab077d 100644 --- a/libcpu/aarch64/common/stack.c +++ b/libcpu/aarch64/common/stack.c @@ -31,7 +31,8 @@ rt_uint8_t *rt_hw_stack_init(void *tentry, void *parameter, { rt_ubase_t *stk; - stk = (rt_ubase_t *)stack_addr; + /* The AAPCS64 requires 128-bit (16 byte) stack alignment */ + stk = (rt_ubase_t*)RT_ALIGN_DOWN((rt_ubase_t)stack_addr, 16); for (int i = 0; i < 32; ++i) { |
