2004-01-15 08:03:18

by Andi Kleen

[permalink] [raw]
Subject: Re: [discuss] Re: kgdb for x86_64 2.6 kernels

George Anzinger <[email protected]> writes:

>> Raw USB? Or some kind of USB to serial device?
>> Remember, USB needs interrupts to work, see the kdb patches for the
>> mess
>> that people have tried to go through to send usb data without interrupts
>> (doesn't really work...)
>
> I gave up on USB when I asked the following questions:

There is a special "USB debugport" specification available that allows
to drive USB very simply using PIO without too much set up. It should
be implemented in most chipsets by now because that other operating
system is using it.

See e.g. http://www.usb.org/developers/presentations/pres0602/john_keys.pdf

It works with a simple "debug dongle", that is identical to the
USB networking cables that are often sold cheaply.

If you want to port kgdb to use USB I would use that. USB console
would also be very useful for debugging laptops and some systems
with no USB.

-Andi


2004-01-15 08:37:09

by George Anzinger

[permalink] [raw]
Subject: Re: [discuss] Re: kgdb for x86_64 2.6 kernels

Andi Kleen wrote:
> George Anzinger <[email protected]> writes:
>
>
>>>Raw USB? Or some kind of USB to serial device?
>>>Remember, USB needs interrupts to work, see the kdb patches for the
>>>mess
>>>that people have tried to go through to send usb data without interrupts
>>>(doesn't really work...)
>>
>>I gave up on USB when I asked the following questions:
>
>
> There is a special "USB debugport" specification available that allows
> to drive USB very simply using PIO without too much set up. It should
> be implemented in most chipsets by now because that other operating
> system is using it.
>
> See e.g. http://www.usb.org/developers/presentations/pres0602/john_keys.pdf
>
> It works with a simple "debug dongle", that is identical to the
> USB networking cables that are often sold cheaply.
>
> If you want to port kgdb to use USB I would use that. USB console
> would also be very useful for debugging laptops and some systems
> with no USB.

Now that is interesting. As I read it, the debug port is programed the same way
in all the USB chips (given it exists at all). AND it is much easier to use.
Anyone care to put together a polling driver that makes it look like RS232 on
the host end given that we use a controller to controller cable?


--
George Anzinger [email protected]
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml

2004-01-15 08:51:23

by Andi Kleen

[permalink] [raw]
Subject: Re: [discuss] Re: kgdb for x86_64 2.6 kernels

On Thu, Jan 15, 2004 at 12:36:58AM -0800, George Anzinger wrote:
> Now that is interesting. As I read it, the debug port is programed the
> same way in all the USB chips (given it exists at all). AND it is much

Yep, it's not PIO, but polled MMIO. Sorry for spreading misinformation.

> easier to use. Anyone care to put together a polling driver that makes it
> look like RS232 on the host end given that we use a controller to
> controller cable?

I suspect all laptop users with kernel bugs will admire whoever does that ;-)

-Andi

2004-01-16 01:15:59

by Matt Mackall

[permalink] [raw]
Subject: Re: [discuss] Re: kgdb for x86_64 2.6 kernels

On Thu, Jan 15, 2004 at 09:52:17AM +0100, Andi Kleen wrote:
> On Thu, Jan 15, 2004 at 12:36:58AM -0800, George Anzinger wrote:
> > Now that is interesting. As I read it, the debug port is programed the
> > same way in all the USB chips (given it exists at all). AND it is much
>
> Yep, it's not PIO, but polled MMIO. Sorry for spreading misinformation.
>
> > easier to use. Anyone care to put together a polling driver that makes it
> > look like RS232 on the host end given that we use a controller to
> > controller cable?
>
> I suspect all laptop users with kernel bugs will admire whoever does that ;-)

I've been thinking about doing this, may get around to it eventually.

--
Matt Mackall : http://www.selenic.com : Linux development and consulting

2004-01-16 18:09:05

by Randy.Dunlap

[permalink] [raw]
Subject: Re: [discuss] Re: kgdb for x86_64 2.6 kernels

On Thu, 15 Jan 2004 19:15:10 -0600 Matt Mackall <[email protected]> wrote:

| On Thu, Jan 15, 2004 at 09:52:17AM +0100, Andi Kleen wrote:
| > On Thu, Jan 15, 2004 at 12:36:58AM -0800, George Anzinger wrote:
| > > Now that is interesting. As I read it, the debug port is programed the
| > > same way in all the USB chips (given it exists at all). AND it is much
| >
| > Yep, it's not PIO, but polled MMIO. Sorry for spreading misinformation.
| >
| > > easier to use. Anyone care to put together a polling driver that makes it
| > > look like RS232 on the host end given that we use a controller to
| > > controller cable?
| >
| > I suspect all laptop users with kernel bugs will admire whoever does that ;-)
|
| I've been thinking about doing this, may get around to it eventually.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'd like to help also, but I don't have ICH4 or other usb-debug
hardware AFAIK.

--
~Randy
Everything is relative.

2004-01-16 21:06:30

by Andi Kleen

[permalink] [raw]
Subject: Re: [discuss] Re: kgdb for x86_64 2.6 kernels

> I'd like to help also, but I don't have ICH4 or other usb-debug
> hardware AFAIK.

I suspect other vendors with EHCI support have it too. Check some data sheets.

-Andi