Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 There is no point in trying to tell...
details: https://anonhg.NetBSD.org/src/rev/ea690d1901b5
branches: trunk
changeset: 783669:ea690d1901b5
user: martin <martin%NetBSD.org@localhost>
date: Thu Jan 03 07:51:48 2013 +0000
description:
There is no point in trying to tell userland access from kernel access by
looking at the address on sparc64 - so, let us believe the comment and always
deal with kernel access here.
While there, fix write access to kernel text for bigger kernels.
diffstat:
sys/arch/sparc64/sparc64/db_interface.c | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
diffs (52 lines):
diff -r 3673f2fdc7a2 -r ea690d1901b5 sys/arch/sparc64/sparc64/db_interface.c
--- a/sys/arch/sparc64/sparc64/db_interface.c Wed Jan 02 22:34:05 2013 +0000
+++ b/sys/arch/sparc64/sparc64/db_interface.c Thu Jan 03 07:51:48 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.130 2012/02/18 15:56:30 christos Exp $ */
+/* $NetBSD: db_interface.c,v 1.131 2013/01/03 07:51:48 martin Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.130 2012/02/18 15:56:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.131 2013/01/03 07:51:48 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -358,10 +358,7 @@
src = (char *)(uintptr_t)addr;
while (size-- > 0) {
- if (src >= (char *)VM_MIN_KERNEL_ADDRESS)
- *data++ = probeget((paddr_t)(u_long)src++, ASI_P, 1);
- else
- *data++ = fubyte(src++);
+ *data++ = probeget((paddr_t)(u_long)src++, ASI_P, 1);
}
}
@@ -374,17 +371,16 @@
{
char *dst;
extern paddr_t pmap_kextract(vaddr_t va);
+ extern vaddr_t ektext;
dst = (char *)(uintptr_t)addr;
while (size-- > 0) {
- if ((dst >= (char *)VM_MIN_KERNEL_ADDRESS+0x400000))
- *dst = *data;
- else if ((dst >= (char *)VM_MIN_KERNEL_ADDRESS) &&
- (dst < (char *)VM_MIN_KERNEL_ADDRESS+0x400000))
+ if ((dst >= (char *)VM_MIN_KERNEL_ADDRESS) &&
+ (dst < (char *)ektext))
/* Read Only mapping -- need to do a bypass access */
stba(pmap_kextract((vaddr_t)dst), ASI_PHYS_CACHED, *data);
else
- subyte(dst, *data);
+ *dst = *data;
dst++, data++;
}
Home |
Main Index |
Thread Index |
Old Index