RW flag right (maybe use symbolic defn's?)
SCCS-vsn: sys/vax/vax/cons.h 6.3
SCCS-vsn: sys/vax/vax/locore.s 6.32
SCCS-vsn: sys/vax/vax/machdep.c 6.22
* 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.
*
- * @(#)cons.h 6.2 (Berkeley) %G%
+ * @(#)cons.h 6.3 (Berkeley) %G%
#define TXCS_IE 0x00000040 /* transmitter interrupt enable */
#define TXCS_RDY 0x00000080 /* transmitter ready for next char */
#define TXCS_IE 0x00000040 /* transmitter interrupt enable */
#define TXCS_RDY 0x00000080 /* transmitter ready for next char */
+#if VAX8600
+#define TXCS_ID 0x00000300 /* interrupt ID field */
+#define TXCS_WMASK 0x00008000 /* enable mask write */
+#define TXCS_TXMASK 0x00ff0000 /* transmit enable channel mask: */
+#define TXCS_CTERM 0x00010000 /* console terminal */
+#define TXCS_RTERM 0x00020000 /* remote diagnostic port */
+#define TXCS_EMM 0x00040000 /* Environmental Monitor Module */
+#define TXCS_LCONS 0x00080000 /* Logical console */
+#endif
+
#define TXDB_DATA 0x000000ff /* transmitter byte */
#define TXDB_DATA 0x000000ff /* transmitter byte */
-#define TXDB_ID 0x00000f00 /* channel id */
+#define TXDB_ID 0x00000f00 /* channel id- not on 8600 */
+#define TXDB_CONS 0x00000f00 /* channel id for console subsystem */
-#define TXDB_DONE 0xf01 /* software done */
-#define TXDB_BOOT 0xf02 /* reboot */
-#define TXDB_CWSI 0xf03 /* clear warm start inhibit */
-#define TXDB_CCSI 0xf04 /* clear cold-start inhibit */
+#define TXDB_DONE 0x01 /* software done */
+#define TXDB_BOOT 0x02 /* reboot */
+#define TXDB_CWSI 0x03 /* clear warm start inhibit */
+#define TXDB_CCSI 0x04 /* clear cold-start inhibit */
* 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.
*
- * @(#)locore.s 6.31 (Berkeley) %G%
+ * @(#)locore.s 6.32 (Berkeley) %G%
pushr $0x3fff
calls $0,_dumpsys
1:
pushr $0x3fff
calls $0,_dumpsys
1:
- mfpr $TXCS,r0
- bitl $TXCS_RDY,r0
- beql 1b
- mtpr $TXDB_BOOT,$TXDB
+ pushl $TXDB_BOOT
+ calls $1,_tocons
* 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.
*
- * @(#)machdep.c 6.21 (Berkeley) %G%
+ * @(#)machdep.c 6.22 (Berkeley) %G%
fp = (struct sigframe *)scp - 1;
if ((int)fp <= USRSTACK - ctob(u.u_ssize))
grow((unsigned)fp);
fp = (struct sigframe *)scp - 1;
if ((int)fp <= USRSTACK - ctob(u.u_ssize))
grow((unsigned)fp);
- if (useracc((caddr_t)fp, sizeof (*fp) + sizeof (*scp), 1) == 0) {
+ if (useracc((caddr_t)fp, sizeof (*fp) + sizeof (*scp), B_WRITE) == 0) {
/*
* Process has trashed its stack; give it an illegal
* instruction to halt it in its tracks.
/*
* Process has trashed its stack; give it an illegal
* instruction to halt it in its tracks.
register int *regs = u.u_ar0;
scp = ((struct a *)(u.u_ap))->sigcntxp;
register int *regs = u.u_ar0;
scp = ((struct a *)(u.u_ap))->sigcntxp;
- if (useracc((caddr_t)scp, sizeof (*scp), 0) == 0)
+ if (useracc((caddr_t)scp, sizeof (*scp), B_WRITE) == 0)
return;
if ((scp->sc_ps & (PSL_MBZ|PSL_IPL|PSL_IS)) != 0 ||
(scp->sc_ps & (PSL_PRVMOD|PSL_CURMOD)) != (PSL_PRVMOD|PSL_CURMOD) ||
return;
if ((scp->sc_ps & (PSL_MBZ|PSL_IPL|PSL_IS)) != 0 ||
(scp->sc_ps & (PSL_PRVMOD|PSL_CURMOD)) != (PSL_PRVMOD|PSL_CURMOD) ||
scp = (struct sigcontext *)fuword((caddr_t)regs[SP]);
if ((int)scp == -1)
return;
scp = (struct sigcontext *)fuword((caddr_t)regs[SP]);
if ((int)scp == -1)
return;
- if (useracc((caddr_t)scp, 3 * sizeof (int), 0) == 0)
+ if (useracc((caddr_t)scp, 3 * sizeof (int), B_WRITE) == 0)
return;
u.u_onstack = scp->sc_onstack & 01;
u.u_procp->p_sigmask = scp->sc_mask &~
return;
u.u_onstack = scp->sc_onstack & 01;
u.u_procp->p_sigmask = scp->sc_mask &~
;
} else {
if (paniced == RB_PANIC) {
;
} else {
if (paniced == RB_PANIC) {
- doadump(); /* TXDB_BOOT's itsself */
+ doadump(); /* TXDB_BOOT's itself */
/*NOTREACHED*/
}
tocons(TXDB_BOOT);
/*NOTREACHED*/
}
tocons(TXDB_BOOT);
- while ((mfpr(TXCS)&TXCS_RDY) == 0)
+ while (((oldmask = mfpr(TXCS)) & TXCS_RDY) == 0)
+
+ switch (cpu) {
+
+#if VAX780 || VAX750 || VAX730
+ case VAX_780:
+ case VAX_750:
+ case VAX_730:
+ c |= TXDB_CONS;
+ break;
+#endif
+
+#if VAX8600
+ case VAX_8600:
+ mtpr(TXCS, TXCS_LCONS | TXCS_WMASK);
+ while ((mfpr(TXCS) & TXCS_RDY) == 0)
+ continue;
+ break;
+#endif
+ }
+
+
+#if VAX8600
+ switch (cpu) {
+
+ case VAX_8600:
+ while ((mfpr(TXCS) & TXCS_RDY) == 0)
+ continue;
+ mtpr(TXCS, oldmask | TXCS_WMASK);
+ break;
+ }
+#endif
}
int dumpmag = 0x8fca0101; /* magic number for savecore */
}
int dumpmag = 0x8fca0101; /* magic number for savecore */