From cb83c71628378bc0e295dd71bf6641379fbcdf37 Mon Sep 17 00:00:00 2001 From: rtm Date: Tue, 13 Jun 2006 22:08:20 +0000 Subject: fix some trap bugs --- trap.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'trap.c') diff --git a/trap.c b/trap.c index 9d867fe..ace4c95 100644 --- a/trap.c +++ b/trap.c @@ -12,11 +12,15 @@ extern unsigned vectors[]; /* vectors.S, array of 256 entry point addresses */ extern void trapenter(); extern void trapenter1(); + +int xx; + void tinit() { int i; + xx = 0; for(i = 0; i < 256; i++){ SETGATE(idt[i], 1, SEG_KCODE << 3, vectors[i], 3); } @@ -27,8 +31,10 @@ void trap(struct Trapframe *tf) { /* which process are we running? */ - cprintf("trap %d tf %x\n", tf->tf_trapno, tf); - while(1) - ; + if(xx < 10) + cprintf("%d\n", tf->tf_trapno); + xx++; + //while(1) + //; // XXX probably ought to lgdt on trap return } -- cgit v1.2.3