Discussion:
USB 2.0 EHCI debug dongle doesn't print logs (at Lenovo G505S)
(too old to reply)
Ivan Ivanov
2018-09-28 21:50:18 UTC
Permalink
Thank you for spkmodem comments, now I'm trying out a more reliable
way - FT232H dongle - to extract the logs from AMD Lenovo G505S. I
plug it into the correct port - USB 2.0 at laptop's right side.
However it doesn't print anything except this short test message:
--- /* Perform a small write. */
--- ret = dbgp_bulk_write_x(&pipe[DBGP_CONSOLE_EPOUT], "USB\r\n", 5);
------ line 322 of ./coreboot/src/drivers/usb/gadget.c

Thinking that it breaks during the relocation from romstage to
ramstage (migrate_ehci_debug function at ehci_debug.c ?) , I disabled
CONFIG_USBDEBUG_IN_ROMSTAGE - but the results are the same: only "USB"
message. I could see
--- dprintk(BIOS_INFO, "Test write done\n");
------ line 328 of ./coreboot/src/drivers/usb/gadget.c
at cbmem logs, but even that doesn't get copied to FT232H output.

Please could you take a look at my coreboot .config and cbmem logs,
what if this FT232H dongle doesn't get selected as console output for
some reason? CONFIG_CONSOLE_CBMEM is still enabled, but maybe I should
disable it?

Best regards,
Ivan Ivanov
Nico Huber
2018-09-30 11:23:11 UTC
Permalink
Hi Ivan,
Post by Ivan Ivanov
Thank you for spkmodem comments, now I'm trying out a more reliable
way - FT232H dongle - to extract the logs from AMD Lenovo G505S. I
plug it into the correct port - USB 2.0 at laptop's right side.
--- /* Perform a small write. */
--- ret = dbgp_bulk_write_x(&pipe[DBGP_CONSOLE_EPOUT], "USB\r\n", 5);
------ line 322 of ./coreboot/src/drivers/usb/gadget.c
Thinking that it breaks during the relocation from romstage to
ramstage (migrate_ehci_debug function at ehci_debug.c ?) , I disabled
CONFIG_USBDEBUG_IN_ROMSTAGE - but the results are the same: only "USB"
message. I could see
--- dprintk(BIOS_INFO, "Test write done\n");
------ line 328 of ./coreboot/src/drivers/usb/gadget.c
at cbmem logs, but even that doesn't get copied to FT232H output.
the purpose of dprintk() here is to only print when EHCI debug is _not_
activated yet. Otherwise the code trying to print something would be
called recursively. But it might actually work at this early point,
with proper configuration (see below).
Post by Ivan Ivanov
Please could you take a look at my coreboot .config and cbmem logs,
what if this FT232H dongle doesn't get selected as console output for
some reason? CONFIG_CONSOLE_CBMEM is still enabled, but maybe I should
disable it?
You are missing CONFIG_CONSOLE_USB.

Nico
--
coreboot mailing list: ***@coreboot.org
https://mail.coreboot.org/mailman/listinfo/coreboot
Ivan Ivanov
2018-09-30 15:55:11 UTC
Permalink
Thank you very much for your help, Nico! Enabling CONFIG_CONSOLE_USB
indeed got FT232H working! :-) I wonder why CONFIG_CONSOLE_USB isn't
enabled by default if CONFIG_USBDEBUG is enabled... Maybe this default
behaviour should be changed?

P.S. works even together with CONFIG_USBDEBUG_IN_ROMSTAGE
Post by Nico Huber
Hi Ivan,
Post by Ivan Ivanov
Thank you for spkmodem comments, now I'm trying out a more reliable
way - FT232H dongle - to extract the logs from AMD Lenovo G505S. I
plug it into the correct port - USB 2.0 at laptop's right side.
--- /* Perform a small write. */
--- ret = dbgp_bulk_write_x(&pipe[DBGP_CONSOLE_EPOUT], "USB\r\n", 5);
------ line 322 of ./coreboot/src/drivers/usb/gadget.c
Thinking that it breaks during the relocation from romstage to
ramstage (migrate_ehci_debug function at ehci_debug.c ?) , I disabled
CONFIG_USBDEBUG_IN_ROMSTAGE - but the results are the same: only "USB"
message. I could see
--- dprintk(BIOS_INFO, "Test write done\n");
------ line 328 of ./coreboot/src/drivers/usb/gadget.c
at cbmem logs, but even that doesn't get copied to FT232H output.
the purpose of dprintk() here is to only print when EHCI debug is _not_
activated yet. Otherwise the code trying to print something would be
called recursively. But it might actually work at this early point,
with proper configuration (see below).
Post by Ivan Ivanov
Please could you take a look at my coreboot .config and cbmem logs,
what if this FT232H dongle doesn't get selected as console output for
some reason? CONFIG_CONSOLE_CBMEM is still enabled, but maybe I should
disable it?
You are missing CONFIG_CONSOLE_USB.
Nico
--
coreboot mailing list: ***@coreboot.org
https://mail.coreboot.org/mailman/listinfo/coreboot
Nico Huber
2018-10-03 10:07:25 UTC
Permalink
Post by Ivan Ivanov
Thank you very much for your help, Nico! Enabling CONFIG_CONSOLE_USB
indeed got FT232H working! :-) I wonder why CONFIG_CONSOLE_USB isn't
enabled by default if CONFIG_USBDEBUG is enabled... Maybe this default
behaviour should be changed?
Yes, I think you are right. USB console is the most common use case (if
not the only one), it should be enabled by default. I've pushed a patch
for review [1].

Nico

[1] https://review.coreboot.org/28892
--
coreboot mailing list: ***@coreboot.org
https://mail.coreboot.org/mailman/listinfo/coreboot
Denis 'GNUtoo' Carikli
2018-10-08 14:37:17 UTC
Permalink
On Sat, 29 Sep 2018 00:50:18 +0300
Post by Ivan Ivanov
Thank you for spkmodem comments, now I'm trying out a more reliable
way - FT232H dongle - to extract the logs from AMD Lenovo G505S.
[...]
If the usb debug dongle you could also try adding grub as a payload and
launching it from SeaBIOS. GRUB has the cbmemc command that can print
coreboot log.

Denis.

Loading...