summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2000-04-30 15:30:30 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2000-04-30 15:30:30 +0000
commit56642ec16b488ab6857e590bab0f8b86265b495d (patch)
tree197784838079d94a2ca37b27de0335a2e1862215
parentce1a04152cca3e2f8c1f2498863107cf4b3ccdfd (diff)
Fix kernel msgbuf size and position
Ensure ksyms work properly when DDB isn't defined
-rw-r--r--sys/arch/sun3/sun3/sun3_startup.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/arch/sun3/sun3/sun3_startup.c b/sys/arch/sun3/sun3/sun3_startup.c
index 26674e25c34..b7b43ecc114 100644
--- a/sys/arch/sun3/sun3/sun3_startup.c
+++ b/sys/arch/sun3/sun3/sun3_startup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sun3_startup.c,v 1.11 2000/03/02 23:02:14 todd Exp $ */
+/* $OpenBSD: sun3_startup.c,v 1.12 2000/04/30 15:30:29 miod Exp $ */
/* $NetBSD: sun3_startup.c,v 1.55 1996/11/20 18:57:38 gwr Exp $ */
/*-
@@ -66,7 +66,9 @@ extern char kernel_text[];
/* These are defined by the linker */
extern char etext[], edata[], end[];
-char *esym; /* DDB */
+#if (defined(DDB) || NKSYMS > 0) && !defined(SYMTAB_SPACE)
+char *esym;
+#endif
/*
* Globals shared with the pmap code.
@@ -281,7 +283,7 @@ int keep; /* true: steal, false: clear */
}
}
-#if defined(DDB) && !defined(SYMTAB_SPACE)
+#if (defined(DDB) || NKSYMS > 0) && !defined(SYMTAB_SPACE)
/*
* Preserve DDB symbols and strings by setting esym.
*/
@@ -372,12 +374,14 @@ sun3_vm_init(kehp)
* This is just page-aligned for now, so we can allocate
* some special-purpose pages before rounding to a segment.
*/
+#if (defined(DDB) || NKSYMS > 0) && !defined(SYMTAB_SPACE)
esym = end;
-#if defined(DDB) && !defined(SYMTAB_SPACE)
/* This will advance esym past the symbols. */
sun3_save_symtab(kehp);
-#endif
virtual_avail = m68k_round_page(esym);
+#else
+ virtual_avail = m68k_round_page(end);
+#endif
virtual_end = VM_MAX_KERNEL_ADDRESS;
/*
@@ -413,7 +417,7 @@ sun3_vm_init(kehp)
pte |= PG_NC;
set_pte(va, pte);
/* offset by half a page to avoid PROM scribbles */
- msgbufp = (struct msgbuf *)(va + 0x1000);
+ msgbufp = (struct msgbuf *)(va + (NBPG >> 1));
initmsgbuf((caddr_t)msgbufp, round_page(MSGBUFSIZE));
/*