M power/dat.h => power/dat.h +1 -0
@@ 100,6 100,7 @@ struct Mach
int lastpid; /* last pid allocated on this machine */
Proc *pidproc[NTLBPID]; /* process that owns this tlbpid on this mach */
Page *ufreeme; /* address of upage of exited process */
+ Ureg *ur;
int tlbfault; /* this offset known in l.s/utlbmiss() */
int tlbpurge;
M power/debugger.c => power/debugger.c +11 -3
@@ 4,6 4,7 @@
#include "dat.h"
#include "fns.h"
#include "io.h"
+#include "ureg.h"
IOQ dkbdq;
IOQ dprintq;
@@ 133,6 134,7 @@ printinfo(void)
Mach *mp;
Proc *p;
Page *pg;
+ Ureg *ur;
ulong l;
int i;
@@ 141,8 143,8 @@ printinfo(void)
continue;
mp = (void*)(MACHADDR+i*BY2PG);
l = (ulong)(mp->proc);
- dprint("mach[%d]->proc/ %lux\r\n", i, l);
- dprint("mach[%d]->splpc/ %lux\r\n", i, mp->splpc);
+ dprint("mach[%d] proc/%lux\r\n", i, l);
+ dprint("mach[%d] splpc/%lux\r\n", i, mp->splpc);
if(l & KZERO){
p = (Proc*)l;
@@ 150,9 152,15 @@ printinfo(void)
if(l & KZERO){
pg = (Page*)l;
l = pg->pa;
- dprint("mach[%d]->proc->upage->pa/ %lux\r\n", i, l);
+ dprint("mach[%d] proc->upage->pa/%lux\r\n", i, l);
}
}
+ l = (ulong)(mp->ur);
+ dprint("mach[%d] ur/%lux", i, l);
+ ur = (Ureg*)l;
+ dprint(" &status/%lux &cause/%lux &sp/%lux &pc/%lux",
+ &ur->status, &ur->cause, &ur->sp, &ur->pc);
+ dprint("\r\n");
}
}
M power/trap.c => power/trap.c +2 -0
@@ 72,6 72,8 @@ trap(Ureg *ur)
int user, cop, x, fpchk;
char buf[2*ERRLEN], buf1[ERRLEN], *fpexcep;
+m->ur = ur;
+
ecode = (ur->cause>>2)&0xf;
user = ur->status&KUP;
if(user)