From owner-freebsd-arm@FreeBSD.ORG Sun Apr 27 17:05:00 2014 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 517A1B9C for ; Sun, 27 Apr 2014 17:05:00 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25960B6F for ; Sun, 27 Apr 2014 17:04:59 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WeSVe-0003Bb-SV; Sun, 27 Apr 2014 17:04:59 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s3RH4uD6014015; Sun, 27 Apr 2014 11:04:56 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19eYuESgd425LVocut172ZH Subject: Re: Looking for FreeBSD u-boot/kernel debugging help (BeagleBone Black) From: Ian Lepore To: Bakul Shah In-Reply-To: <20140426233438.49123B827@mail.bitblocks.com> References: <20140426233438.49123B827@mail.bitblocks.com> Content-Type: text/plain; charset="us-ascii" Date: Sun, 27 Apr 2014 11:04:56 -0600 Message-ID: <1398618296.61646.161.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: FreeBSD ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2014 17:05:00 -0000 On Sat, 2014-04-26 at 16:34 -0700, Bakul Shah wrote: > On Sat, 26 Apr 2014 18:29:35 EDT Winston Smith wrote: > > I also discovered that if I disconnect my > > serial terminal and reconnect it, it seems to bring the FreeBSD kernel > > to a debug prompt of sorts -- is there any documentation on this? > > I suspect disconnecting/reconnecting the serial cable looks like > a break to the kernel and that drops it into the debugger "ddb". > [Though I can't seem to send a real break to it using kermit!] > > Type c and hit return to continue. > > To disable this behavior I think you can do > sysctl debug.kbd.break_to_debugger=0 > or add > debug.kbd.break_to_debugger=0 > to /etc/sysctl.conf > > man 1 ddb -- for debugger commands > man 4 ddb -- for kernel config options to control ddb behavior That's exactly correct -- connecting the cable sometimes leads to a spurious break being asserted on the line (a break is just a long sequence of zeroes with no start/stop/data bit transitions). It's possible to configure a kernel without BREAK_TO_DEBUGGER and with ALT_BREAK_TO_DEBUGGER. That eliminates most line-noise spurious breaks but still allows the ~ ^b break sequence (which could theoretically happen in a burst of line noise, but not likely). A few of our kernels have BREAK_TO_DEBUGGER in the config, and I think that's probably a mistake. Most folks these days don't know anything about breaks or how to generate one on purpose. Any objections to removing them and using only the safer ALT_BREAK option? -- Ian