summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-03-18 20:49:11 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-03-18 20:49:11 +0000
commitbdc242fe7e1afac5de289c044b863316286b9e77 (patch)
treeffba622f608bea815e29189bba714e1c5de1da8d /sys
parent05064983919215c087effa48540019b7f52bf093 (diff)
Prefer KERNBASE to VM_MIN_KERNEL_ADDRESS when testing for an address within
the kernel image or not. No functional change (yet).
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/sparc/db_interface.c4
-rw-r--r--sys/arch/sparc/sparc/db_trace.c5
-rw-r--r--sys/arch/sparc/sparc/locore.s6
3 files changed, 8 insertions, 7 deletions
diff --git a/sys/arch/sparc/sparc/db_interface.c b/sys/arch/sparc/sparc/db_interface.c
index 3affa5f1598..30c40a8d8aa 100644
--- a/sys/arch/sparc/sparc/db_interface.c
+++ b/sys/arch/sparc/sparc/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.14 2014/07/13 12:11:01 jasper Exp $ */
+/* $OpenBSD: db_interface.c,v 1.15 2015/03/18 20:49:10 miod Exp $ */
/* $NetBSD: db_interface.c,v 1.18 1997/09/01 00:16:31 pk Exp $ */
/*
@@ -89,7 +89,7 @@ db_write_bytes(addr, size, data)
dst = (char *)addr;
while (size-- > 0) {
- if (dst >= (char *)VM_MIN_KERNEL_ADDRESS && dst < __data_start)
+ if (dst >= (char *)KERNBASE && dst < __data_start)
pmap_writetext(dst, *data);
else
*dst = *data;
diff --git a/sys/arch/sparc/sparc/db_trace.c b/sys/arch/sparc/sparc/db_trace.c
index ec3de4dba46..f5ed6354608 100644
--- a/sys/arch/sparc/sparc/db_trace.c
+++ b/sys/arch/sparc/sparc/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.7 2015/02/09 09:21:30 miod Exp $ */
+/* $OpenBSD: db_trace.c,v 1.8 2015/03/18 20:49:10 miod Exp $ */
/* $NetBSD: db_trace.c,v 1.9 1997/07/29 09:42:00 fair Exp $ */
/*
@@ -37,6 +37,7 @@
#include <ddb/db_output.h>
#define INKERNEL(va) (((vaddr_t)(va)) >= VM_MIN_KERNEL_ADDRESS)
+#define INKERNELTEXT(va) (((vaddr_t)(va)) >= KERNBASE)
void
db_stack_trace_print(addr, have_addr, count, modif, pr)
@@ -71,7 +72,7 @@ db_stack_trace_print(addr, have_addr, count, modif, pr)
db_addr_t pc;
pc = frame->fr_pc;
- if (!INKERNEL(pc))
+ if (!INKERNELTEXT(pc))
break;
/*
diff --git a/sys/arch/sparc/sparc/locore.s b/sys/arch/sparc/sparc/locore.s
index a57e4ca9764..6dcca8efb8d 100644
--- a/sys/arch/sparc/sparc/locore.s
+++ b/sys/arch/sparc/sparc/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.97 2015/02/09 09:21:30 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.98 2015/03/18 20:49:10 miod Exp $ */
/* $NetBSD: locore.s,v 1.73 1997/09/13 20:36:48 pk Exp $ */
/*
@@ -3680,7 +3680,7 @@ no_3mmu:
/*
* Ok, we have a non-MBus TI Viking, a MicroSparc.
- * In this scenerio, in order to play with the MMU
+ * In this scenario, in order to play with the MMU
* passthrough safely, we need turn off traps, flip
* the AC bit on in the mmu status register, do our
* passthroughs, then restore the mmu reg and %psr
@@ -3765,7 +3765,7 @@ startmap_done:
sethi %hi(_C_LABEL(u0) + PCB_WIM), %g2
st %g1, [%g2 + %lo(_C_LABEL(u0) + PCB_WIM)]
- set VM_MIN_KERNEL_ADDRESS - CCFSZ, %fp ! as if called from user code
+ set KERNBASE - CCFSZ, %fp ! as if called from user code
set estack0 - CCFSZ - 80, %sp ! via syscall(boot_me_up) or somesuch
rd %psr, %l0
wr %l0, PSR_ET, %psr