summaryrefslogtreecommitdiff
path: root/sys/arch/hp300
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-02-22 19:28:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-02-22 19:28:07 +0000
commit5c30cd4260474e303da4723e994e5d93cdcd0483 (patch)
tree61d9e1faf865b66dc174709d28f179d33902c927 /sys/arch/hp300
parentf19a9cdec2be86dd535b2a0effa37f4a51e6f4f1 (diff)
enlarge msgbuf, somewhat line netbsd did
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r--sys/arch/hp300/hp300/machdep.c8
-rw-r--r--sys/arch/hp300/hp300/pmap_bootstrap.c7
-rw-r--r--sys/arch/hp300/include/param.h4
3 files changed, 10 insertions, 9 deletions
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index 323c8fd9cab..170b07c5137 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.38 1999/09/03 18:00:41 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.39 2000/02/22 19:27:46 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.94 1997/06/12 15:46:29 mrg Exp $ */
/*
@@ -133,7 +133,6 @@ int bufpages = BUFPAGES;
#else
int bufpages = 0;
#endif
-int msgbufmapped; /* set when safe to use msgbuf */
int maxmem; /* max memory per process */
int physmem = MAXMEM; /* max supported memory, changes to actual */
/*
@@ -247,11 +246,11 @@ cpu_startup()
* Initialize error message buffer (at end of core).
* avail_end was pre-decremented in pmap_bootstrap to compensate.
*/
- for (i = 0; i < btoc(sizeof (struct msgbuf)); i++)
+ for (i = 0; i < btoc(MSGBUFSIZE); i++)
pmap_enter(pmap_kernel(), (vm_offset_t)msgbufp,
avail_end + i * NBPG, VM_PROT_READ|VM_PROT_WRITE, TRUE,
VM_PROT_READ|VM_PROT_WRITE);
- msgbufmapped = 1;
+ initmsgbuf((caddr_t)msgbufp, round_page(MSGBUFSIZE));
/*
* Good {morning,afternoon,evening,night}.
@@ -889,6 +888,7 @@ dumpsys()
cpu_kcore_hdr_t *chdr_p;
char dump_hdr[dbtob(1)]; /* XXX assume hdr fits in 1 block */
#endif /* HP300_NEWKVM */
+ extern int msgbufmapped;
/* XXX initialized here because of gcc lossage */
maddr = lowram;
diff --git a/sys/arch/hp300/hp300/pmap_bootstrap.c b/sys/arch/hp300/hp300/pmap_bootstrap.c
index 26227b80ae9..5d06ae30f1b 100644
--- a/sys/arch/hp300/hp300/pmap_bootstrap.c
+++ b/sys/arch/hp300/hp300/pmap_bootstrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_bootstrap.c,v 1.6 1998/03/07 12:41:33 deraadt Exp $ */
+/* $OpenBSD: pmap_bootstrap.c,v 1.7 2000/02/22 19:27:46 deraadt Exp $ */
/* $NetBSD: pmap_bootstrap.c,v 1.13 1997/06/10 18:56:50 veego Exp $ */
/*
@@ -85,7 +85,6 @@ void pmap_bootstrap __P((vm_offset_t, vm_offset_t));
* msgbufp: kernel message buffer
*/
caddr_t CADDR1, CADDR2, vmmap, ledbase;
-struct msgbuf *msgbufp;
/*
* Bootstrap the VM system.
@@ -438,7 +437,7 @@ pmap_bootstrap(nextpa, firstpa)
*/
RELOC(avail_start, vm_offset_t) = nextpa;
RELOC(avail_end, vm_offset_t) = m68k_ptob(RELOC(maxmem, int)) -
- (m68k_round_page(sizeof(struct msgbuf)) + m68k_ptob(1));
+ (m68k_round_page(MSGBUFSIZE) + m68k_ptob(1));
RELOC(mem_size, vm_size_t) = m68k_ptob(RELOC(physmem, int));
RELOC(virtual_avail, vm_offset_t) =
VM_MIN_KERNEL_ADDRESS + (nextpa - firstpa);
@@ -525,7 +524,7 @@ pmap_bootstrap(nextpa, firstpa)
RELOC(ledbase, caddr_t) = (caddr_t)va;
va += NBPG;
RELOC(msgbufp, struct msgbuf *) = (struct msgbuf *)va;
- va += NBPG;
+ va += MSGBUFSIZE;
RELOC(virtual_avail, vm_offset_t) = va;
}
}
diff --git a/sys/arch/hp300/include/param.h b/sys/arch/hp300/include/param.h
index a81227f6093..69eaaed41a8 100644
--- a/sys/arch/hp300/include/param.h
+++ b/sys/arch/hp300/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.9 1997/07/13 09:48:02 downsj Exp $ */
+/* $OpenBSD: param.h,v 1.10 2000/02/22 19:27:46 deraadt Exp $ */
/* $NetBSD: param.h,v 1.35 1997/07/10 08:22:38 veego Exp $ */
/*
@@ -77,6 +77,8 @@
# define NKMEMCLUSTERS (2048 * 1024 / CLBYTES)
#endif
+#define MSGBUFSIZE 4096
+
#if defined(_KERNEL) && !defined(_LOCORE)
#define delay(us) _delay((us) << 8)
#define DELAY(us) delay(us)