Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/usermode A trap is now allways asked for R...
details: https://anonhg.NetBSD.org/src/rev/f02309da2108
branches: trunk
changeset: 768739:f02309da2108
user: reinoud <reinoud%NetBSD.org@localhost>
date: Thu Aug 25 19:06:03 2011 +0000
description:
A trap is now allways asked for RW access... that needs to be fixed but thats
later care.
diffstat:
sys/arch/usermode/usermode/trap.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r 36ad2def6b01 -r f02309da2108 sys/arch/usermode/usermode/trap.c
--- a/sys/arch/usermode/usermode/trap.c Thu Aug 25 18:46:01 2011 +0000
+++ b/sys/arch/usermode/usermode/trap.c Thu Aug 25 19:06:03 2011 +0000
@@ -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 <reinoud%netbsd.org@localhost>
@@ -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) {
Home |
Main Index |
Thread Index |
Old Index