Fix a typo in system call when fetching parameter from the stack: regs[REG_PC]+4 is the address, not regs[REG_PC+4]
This commit is contained in:
parent
946b916f69
commit
949cc1b20c
@ -407,7 +407,7 @@ int up_svcall(int irq, FAR void *context)
|
||||
* parameter will reside at an offset of 4 from the stack pointer.
|
||||
*/
|
||||
|
||||
regs[REG_R3] = *(uint32_t*)(regs[REG_SP+4]);
|
||||
regs[REG_R3] = *(uint32_t*)(regs[REG_SP]+4);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
@ -378,7 +378,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
* parameter will reside at an offset of 4 from the stack pointer.
|
||||
*/
|
||||
|
||||
regs[REG_R3] = *(uint32_t*)(regs[REG_SP+4]);
|
||||
regs[REG_R3] = *(uint32_t*)(regs[REG_SP]+4);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
@ -407,7 +407,7 @@ int up_svcall(int irq, FAR void *context)
|
||||
* parameter will reside at an offset of 4 from the stack pointer.
|
||||
*/
|
||||
|
||||
regs[REG_R3] = *(uint32_t*)(regs[REG_SP+4]);
|
||||
regs[REG_R3] = *(uint32_t*)(regs[REG_SP]+4);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user