Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libkvm Steal the variable VM_* stuff from m68k.



details:   https://anonhg.NetBSD.org/src/rev/a91241d278f6
branches:  trunk
changeset: 512759:a91241d278f6
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jul 16 05:45:52 2001 +0000

description:
Steal the variable VM_* stuff from m68k.

diffstat:

 lib/libkvm/kvm_arm.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (45 lines):

diff -r 5a7e3b040260 -r a91241d278f6 lib/libkvm/kvm_arm.c
--- a/lib/libkvm/kvm_arm.c      Mon Jul 16 05:43:32 2001 +0000
+++ b/lib/libkvm/kvm_arm.c      Mon Jul 16 05:45:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kvm_arm.c,v 1.1 2001/01/08 18:30:03 bjh21 Exp $        */
+/*     $NetBSD: kvm_arm.c,v 1.2 2001/07/16 05:45:52 matt Exp $ */
 
 /*-
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -39,7 +39,7 @@
 
 #include <sys/param.h>
 
-#include <uvm/uvm_extern.h>
+#include <sys/exec.h>
 
 #include <stdlib.h>
 #include <db.h>
@@ -85,16 +85,25 @@
 /*
  * Machine-dependent initialization for ALL open kvm descriptors,
  * not just those for a kernel crash dump.  Some architectures
- * have to deal with these NOT being constants!  (i.e. m68k)
+ * have to deal with these NOT being constants!  (i.e. arm)
  */
 int
 _kvm_mdopen(kd)
        kvm_t   *kd;
 {
+       uintptr_t max_uva;
+       extern struct ps_strings *__ps_strings;
 
+#if 0   /* XXX - These vary across arm machines... */
        kd->usrstack = USRSTACK;
        kd->min_uva = VM_MIN_ADDRESS;
        kd->max_uva = VM_MAXUSER_ADDRESS;
+#endif
+       /* This is somewhat hack-ish, but it works. */
+       max_uva = (uintptr_t) (__ps_strings + 1);
+       kd->usrstack = max_uva;
+       kd->max_uva  = max_uva;
+       kd->min_uva  = 0;
 
        return (0);
 }



Home | Main Index | Thread Index | Old Index