Browse Source

riscv: add more disabled debug prints, turn off a debug print

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 3 years ago
parent
commit
fa0546398c
1 changed files with 5 additions and 3 deletions
  1. 5 3
      sys/src/9/riscv/trap.c

+ 5 - 3
sys/src/9/riscv/trap.c

@@ -429,14 +429,17 @@ _trap(Ureg *ureg)
 	 */
 	switch(ureg->cause){
 	case CAUSE_FAULT_FETCH:
+		if (0) print("FETCH FAULT %p\n", ureg->ip);
 		ureg->ftype = FT_EXEC;
 		machp()->MMU.badaddr = ureg->badaddr;
 		break;
 	case CAUSE_FAULT_LOAD:
+		if (0) print("LOAD FAULT %p\n", ureg->ip);
 		ureg->ftype = FT_READ;
 		machp()->MMU.badaddr = ureg->badaddr;
 		break;
 	case CAUSE_FAULT_STORE:
+		if (0) print("STORE FAULT %p\n", ureg->ip);
 		ureg->ftype = FT_WRITE;
 		machp()->MMU.badaddr = ureg->badaddr;
 		break;
@@ -597,7 +600,6 @@ panic("UNK\n");
 	if(user){
 		if(up && up->procctl || up->nnote)
 			notify(ureg);
-		print("K");
 		kexit(ureg);
 	}
 //print("ALL DONE TRAP\n");
@@ -611,8 +613,8 @@ dumpgpr(Ureg* ureg)
 {
 	Proc *up = externup();
 	if(up != nil)
-		print("cpu%d: registers for %s %d\n",
-			machp()->machno, up->text, up->pid);
+		print("cpu%d: ureg %p, registers for %s %d\n",
+			machp()->machno, ureg, up->text, up->pid);
 	else
 		print("cpu%d: registers for kernel\n", machp()->machno);