summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-06-29 21:28:12 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-06-29 21:28:12 +0000
commitde3823732bf5afd3afd9f14563e9818df599ec58 (patch)
tree43b9dcd928c8ba882aaeeb1e061e5d9e1a90fc4d /sys/arch/sparc/include
parente8b3fae2e0b91ce09d03d15f1cdf27e46f2683fd (diff)
During kernel bootstrap, stop assuming the kernel image has been loaded in
low physical memory, but instead figure out where it has been loaded from the current MMU setup. From NetBSD.
Diffstat (limited to 'sys/arch/sparc/include')
-rw-r--r--sys/arch/sparc/include/autoconf.h15
-rw-r--r--sys/arch/sparc/include/bsd_openprom.h18
2 files changed, 17 insertions, 16 deletions
diff --git a/sys/arch/sparc/include/autoconf.h b/sys/arch/sparc/include/autoconf.h
index af812cebb7f..f3b3088d138 100644
--- a/sys/arch/sparc/include/autoconf.h
+++ b/sys/arch/sparc/include/autoconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.h,v 1.17 2009/07/12 20:07:53 kettenis Exp $ */
+/* $OpenBSD: autoconf.h,v 1.18 2010/06/29 21:28:08 miod Exp $ */
/* $NetBSD: autoconf.h,v 1.20 1997/05/24 20:03:03 pk Exp $ */
/*
@@ -166,19 +166,6 @@ int romprop(struct romaux *ra, const char *name, int node);
*/
char *clockfreq(int freq);
-/*
- * Memory description arrays. Shared between pmap.c and autoconf.c; no
- * one else should use this (except maybe mem.c, e.g., if we fix the VM to
- * handle discontiguous physical memory).
- */
-struct memarr {
- u_int addr;
- u_int len;
-};
-int makememarr(struct memarr *, int max, int which);
-#define MEMARR_AVAILPHYS 0
-#define MEMARR_TOTALPHYS 1
-
/* Pass a string to the FORTH interpreter. May fail silently. */
void rominterpret(char *);
diff --git a/sys/arch/sparc/include/bsd_openprom.h b/sys/arch/sparc/include/bsd_openprom.h
index a14ba5d246b..bc60caf4855 100644
--- a/sys/arch/sparc/include/bsd_openprom.h
+++ b/sys/arch/sparc/include/bsd_openprom.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bsd_openprom.h,v 1.11 2003/11/14 19:05:36 miod Exp $ */
+/* $OpenBSD: bsd_openprom.h,v 1.12 2010/06/29 21:28:08 miod Exp $ */
/* $NetBSD: bsd_openprom.h,v 1.11 1996/05/18 12:27:43 mrg Exp $ */
/*
@@ -254,7 +254,7 @@ struct promvec {
* easily.
*/
void (*pv_setctxt)(int ctxt, caddr_t va, int pmeg);
-#if defined(SUN4M) && defined(notyet)
+#if (defined(SUN4D) || defined(SUN4M)) && defined(notyet)
/*
* The following are V3 ROM functions to handle MP machines in the
* Sun4m series. They have undefined results when run on a uniprocessor!
@@ -320,3 +320,17 @@ __dead void romhalt(void);
__dead void romboot(char *);
extern struct promvec *promvec;
+
+/*
+ * Memory description arrays, matching version 2 memory information layout.
+ * Shared between boot blocks, pmap.c and autoconf.c; no one else should use
+ * this.
+ */
+struct memarr {
+ uint32_t addr_hi;
+ uint32_t addr_lo;
+ uint32_t len;
+};
+int makememarr(struct memarr *, u_int max, int which);
+#define MEMARR_AVAILPHYS 0
+#define MEMARR_TOTALPHYS 1