[SeaBIOS] USB flash device not recognized on cold boot, but on reboot

Kevin O'Connor kevin at koconnor.net
Sun May 18 22:06:56 CEST 2014

On Sat, May 17, 2014 at 10:25:58PM +0200, Paul Menzel wrote:
> Dear SeaBIOS folks,
> on LinuxTag 2014 the OpenMandriva project [1] gave away USB flash
> storage devices with OpenMandriva installed for live booting. Testing it
> out on the ASRock E350M1 with coreboot and SeaBIOS payload it was not
> detected by SeaBIOS, meaning pressing F12 it was not listed in the boot
> options.
> Rebooting the system by pressing Ctrl + Alt + Del the USB device was
> recognized by SeaBIOS and listed in the boot menu.
> I am still able to reproduce this with SeaBIOS build from master. Please
> find the coreboot and SeaBIOS logs attached.

Thanks.  At first glance this looks like it could be a quirk of the
particular flash drive.  Can you apply the patch below, set the
SeaBIOS debug level to 3, and report the results of both the
working/not-working cases?


--- a/src/hw/usb-ehci.c
+++ b/src/hw/usb-ehci.c
@@ -60,7 +60,9 @@ ehci_hub_detect(struct usbhub_s *hub, u32 port)
         // has been powered up, so wait the 20ms.
+    dprintf(1, "ehci_hub_detect: port=%d portsc1=%x\n", port, portsc);
     portsc = readl(portreg);
+    dprintf(1, "ehci_hub_detect: port=%d portsc2=%x\n", port, portsc);
     if (!(portsc & PORT_CONNECT))
         // No device present
@@ -93,6 +95,7 @@ ehci_hub_reset(struct usbhub_s *hub, u32 port)
     u32 *portreg = &cntl->regs->portsc[port];
     u32 portsc = readl(portreg);
+    dprintf(1, "ehci_hub_reset: port=%d portsc3=%x\n", port, portsc);
     // Finish reset on port
     portsc &= ~PORT_RESET;
     writel(portreg, portsc);
@@ -100,6 +103,7 @@ ehci_hub_reset(struct usbhub_s *hub, u32 port)
     int rv = -1;
     portsc = readl(portreg);
+    dprintf(1, "ehci_hub_reset: port=%d portsc4=%x\n", port, portsc);
     if (!(portsc & PORT_CONNECT))
         // No longer connected
         goto resetfail;

More information about the SeaBIOS mailing list