summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/pcvt/pcvt_ext.c
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-04-08 21:32:11 +0000
committerjoerg <joerg@FreeBSD.org>1995-04-08 21:32:11 +0000
commit2feff74c285a9678d5c38db2c45437df72a5bfdb (patch)
tree39d4529134d7e712accc4219cbd917de8336bcb9 /sys/i386/isa/pcvt/pcvt_ext.c
parentc4c9cf1214969920aa1211a6e037a49c7cd0ff34 (diff)
downloadFreeBSD-src-2feff74c285a9678d5c38db2c45437df72a5bfdb.zip
FreeBSD-src-2feff74c285a9678d5c38db2c45437df72a5bfdb.tar.gz
Implement a simple hook (or hack?) to allow graphics device console
drivers to protect DDB from being invoked while the console is in process-controlled (i.e., graphics) mode. Implement the logic to use this hook from within pcvt. (I'm sure Søren will do the syscons part RSN). I've still got one occasion where the system stalled, but my attempts to trigger the situation artificially resulted int the expected behaviour. It's hard to track bugs without the console and DDB available. :-/
Diffstat (limited to 'sys/i386/isa/pcvt/pcvt_ext.c')
-rw-r--r--sys/i386/isa/pcvt/pcvt_ext.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/sys/i386/isa/pcvt/pcvt_ext.c b/sys/i386/isa/pcvt/pcvt_ext.c
index 32a89a0..7088caf 100644
--- a/sys/i386/isa/pcvt/pcvt_ext.c
+++ b/sys/i386/isa/pcvt/pcvt_ext.c
@@ -2427,8 +2427,19 @@ vgapage(int new_screen)
psignal(vsp->proc, vsp->smode.acqsig);
}
else
+ {
/* we are committed */
vt_switch_pending = 0;
+#if PCVT_FREEBSD > 206
+ /*
+ * XXX: If pcvt is acting as the systems console,
+ * avoid panics going to the debugger while we are in
+ * process mode.
+ */
+ if(pcvt_is_console)
+ cons_unavail = 0;
+#endif
+ }
}
return 0;
}
@@ -2498,6 +2509,15 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
vsp->proc = p;
vsp->pid = p->p_pid;
+#if PCVT_FREEBSD > 206
+ /*
+ * XXX: If pcvt is acting as the systems console,
+ * avoid panics going to the debugger while we are in
+ * process mode.
+ */
+ if(pcvt_is_console)
+ cons_unavail = (newmode.mode == VT_PROCESS);
+#endif
splx(opri);
return 0;
@@ -2564,9 +2584,16 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
vsp->smode.acqsig);
}
else
+ {
/* we are committed */
vt_switch_pending = 0;
- return 0;
+#if PCVT_FREEBSD > 206
+ /* XXX */
+ if(pcvt_is_console)
+ cons_unavail = 0;
+#endif
+ return 0;
+ }
}
break;
@@ -2575,6 +2602,11 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
if(vsp->vt_status & VT_WAIT_ACK) {
vt_switch_pending = 0;
vsp->vt_status &= ~VT_WAIT_ACK;
+#if PCVT_FREEBSD > 206
+ /* XXX */
+ if(pcvt_is_console)
+ cons_unavail = 1;
+#endif
return 0;
}
break;
OpenPOWER on IntegriCloud