From owner-svn-src-head@FreeBSD.ORG Fri Sep 2 17:36:01 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB40B106564A; Fri, 2 Sep 2011 17:36:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7232A8FC0A; Fri, 2 Sep 2011 17:36:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p82Ha1fG009307; Fri, 2 Sep 2011 17:36:01 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p82Ha1QN009305; Fri, 2 Sep 2011 17:36:01 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201109021736.p82Ha1QN009305@svn.freebsd.org> From: Robert Watson Date: Fri, 2 Sep 2011 17:36:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225343 - head/sys/dev/xen/console X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 17:36:01 -0000 Author: rwatson Date: Fri Sep 2 17:36:01 2011 New Revision: 225343 URL: http://svn.freebsd.org/changeset/base/225343 Log: Add support for alternative break-to-debugger support on the Xen console. This should help debug boot-time hangs experienced in 9.0-BETA. MFC after: 3 weeks Tested by: sbruno Approved by: re (kib) Modified: head/sys/dev/xen/console/console.c Modified: head/sys/dev/xen/console/console.c ============================================================================== --- head/sys/dev/xen/console/console.c Fri Sep 2 17:30:50 2011 (r225342) +++ head/sys/dev/xen/console/console.c Fri Sep 2 17:36:01 2011 (r225343) @@ -70,6 +70,10 @@ static int rc, rp; static unsigned int cnsl_evt_reg; static unsigned int wc, wp; /* write_cons, write_prod */ +#ifdef KDB +static int xc_altbrk; +#endif + #define CDEV_MAJOR 12 #define XCUNIT(x) (dev2unit(x)) #define ISTTYOPEN(tp) ((tp) && ((tp)->t_state & TS_ISOPEN)) @@ -268,8 +272,12 @@ xencons_rx(char *buf, unsigned len) #endif ) { tty_lock(tp); - for (i = 0; i < len; i++) + for (i = 0; i < len; i++) { +#ifdef KDB + kdb_alt_break(buf[i], &xc_altbrk); +#endif ttydisc_rint(tp, buf[i], 0); + } ttydisc_rint_done(tp); tty_unlock(tp); } else {