arch: armv7-a: Fix arm_syscall for SYS_pthread_start
Summary: - I noticed that pthread always crashes when started if CONFIG_BUILD_KERNEL=y - This commit fixes this issue Impact: - None Testing: - Tested with sabre-6quad:netknsh (not merged yet) Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
41c95da594
commit
b60b6120de
@ -302,9 +302,9 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
* CSPR = user mode
|
||||
*/
|
||||
|
||||
regs[REG_PC] = regs[REG_R0];
|
||||
regs[REG_R0] = regs[REG_R1];
|
||||
regs[REG_R1] = regs[REG_R2];
|
||||
regs[REG_PC] = regs[REG_R1];
|
||||
regs[REG_R0] = regs[REG_R2];
|
||||
regs[REG_R1] = regs[REG_R3];
|
||||
|
||||
cpsr = regs[REG_CPSR] & ~PSR_MODE_MASK;
|
||||
regs[REG_CPSR] = cpsr | PSR_MODE_USR;
|
||||
|
Loading…
Reference in New Issue
Block a user