summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-09-23 07:05:07 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-09-23 07:05:07 +0000
commit952206fb17e6c70a2696919792396500e882e7cf (patch)
tree126984ffd716b82a9cb1aaed813786b5889e8cd6
parent3e86e497af3299c7217b3923477aa80040fd9a05 (diff)
For serial console, drop into ddb on <break> if ddb.console is nonzero
-rw-r--r--sys/arch/hp300/dev/apci.c13
-rw-r--r--sys/arch/hp300/dev/dca.c12
2 files changed, 23 insertions, 2 deletions
diff --git a/sys/arch/hp300/dev/apci.c b/sys/arch/hp300/dev/apci.c
index ce590bf9d15..260a000852c 100644
--- a/sys/arch/hp300/dev/apci.c
+++ b/sys/arch/hp300/dev/apci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apci.c,v 1.10 2001/06/27 05:44:45 nate Exp $ */
+/* $OpenBSD: apci.c,v 1.11 2001/09/23 07:05:06 millert Exp $ */
/* $NetBSD: apci.c,v 1.9 2000/11/02 00:35:05 eeh Exp $ */
/*-
@@ -121,6 +121,10 @@
#include <hp300/dev/apcireg.h>
#include <hp300/dev/dcareg.h> /* register bit definitions */
+#ifdef DDB
+#include <ddb/db_var.h>
+#endif
+
struct apci_softc {
struct device sc_dev; /* generic device glue */
struct apciregs *sc_apci; /* device registers */
@@ -557,6 +561,13 @@ apcieint(sc, stat)
if ((tp->t_state & TS_ISOPEN) == 0)
return;
+#ifdef DDB
+ if ((sc->sc_flags & APCI_ISCONSOLE) && db_console && (stat & LSR_BI)) {
+ Debugger();
+ return;
+ }
+#endif
+
if (stat & (LSR_BI | LSR_FE)) {
c |= TTY_FE;
sc->sc_ferr++;
diff --git a/sys/arch/hp300/dev/dca.c b/sys/arch/hp300/dev/dca.c
index f84bcd1e201..11e06aa1345 100644
--- a/sys/arch/hp300/dev/dca.c
+++ b/sys/arch/hp300/dev/dca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dca.c,v 1.12 2001/06/27 05:44:46 nate Exp $ */
+/* $OpenBSD: dca.c,v 1.13 2001/09/23 07:05:06 millert Exp $ */
/* $NetBSD: dca.c,v 1.35 1997/05/05 20:58:18 thorpej Exp $ */
/*
@@ -72,6 +72,10 @@
#include <hp300/dev/diodevs.h>
#include <hp300/dev/dcareg.h>
+#ifdef DDB
+#include <ddb/db_var.h>
+#endif
+
struct dca_softc {
struct device sc_dev; /* generic device glue */
struct dcadevice *sc_dca; /* pointer to hardware */
@@ -614,6 +618,12 @@ dcaeint(sc, stat)
#endif
return;
}
+#if defined(DDB) && !defined(KGDB)
+ if ((sc->sc_flags & DCA_ISCONSOLE) && db_console && (stat & LSR_BI)) {
+ Debugger();
+ return;
+ }
+#endif
if (stat & (LSR_BI | LSR_FE))
c |= TTY_FE;
else if (stat & LSR_PE)