Bug #484
openNo USB keyboard support with secondary payloads coreinfo, nvramcui, tint and probably others as well
0%
Description
When coreboot was compiled with default parameters any secondary payload I tried (coreinfo, nvramcui, tint) does not recognize keyboard input.
I found a simple workaround in libpayload until this behavior is fixed (please see attachment). Depending on used hardware I switch from ehci (X200, T500) to xhci (X220, X230) driver and vice verse. Both drivers (ehci and xhci) together obviously cause this problem. However, this is the default in libpayload configuration.
Files
Updated by Martin Roth over 1 year ago
- Subject changed from No keyboard with secondary payloads coreinfo, nvramcui, tint and probably others as well to No USB keyboard support with secondary payloads coreinfo, nvramcui, tint and probably others as well
What should the default configuration in libpayload be? How would you recommend fixing this issue properly?
Updated by Robert Gruber over 1 year ago
Martin Roth wrote in #note-1:
What should the default configuration in libpayload be? How would you recommend fixing this issue properly?
Thank you for editing the subject!
The default parameters are okay. I don't know why this issue occurs. What do you think is the reason for this issue ?
Apparently, as I described, it only occurs when both usb drivers ehci and xhci are selected. It looks like they block each other on secondary payloads.
Updated by Nico Huber over 1 year ago
It's generally expected to have all the drivers enabled. Even in a single system, they can coexist.
Depending on the platform, ports can be shared by multiple controllers. Some EHCI controllers can't handle low- and full-speed devices, then a UHCI or OHCI controller has to take over. This is the case with the ICH9 devices (X200, T500). There have been regressions noticed with the UHCI driver, maybe it's rather the hand-over mechanism from the EHCI driver that is broken.
The X220 should either only have an EHCI controller or a discrete xHCI one for specific ports (could be wrong, but I can't imagine how shared ports would work with a discrete xHCI controller). So no idea how disabling xHCI makes a difference there.
The X230 has ports shared by EHCI and xHCI, but both should be able to handle low- and full-speed devices.
Given that USB enumeration has some delicate reset procedures, especially when ports need to be handed over from one controller to another, the USB keyboard itself could also make trouble. Did you test multiple USB devices?
Updated by Robert Gruber over 1 year ago
Nico Huber wrote in #note-3:
Given that USB enumeration has some delicate reset procedures, especially when ports need to be handed over from one controller to another, the USB keyboard itself could also make trouble. Did you test multiple USB devices?
Yes, I have tested this problem with multiple keyboards, and the keyboards only work when I disable the other usb drivers.
Updated by Nico Huber over 1 year ago
Sorry, confused things earlier, I thought your script would also toggle the EHCI driver. Can you confirm that it works on a X200 or T500 with only the EHCI driver enabled? Is there a USB hub involved? (could also be embedded into the ThinkPad or the keyboard, lsusb -t
would tell)
Updated by Martin Roth over 1 year ago
- Category set to Payloads
We can make libpayload configs for specific platforms instead of using the default. Maybe that's what we should do here, and make a version that disables the EHCI ports?
Updated by Robert Gruber over 1 year ago
Nico Huber wrote in #note-5:
Sorry, confused things earlier, I thought your script would also toggle the EHCI driver. Can you confirm that it works on a X200 or T500 with only the EHCI driver enabled? Is there a USB hub involved? (could also be embedded into the ThinkPad or the keyboard,
lsusb -t
would tell)
Yes, it works perfectly on X200 and T500 (and very likely on all other ICH9 devices) with only EHCI driver enabled. I had to use the switch script with the ehci option to make secondary payloads like coreinfo, nvramcui and tint useable.
Output from X200 and only EHCI driver enabled (in coreboot):
$ sudo lsusb -t
/: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
|__ Port 5: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 6: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 6: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
Output from T500 and only EHCI driver enabled (in coreboot):
$ sudo lsusb -t
/: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
|__ Port 5: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 7, If 0, Class=Hub, Driver=hub/3p, 480M
|__ Port 1: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 2: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 9, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 3: Dev 10, If 0, Class=Human Interface Device, Driver=usbhid, 12M
Updated by Robert Gruber over 1 year ago
Martin Roth wrote in #note-6:
We can make libpayload configs for specific platforms instead of using the default. Maybe that's what we should do here, and make a version that disables the EHCI ports?
Yes, that sounds good! In my script I disable UHCI, OHCI and XHCI. EHCI was the only enabled usb driver. And with this setting it works great.
Are the configuration payloads in your suggestion automatically loaded by selecting the relevant mainboard models (ICH9 devices) in the main coreboot configuration when a (secondary) payload is selected ?