diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-08-19 07:59:20 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-08-19 07:59:20 +0000 |
commit | ca0cf0c3b379b813dbe437622ed6062142b315b3 (patch) | |
tree | 4aa09764b09472905a31dcdf99781d4971d662ae /sys/arch/macppc/dev | |
parent | d1bb9d132be432eea5151028835966c2bce22cff (diff) |
Make it possible to enter ddb from the serial console.
ok miod@, deraadt@
Diffstat (limited to 'sys/arch/macppc/dev')
-rw-r--r-- | sys/arch/macppc/dev/zs.c | 19 |
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? */ |