arch: arm: userspace: fix the incorrect ssf under bad syscall
The parameter ssf of the handler_bad_syscall got null pointer due to that the R1 does not push into the stack in a right order on cortex-M0. Adjust the pushing order of stack to make the ssf being passed correctly. Fixes #50146. Signed-off-by: Enjia Mai <enjia.mai@intel.com>
This commit is contained in:
parent
2829de75d1
commit
d9206aa29b
1 changed files with 1 additions and 1 deletions
|
@ -410,9 +410,9 @@ SECTION_FUNC(TEXT, z_arm_do_syscall)
|
|||
/* BAD SYSCALL path */
|
||||
/* fixup stack frame on the privileged stack, adding ssf */
|
||||
mov r1, sp
|
||||
push {r4,r5}
|
||||
/* ssf is present in r1 (sp) */
|
||||
push {r1,lr}
|
||||
push {r4,r5}
|
||||
/* restore r0, r1 */
|
||||
mov r0, ip
|
||||
mov r1, lr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue