more information on machine checks
authorThomas Ferrin <tef@ucbvax.Berkeley.EDU>
Thu, 22 Sep 1988 21:40:13 +0000 (13:40 -0800)
committerThomas Ferrin <tef@ucbvax.Berkeley.EDU>
Thu, 22 Sep 1988 21:40:13 +0000 (13:40 -0800)
SCCS-vsn: sys/vax/vax/ka650.c 7.2
SCCS-vsn: sys/vax/vax/ka650.h 7.2

usr/src/sys/vax/vax/ka650.c
usr/src/sys/vax/vax/ka650.h

index 264c260..ebbf7e0 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)ka650.c     7.1 (Berkeley) %G%
+ *     @(#)ka650.c     7.2 (Berkeley) %G%
  */
 
 #if VAX650
  */
 
 #if VAX650
@@ -15,6 +15,7 @@
 #include "param.h"
 #include "time.h"
 #include "kernel.h"
 #include "param.h"
 #include "time.h"
 #include "kernel.h"
+#include "systm.h"
 
 #include "cpu.h"
 #include "clock.h"
 
 #include "cpu.h"
 #include "clock.h"
@@ -32,6 +33,11 @@ ka650_init()
        ioaccess(KA650_IPCR, KA650IPCRmap, sizeof(ka650ipcr));
        ioaccess(KA650_CACHE, KA650CACHEmap, KA650_CACHESIZE);
        ka650encache();
        ioaccess(KA650_IPCR, KA650IPCRmap, sizeof(ka650ipcr));
        ioaccess(KA650_CACHE, KA650CACHEmap, KA650_CACHESIZE);
        ka650encache();
+       if (ctob(physmem) > ka650merr.merr_qbmbr) {
+               printf("physmem(0x%x) > qbmbr(0x%x)\n",
+                   ctob(physmem), ka650merr.merr_qbmbr);
+               panic("qbus map unprotected");
+       }
 }
 
 ka650_clkstartrt()
 }
 
 ka650_clkstartrt()
@@ -115,11 +121,15 @@ ka650_mchk(cmcf)
        printf("vap %x istate1 %x istate2 %x pc %x psl %x\n",
            mcf->mc65_mrvaddr, mcf->mc65_istate1, mcf->mc65_istate2,
            mcf->mc65_pc, mcf->mc65_psl);
        printf("vap %x istate1 %x istate2 %x pc %x psl %x\n",
            mcf->mc65_mrvaddr, mcf->mc65_istate1, mcf->mc65_istate2,
            mcf->mc65_pc, mcf->mc65_psl);
+       printf("dmaser=0x%b qbear=0x%x dmaear=0x%x\n",
+           ka650merr.merr_dser, DMASER_BITS, ka650merr.merr_qbear,
+           ka650merr.merr_dear);
+       ka650merr.merr_dser = DSER_CLEAR;
 
        i = mfpr(CAER);
        mtpr(CAER, CAER_MCC | CAER_DAT | CAER_TAG);
        if (i & CAER_MCC) {
 
        i = mfpr(CAER);
        mtpr(CAER, CAER_MCC | CAER_DAT | CAER_TAG);
        if (i & CAER_MCC) {
-               printf("cache 1");
+               printf("cache 1 ");
                if (i & CAER_DAT) {
                        printf("data");
                        i = cache1data;
                if (i & CAER_DAT) {
                        printf("data");
                        i = cache1data;
@@ -130,8 +140,7 @@ ka650_mchk(cmcf)
                        i = cache1tag;
                        cache1tag = time.tv_sec;
                }
                        i = cache1tag;
                        cache1tag = time.tv_sec;
                }
-       } else
-           if ((i & CAER_MCD) || (ka650merr.merr_errstat & MEM_CDAL)) {
+       } else if ((i & CAER_MCD) || (ka650merr.merr_errstat & MEM_CDAL)) {
                printf("CDAL");
                i = cdalerr;
                cdalerr = time.tv_sec;
                printf("CDAL");
                i = cdalerr;
                cdalerr = time.tv_sec;
index 3abec03..95c039a 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)ka650.h     7.1 (Berkeley) %G%
+ *     @(#)ka650.h     7.2 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
  */
 #define IS2_VCR                0x00008000      /* VAX Can't Restart flag */
 
  */
 #define IS2_VCR                0x00008000      /* VAX Can't Restart flag */
 
+/*
+ * DMA System Error Register (merr_dser)
+ */
+#define DSER_QNXM      0x00000080      /* Q-22 Bus NXM */
+#define DSER_QPE       0x00000020      /* Q-22 Bus parity Error */
+#define DSER_MEM       0x00000010      /* Main mem err due to ext dev DMA */
+#define DSER_LOST      0x00000008      /* Lost error: DSER <7,5,4,0> set */
+#define DSER_NOGRANT   0x00000004      /* No Grant timeout on cpu demand R/W */
+#define DSER_DNXM      0x00000001      /* DMA NXM */
+#define DSER_CLEAR     (DSER_QNXM | DSER_QPE | DSER_MEM |  \
+                        DSER_LOST | DSER_NOGRANT | DSER_DNXM)
+#define DMASER_BITS \
+"\20\20BHALT\17DCNEG\10QBNXM\6QBPE\5MEMERR\4LOSTERR\3NOGRANT\1DMANXM"
+
 #ifndef LOCORE
 /*
  * Local registers (in I/O space)
 #ifndef LOCORE
 /*
  * Local registers (in I/O space)
@@ -58,17 +72,6 @@ struct ka650_merr {
 };
 #define KA650_MERR     0x20080000
 
 };
 #define KA650_MERR     0x20080000
 
-/*
- * DMA System Error Register (merr_dser)
- */
-#define DSER_QNXM      0x00000080      /* Q-22 Bus NXM */
-#define DSER_QPE       0x00000020      /* Q-22 Bus parity Error */
-#define DSER_MEM       0x00000010      /* Main mem err due to ext dev DMA */
-#define DSER_LOST      0x00000008      /* Lost error: DSER <7,5,4,0> set */
-#define DSER_NOGRANT   0x00000004      /* No Grant timeout on cpu demand R/W */
-#define DSER_DNXM      0x00000001      /* DMA NXM */
-#define DSER_CLEAR     (DSER_QNXM | DSER_QPE | DSER_MEM |  \
-                        DSER_LOST | DSER_NOGRANT | DSER_DNXM)
 /*
  * Main Memory Error Status Register (merr_errstat)
  */
 /*
  * Main Memory Error Status Register (merr_errstat)
  */