The new program counter should go into the trapframe's srr0 and
not the link register, which was lucky enough to work.
This commit is contained in:
parent
159cd5c64f
commit
44d1098779
@ -113,7 +113,7 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...)
|
||||
* Use caller-saved regs 14/15 to hold params that _ctx_start
|
||||
* will use to invoke the user-supplied func
|
||||
*/
|
||||
mc->mc_lr = (uint32_t) _ctx_start;
|
||||
mc->mc_srr0 = (uint32_t) _ctx_start;
|
||||
mc->mc_gpr[1] = (uint32_t) sp; /* new stack pointer */
|
||||
mc->mc_gpr[14] = (uint32_t) start; /* r14 <- start */
|
||||
mc->mc_gpr[15] = (uint32_t) ucp; /* r15 <- ucp */
|
||||
|
Loading…
x
Reference in New Issue
Block a user