Guard several more abort information printf() calls with the

verbose_faults variable in the prefetch abort handler.
Remove a lurking spltty() just before a panic in the prefetch abort
handler.
This commit is contained in:
mark 1998-04-19 23:25:49 +00:00
parent 05a669badb
commit 7c57681a0b
1 changed files with 11 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fault.c,v 1.20 1998/04/19 23:18:45 mark Exp $ */ /* $NetBSD: fault.c,v 1.21 1998/04/19 23:25:49 mark Exp $ */
/* /*
* Copyright (c) 1994-1997 Mark Brinicombe. * Copyright (c) 1994-1997 Mark Brinicombe.
@ -802,8 +802,10 @@ prefetch_abort_handler(frame)
fault_code |= FAULT_USER; fault_code |= FAULT_USER;
p->p_md.md_regs = frame; p->p_md.md_regs = frame;
} else { } else {
/* All the kernel code pages are loaded at boot and do not get paged */ /*
s = spltty(); * All the kernel code pages are loaded at boot time
* and do not get paged
*/
printf("Prefetch address = %08x\n", frame->tf_pc); printf("Prefetch address = %08x\n", frame->tf_pc);
panic("Prefetch abort in non-USR mode (frame=%p)\n", frame); panic("Prefetch abort in non-USR mode (frame=%p)\n", frame);
} }
@ -817,6 +819,7 @@ prefetch_abort_handler(frame)
#endif #endif
/* Ok validate the address, can only execute in USER space */ /* Ok validate the address, can only execute in USER space */
if (fault_pc < VM_MIN_ADDRESS || fault_pc >= VM_MAXUSER_ADDRESS) { if (fault_pc < VM_MIN_ADDRESS || fault_pc >= VM_MAXUSER_ADDRESS) {
if (verbose_faults)
printf("prefetch: pc (%08x) not in user process space\n", printf("prefetch: pc (%08x) not in user process space\n",
fault_pc); fault_pc);
trapsignal(p, SIGSEGV, fault_pc); trapsignal(p, SIGSEGV, fault_pc);
@ -843,7 +846,8 @@ prefetch_abort_handler(frame)
/* Ok read the fault address. This will fault the page in for us */ /* Ok read the fault address. This will fault the page in for us */
if (fetchuserword(fault_pc, &fault_instruction) != 0) { if (fetchuserword(fault_pc, &fault_instruction) != 0) {
printf("prefetch: faultin failed for address %08x!!\n", if (verbose_faults)
printf("prefetch: faultin failed for address %08x\n",
fault_pc); fault_pc);
trapsignal(p, SIGSEGV, fault_pc); trapsignal(p, SIGSEGV, fault_pc);
} else { } else {