Module Name: src Committed By: reinoud Date: Thu Aug 25 19:06:03 UTC 2011
Modified Files: src/sys/arch/usermode/usermode: trap.c Log Message: A trap is now allways asked for RW access... that needs to be fixed but thats later care. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/usermode/usermode/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/usermode/usermode/trap.c diff -u src/sys/arch/usermode/usermode/trap.c:1.5 src/sys/arch/usermode/usermode/trap.c:1.6 --- src/sys/arch/usermode/usermode/trap.c:1.5 Thu Aug 25 15:02:54 2011 +++ src/sys/arch/usermode/usermode/trap.c Thu Aug 25 19:06:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.5 2011/08/25 15:02:54 reinoud Exp $ */ +/* $NetBSD: trap.c,v 1.6 2011/08/25 19:06:03 reinoud Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk <rein...@netbsd.org> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.5 2011/08/25 15:02:54 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.6 2011/08/25 19:06:03 reinoud Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -84,7 +84,7 @@ vaddr_t onfault; int kmem, rv; -printf("trap\n"); + aprint_debug("trap\n"); if ((info->si_signo == SIGSEGV) || (info->si_signo == SIGBUS)) { l = curlwp; p = l->l_proc; @@ -130,8 +130,8 @@ } pcb->pcb_onfault = NULL; - /* XXX atype?? */ -atype = PROT_WRITE; + /* XXX TODO determine atype?? */ +atype = PROT_READ | PROT_WRITE; rv = uvm_fault(vm_map, (vaddr_t) va, atype); pcb->pcb_onfault = (void *) onfault; if (rv) {