pass Ureg* argument to note handler in R0 register on arm
userspace note handlers, like any function, expect ther first argument in R0 register on arm.
This commit is contained in:
parent
12bb7bcfff
commit
35c9648ee1
4 changed files with 9 additions and 0 deletions
|
@ -78,6 +78,7 @@ noted(Ureg* cur, uintptr arg0)
|
|||
nf->arg0 = &nf->ureg;
|
||||
nf->ip = 0;
|
||||
cur->sp = PTR2UINT(nf);
|
||||
cur->r0 = PTR2UINT(nf->arg0);
|
||||
break;
|
||||
default:
|
||||
up->lastnote.flag = NDebug;
|
||||
|
@ -163,6 +164,8 @@ notify(Ureg* ureg)
|
|||
|
||||
ureg->sp = sp;
|
||||
ureg->pc = PTR2UINT(up->notify);
|
||||
ureg->r0 = PTR2UINT(nf->arg0);
|
||||
|
||||
up->notified = 1;
|
||||
up->nnote--;
|
||||
memmove(&up->lastnote, &up->note[0], sizeof(Note));
|
||||
|
|
|
@ -78,6 +78,7 @@ noted(Ureg* cur, uintptr arg0)
|
|||
nf->arg0 = &nf->ureg;
|
||||
nf->ip = 0;
|
||||
cur->sp = PTR2UINT(nf);
|
||||
cur->r0 = PTR2UINT(nf->arg0);
|
||||
break;
|
||||
default:
|
||||
up->lastnote.flag = NDebug;
|
||||
|
@ -163,6 +164,8 @@ notify(Ureg* ureg)
|
|||
|
||||
ureg->sp = sp;
|
||||
ureg->pc = PTR2UINT(up->notify);
|
||||
ureg->r0 = PTR2UINT(nf->arg0);
|
||||
|
||||
up->notified = 1;
|
||||
up->nnote--;
|
||||
memmove(&up->lastnote, &up->note[0], sizeof(Note));
|
||||
|
|
|
@ -84,6 +84,7 @@ noted(Ureg* cur, uintptr arg0)
|
|||
nf->arg0 = &nf->ureg;
|
||||
nf->ip = 0;
|
||||
cur->sp = PTR2UINT(nf);
|
||||
cur->r0 = PTR2UINT(nf->arg0);
|
||||
break;
|
||||
default:
|
||||
up->lastnote.flag = NDebug;
|
||||
|
@ -169,6 +170,7 @@ notify(Ureg* ureg)
|
|||
|
||||
ureg->sp = sp;
|
||||
ureg->pc = PTR2UINT(up->notify);
|
||||
ureg->r0 = PTR2UINT(nf->arg0);
|
||||
|
||||
up->notified = 1;
|
||||
up->nnote--;
|
||||
|
|
|
@ -423,6 +423,7 @@ noted(Ureg *ureg, ulong arg0)
|
|||
sp = oureg - 4 * BY2WD - ERRMAX;
|
||||
splhi();
|
||||
ureg->sp = sp;
|
||||
ureg->r0 = (uintptr) oureg;
|
||||
((ulong *) sp)[1] = oureg;
|
||||
((ulong *) sp)[0] = 0;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue