Re: [LinuxBIOS] #57: libusb host program for PLX NET20DC debug device



Peter Stuge <stuge-linuxbios@xxxxxxx> writes:

On Fri, Dec 01, 2006 at 02:15:24PM -0700, Eric W. Biederman wrote:
Right. For LinuxBIOS not a problem for earlyprintk in the kernel
somethings might need to be refactored. The challenge in the
kernel is we don't know at build to how to do a pci_read_config...

The other hard part early in the kernel is the fact that the
bar is memory mapped I/O. Which means it will need to get mapped
into the kernels page tables.

I see.


And I have some code that barely works for this already, perhaps
Eric and I should work together on this :)

I would be interested in having a look at any code for it too.

Sure, I will send it out shortly. I currently have a working
user space libusb thing (easy, but useful for my debug)

Hm - for driving which end?

Either. The specific device we are talking about doesn't care.

and a rude read/write to the bar from user space program that

How does that work? /dev/{port,mem}?

mmap /dev/mem.

allowed me to debug the worst of the state machine from user
space. I don't think I have the state setup logic correct yet
but that is minor in comparison.

I really wish the EHCI spec had made that stupid interface 16 bytes
instead of 8 or had a way to chain multiple access together. The
we could have used a normal usb cable. As it is most descriptors
are 1 byte too big to read.

Which descriptors are you reading?

Minor. I was just wishing for less magic in this process, which
would make these kinds of devices much more available.

The debug port isn't really supposed to be used with anything but a
debug device - which can't be enumerated normally anyway.

It depends. If you have a debug cable with magic ends and a hardcoded
address of 127 the normal enumeration doesn't work. I don't think
anyone actually makes one of those. Debug devices are also allowed to
be normal devices that just support the debug descriptor. Which
is what I'm working with.

Eric

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [LinuxBIOS] #57: libusb host program for PLX NET20DC debug device
    ... kernel is we don't know at build to how to do a pci_read_config... ... user space libusb thing (easy, but useful for my debug) ... Which descriptors are you reading? ...
    (Linux-Kernel)
  • [patch 1/2] infrastructure to debug (dynamic) objects
    ... problem spot are kernel timers, where the detection of the problem ... While working on a timer related bug report I had to hack in ... This debug hack was fine for temporary use, ...
    (Linux-Kernel)
  • Re: Error 4309 returned when writing files
    ... kernel (or at least debug version of filesys) and enable all debug zones ... I enabled KITL and the kernel debugger in my retail build and set ... on Sector 4040 ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Capturing debug messages using CeLog on a release terminal
    ... Don't set the shipbuild flag in your retail kernel (because it will #define RETAILMSG and DEBUGMSG into nirvana) and don't set Enable CE Target control and don't set Enable Kernel Debugger. ... I'm not entirely sure if DEBUGMSGs (as opposed to RETAILMSGs) still work when replacing dll's in a retail build with their debug counterparts. ...
    (microsoft.public.windowsce.platbuilder)
  • [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp
    ... +USB2 Debug port key and a debug cable, ... Host/target system needs to have USB debug port capability. ... You need to enable the following kernel config option: ...
    (Linux-Kernel)