Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Nov 2015 22:39:40 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Russell Haley <russ.haley@gmail.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Hummingboard SATA
Message-ID:  <CANCZdfpQSHfPmNdY-sHMJ8jtE19OB%2BtwmsargLgDh=p3x9Qagg@mail.gmail.com>
In-Reply-To: <CABx9NuQ=gf5s0bKNHRj10KmBVp%2Bpoz4xfbRXgAH3Bd8irJVNqQ@mail.gmail.com>
References:  <CABx9NuQ=gf5s0bKNHRj10KmBVp%2Bpoz4xfbRXgAH3Bd8irJVNqQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 11, 2015 at 10:22 PM, Russell Haley <russ.haley@gmail.com>
wrote:

> Hello again,
>
> I have started looking at SATA support in FreeBSD by first reading the man
> pages and then examining the code. The Joseph Kong book is helping
> considerably to understand the structures.
>
> I see that there are three drivers in play: ahci, ada and ata. Man
> indicates that ahci takes precedence in driver selection. *Is that the
> driver for Arm and the Hummingboard?*
>

ata is out of the picture now. It never really was used on arm.

ahci is likely the driver you want, though I'm not sure what a Hummingboard
is. A quick google search suggests it is a imx6 board. That's good news
because FreeBSD has an attachment.

ahci is what's call a CAM SIM. This means that it will create the ata xpt
(handled
in sys/cam/ata/ata_xpt.c). The XPT then enumerates the transport and finds
the
sata drives, which wind up getting assigned the ada PERIPH driver (handled
by
sys/cam/ata/ata_da.c).

Chances are very good you have a problem with the ahci driver and/or
how that driver is connected / sets up the iMX6 SoC sata hardware.


> What I can't seem to find is any direction on getting a debugger hooked up
> to driver code. Do I use gdb somehow, or do I use the kernel debugger? I'm
> going back over the Developers handbook again.
>

I'd start with ddb.


> I also don't understand how to boot with the -d option. When is this
> entered? I have used the sysctl to enter the debugger and poked around
> but it doesn't mean much yet.
>
> sysctl debug.kdb.enter=1
>

I don't think that the -d option is implemented on arm. Most of the ARM
kernel config files have ALT_BREAK_TO_DEBUGGER defined, which means
you'll need to send <CR> ~ ^B (that's hit return, hit the tilde key, hit
control B).
That will get you to the ddb prompt (db>). man 8 ddb for instructions on
how to use it.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpQSHfPmNdY-sHMJ8jtE19OB%2BtwmsargLgDh=p3x9Qagg>