summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-08-19 07:59:20 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-08-19 07:59:20 +0000
commitca0cf0c3b379b813dbe437622ed6062142b315b3 (patch)
tree4aa09764b09472905a31dcdf99781d4971d662ae /sys/arch/macppc
parentd1bb9d132be432eea5151028835966c2bce22cff (diff)
Make it possible to enter ddb from the serial console.
ok miod@, deraadt@
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r--sys/arch/macppc/dev/zs.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/arch/macppc/dev/zs.c b/sys/arch/macppc/dev/zs.c
index 3842224d44c..317992a7e22 100644
--- a/sys/arch/macppc/dev/zs.c
+++ b/sys/arch/macppc/dev/zs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zs.c,v 1.16 2008/01/23 16:37:56 jsing Exp $ */
+/* $OpenBSD: zs.c,v 1.17 2008/08/19 07:59:19 kettenis Exp $ */
/* $NetBSD: zs.c,v 1.17 2001/06/19 13:42:15 wiz Exp $ */
/*
@@ -1123,7 +1123,24 @@ zscninit(cp)
void
zs_abort(struct zs_chanstate *channel)
{
+ volatile struct zschan *zc = zs_conschan;
+ int rr0;
+ /* Wait for end of break to avoid PROM abort. */
+ /* XXX - Limit the wait? */
+ do {
+ rr0 = zc->zc_csr;
+ ZS_DELAY();
+ } while (rr0 & ZSRR0_BREAK);
+
+#if defined(DDB)
+ {
+ extern int db_active;
+
+ if (!db_active)
+ Debugger();
+ }
+#endif
}
/* copied from sparc - XXX? */