The code for handling the messages buffer wasn't up to date in the 2.7
source. Access to /kern/msgbuf would hang the system and dmesg would
just fail with illegal address. This patch fixes both problems.

Apply by doing:
       cd /usr/src
       patch -p0 < 020_pmax_msgbuf.patch

And then rebuild your kernel.

Index: sys/arch/pmax/include/param.h
===================================================================
RCS file: /cvs/src/sys/arch/pmax/include/param.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sys/arch/pmax/include/param.h       1997/06/10 14:19:01     1.8
+++ sys/arch/pmax/include/param.h       2000/07/04 05:46:23     1.9
@@ -1,3 +1,4 @@
+/*     $OpenBSD: param.h,v 1.9 2000/07/04 05:46:23 maja Exp $  */
/*     $NetBSD: param.h,v 1.18 1997/02/26 01:45:41 jonathan Exp $      */

/*
@@ -104,6 +105,8 @@
#define        NMBCLUSTERS     1024            /* map size, max cluster allocation */
#endif
#endif
+
+#define MSGBUFSIZE     NBPG

#ifdef _KERNEL
#ifndef _LOCORE
Index: sys/arch/pmax/pmax/machdep.c
===================================================================
RCS file: /cvs/src/sys/arch/pmax/pmax/machdep.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- sys/arch/pmax/pmax/machdep.c        2000/03/23 09:59:55     1.23
+++ sys/arch/pmax/pmax/machdep.c        2000/07/04 05:46:23     1.24
@@ -1,3 +1,4 @@
+/*     $OpenBSD: machdep.c,v 1.24 2000/07/04 05:46:23 maja Exp $       */
/*     $NetBSD: machdep.c,v 1.67 1996/10/23 20:04:40 mhitch Exp $      */

/*
@@ -147,7 +148,6 @@
#else
int    bufpages = 0;
#endif
-int    msgbufmapped = 0;       /* set when safe to use msgbuf */
int    maxmem;                 /* max memory per process */
int    physmem;                /* max supported memory, changes to actual */
int    physmem_boardmax;       /* {model,simm}-specific bound on physmem */
@@ -678,10 +678,10 @@
       /*
        * Initialize error message buffer (at end of core).
        */
-       maxmem -= btoc(sizeof (struct msgbuf));
+       maxmem -= btoc(MSGBUFSIZE);
       msgbufp = (struct msgbuf *)(MIPS_PHYS_TO_KSEG0(maxmem << PGSHIFT));
-       msgbufmapped = 1;
-
+       initmsgbuf((caddr_t)msgbufp, round_page(MSGBUFSIZE));
+
       /*
        * Allocate space for system data structures.
        * The first available kernel virtual address is in "v".
@@ -792,6 +792,11 @@
       pmapdebug = 0;
#endif

+       for (i = 0; i < btoc(MSGBUFSIZE); i++)
+               pmap_enter(pmap_kernel(), (vm_offset_t)msgbufp,
+                   maxmem + i * NBPG, VM_PROT_READ|VM_PROT_WRITE, TRUE,
+                   VM_PROT_READ|VM_PROT_WRITE);
+
       /*
        * Good {morning,afternoon,evening,night}.
        */
@@ -1195,6 +1200,7 @@
dumpsys()
{
       int error;
+       extern int msgbufmapped;

       /* Save registers. */
       savectx((struct user *)&dumppcb, 0);
Index: sys/arch/pmax/pmax/mem.c
===================================================================
RCS file: /cvs/src/sys/arch/pmax/pmax/mem.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sys/arch/pmax/pmax/mem.c    1999/11/22 19:22:01     1.8
+++ sys/arch/pmax/pmax/mem.c    2000/07/04 05:46:23     1.9
@@ -1,3 +1,4 @@
+/*     $OpenBSD: mem.c,v 1.9 2000/07/04 05:46:23 maja Exp $    */
/*     $NetBSD: mem.c,v 1.7 1995/09/29 21:53:29 jonathan Exp $ */

/*
@@ -129,8 +130,9 @@
                       c = min(iov->iov_len, MAXPHYS);
                       if (v < MIPS_KSEG0_START)
                               return (EFAULT);
-                       if (v + c > MIPS_PHYS_TO_KSEG0(avail_end +
-                                                       sizeof (struct msgbuf)) &&
+                       if (v + c > MIPS_PHYS_TO_KSEG0(avail_end) &&
+                          !((caddr_t)v >= (caddr_t)msgbufp &&
+                            (caddr_t)v <  (caddr_t)msgbufp+MSGBUFSIZE) &&
                           (v < MIPS_KSEG2_START ||
                           !kernacc((caddr_t)v, c,
                           uio->uio_rw == UIO_READ ? B_READ : B_WRITE)))