Re: [PATCH 09/12] i386/x86_64: EHCI usb debug port early printk support.



Thanks for writing that code. It should be an interesting alternative
on boxes where firescope doesn't work.

I hope I can eventually merge early firewire support code too.

On Mon, Apr 30, 2007 at 10:32:02AM -0600, Eric W. Biederman wrote:

With legacy free systems serial ports have stopped being an option
to get early boot traces and other debug information out of a machine.

This needs a CONFIG_* at least. And some documentation on how to set it
up on both sides.


This debug device can be used to replace serial ports for
kgdb, kdb, and console support. And gregkh has a simple usb
serial driver for it so user space applications that control
serial ports should work unmodified.

But not merged yet, right? I was hoping it could be done from
user space anyways.

For users the hard part looks like it will be finding cables and
finding which is usb debug port 1 and realizing that there is
flow control so the kernel boot will not happen if someone is not
reading the serial console data.

That's nasty. Any way to work around that?

index 92213d2..dc097aa 100644
--- a/arch/x86_64/kernel/early_printk.c
+++ b/arch/x86_64/kernel/early_printk.c
@@ -3,9 +3,19 @@
#include <linux/init.h>
#include <linux/string.h>
#include <linux/screen_info.h>
+#include <linux/usb/ch9.h>
+#include <linux/pci_regs.h>
+#include <linux/pci_ids.h>
+#include <linux/errno.h>

Can you put it in a separate file please?
Perhaps with a little abstraction in drivers/usb ?

+static void dbgp_breath(void)
+{
+ /* Sleep to give the debug port a chance to breathe */

But you don't?

+static __u32 __init find_dbgp(int ehci_num, unsigned *rbus, unsigned *rslot, unsigned *rfunc)

This should be probably merged into the early quirks loop

early_console = &simnow_console;
keep_early = 1;
+ } else if (!strncmp(buf, "dbgp", 4)) {

usb would seem to be more intuitive

-Andi
-
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

  • [RFC][PATCH 0/2] x86_64 Early usb debug port support.
    ... With legacy free systems serial ports have stopped being an option ... to get early boot traces and other debug information out of a machine. ... EHCI USB controllers provide a relatively simple debug interface ... the wrong time you can completely confuse various EHCI controllers. ...
    (Linux-Kernel)
  • [PATCH 09/12] i386/x86_64: EHCI usb debug port early printk support.
    ... With legacy free systems serial ports have stopped being an option ... to get early boot traces and other debug information out of a machine. ... EHCI USB controllers provide a relatively simple debug interface ... When the special feature of the EHCI is not enabled the port ...
    (Linux-Kernel)
  • Re: Using USB instead of RS232 on embeded project
    ... >finding a laptop with two serial ports if that's what you need. ... PCMCIA or USB to RS232 exist and have existed for some time. ... >commercial and industrial applications, not hobbyist setups or VAR systems.) ... either due to burst communications or random connections ...
    (comp.arch.embedded)
  • Re: MSComm and USB to RS485 Converters (head hurting now, must have martini)
    ... a .dll that we then use in various test engineering applications ... RS232 to RS485 converters work fine but I am out of serial ports ... Make sure the USB device gets mapped in as a comport and operating ... To me it seems like a shot into their own foot because it stifles Excel VBA apps and thus Excel sales. ...
    (sci.electronics.design)
  • Re: [PATCH 09/12] i386/x86_64: EHCI usb debug port early printk support.
    ... With legacy free systems serial ports have stopped being an option ... can just cat to get the usb debug output. ... This lack of a good timeout looks to be the reason ehci_wait_for_port ...
    (Linux-Kernel)