Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Apr 2014 12:30:29 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Ian Lepore <ian@FreeBSD.org>
Cc:        Bakul Shah <bakul@bitblocks.com>, FreeBSD ARM <freebsd-arm@FreeBSD.org>
Subject:   Re: Looking for FreeBSD u-boot/kernel debugging help (BeagleBone Black)
Message-ID:  <35FCA9EC-1569-494D-B193-90926D802219@bsdimp.com>
In-Reply-To: <1398618296.61646.161.camel@revolution.hippie.lan>
References:  <CADH-AwHN0=p4z0RJZNcoRdoDJTMVAtK5F3TNCh5qdMWessQ0KQ@mail.gmail.com> <20140426233438.49123B827@mail.bitblocks.com> <1398618296.61646.161.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help

On Apr 27, 2014, at 11:04 AM, Ian Lepore <ian@FreeBSD.org> wrote:

> On Sat, 2014-04-26 at 16:34 -0700, Bakul Shah wrote:
>> On Sat, 26 Apr 2014 18:29:35 EDT Winston Smith =
<smith.winston.101@gmail.com> 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?
>>=20
>> 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!]
>>=20
>> Type c and hit return to continue.=20
>>=20
>> To disable this behavior I think you can do
>> 	sysctl debug.kbd.break_to_debugger=3D0
>> or add
>> 	debug.kbd.break_to_debugger=3D0
>> to /etc/sysctl.conf
>>=20
>> man 1 ddb -- for debugger commands
>> man 4 ddb -- for kernel config options to control ddb behavior
>=20
> 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).
>=20
> 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 <CR> ~ ^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. =20
>=20
> Any objections to removing them and using only the safer ALT_BREAK
> option?

Please leave it in the ATMEL config, but I think you can remove it from =
the rest (including the specific atmel SoC boards).

Warner=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35FCA9EC-1569-494D-B193-90926D802219>