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 Add debug statements in copyin/co...
details: https://anonhg.NetBSD.org/src/rev/c60d11c102b1
branches: trunk
changeset: 768684:c60d11c102b1
user: reinoud <reinoud%NetBSD.org@localhost>
date: Wed Aug 24 20:03:19 2011 +0000
description:
Add debug statements in copyin/copyout
diffstat:
sys/arch/usermode/usermode/copy.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (39 lines):
diff -r 9bce372c3650 -r c60d11c102b1 sys/arch/usermode/usermode/copy.c
--- a/sys/arch/usermode/usermode/copy.c Wed Aug 24 19:59:26 2011 +0000
+++ b/sys/arch/usermode/usermode/copy.c Wed Aug 24 20:03:19 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: copy.c,v 1.2 2009/10/21 16:07:00 snj Exp $ */
+/* $NetBSD: copy.c,v 1.3 2011/08/24 20:03:19 reinoud Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,14 +27,18 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copy.c,v 1.2 2009/10/21 16:07:00 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copy.c,v 1.3 2011/08/24 20:03:19 reinoud Exp $");
#include <sys/types.h>
#include <sys/systm.h>
+#include <sys/param.h> // tmp
+#include <uvm/uvm.h> // tmp
+#include <uvm/uvm_pmap.h> // tmp
int
copyin(const void *uaddr, void *kaddr, size_t len)
{
+printf("copyin uaddr %p, kaddr %p, len %d\n", uaddr, kaddr, (int) len);
memcpy(kaddr, uaddr, len);
return 0;
}
@@ -42,6 +46,9 @@
int
copyout(const void *kaddr, void *uaddr, size_t len)
{
+printf("copyout kaddr %p, uaddr %p, len %d\n", kaddr, uaddr, (int) len);
+printf("curlwp pmap = %p\n", curlwp->l_proc->p_vmspace->vm_map.pmap);
+
memcpy(uaddr, kaddr, len);
return 0;
}
Home |
Main Index |
Thread Index |
Old Index