mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Saving all registers in syscall so that return from fork is easier.
Child needs rewound function stack in order to reach registers r9-r12 that have original userspace values. But we jump to return_from_syscall without rewinding the stack. Therefore to ease context restore, we save r9-r12 on the stack as well upon syscall entry.
This commit is contained in:
@@ -33,6 +33,10 @@ typedef struct syscall_context {
|
||||
u32 r6; /* MR3 */
|
||||
u32 r7; /* MR4 */
|
||||
u32 r8; /* MR5 */
|
||||
u32 r9;
|
||||
u32 r10;
|
||||
u32 r11;
|
||||
u32 r12;
|
||||
u32 sp_usr;
|
||||
u32 lr_usr;
|
||||
} __attribute__((__packed__)) syscall_context_t;
|
||||
|
||||
Reference in New Issue
Block a user