Skip to contentSkip to conversation

announcing XHCI support (USB 3.0)

DISCUSSION Jan Suhr | Nitrokey 3 participants 3 messages Aug 13, 2020 – Aug 17, 2020

lore
Share & tools
lore
#0 lore raw

Hi!
We just published our development of XHCI (USB 3.0) support for GRUB [1]. It was tested with Supermicro X11SSH-TF. Currently it's a fork of GRUB and we would like to get it merged into mainline GRUB. Any interest, feedback?

This fork was developed for us by 9elements. Many thanks to their skilled developers!

Best regards,
Jan

[1] https://github.com/Nitrokey/grub

#1 lore raw

Hi, Jan

Thank you so much! It is fabulous!
This is exactly what we were looking for.
Also, we have tested it on some computers with xhci and some of them are working and the other part are not. Unfortunately, we do not know why for now, but we are going to fix it and make it works on all machines that we have.

By the way, compiling from repo is possible only while -Werror turned off. But I am pretty sure that you already know it)

Anyway, I want to say thank you for sharing repo and to 9elements team for such a great development.

Is it possible to connect with you direct via email and create a pull request to your repo with some fixes in the future?

     On Thursday, August 13, 2020, 05:52:58 PM GMT+3, Jan Suhr | Nitrokey via Grub-devel <[email protected]> wrote:  

Hi!
We just published our development of XHCI (USB 3.0) support for GRUB [1]. It was tested with Supermicro X11SSH-TF. Currently it's a fork of GRUB and we would like to get it merged into mainline GRUB. Any interest, feedback?

This fork was developed for us by 9elements. Many thanks to their skilled developers!

Best regards,
Jan

[1] https://github.com/Nitrokey/grub

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#2 lore raw
In reply to Jan Suhr | Nitrokey

Hi Jan,

I noticed that the code will not handle XHCI controllers with multiple USB 3 port ranges.
This is no problem with USB 3.0 controllers, but the USB 3.1 and USB 3.2 specs brought additional speeds.
At my workplace we have a Ryzen mainboard with an XHCI controller where 2 ports support up to Gen2 speed and 2 ports support Gen 1 (USB 3.0) speed.
The code in xhci.c will not handle that correctly, as it only supports one USB 3 configuration and it does not check if it already found any USB 3 ports.

The BIOS handoff code also looks sketchy. XHCI handles BIOS handoff through an extended attribute in the mmio space. The code tries to do the handoff through the pci space.
That code looks like it has been copied over from EHCI where the BIOS handoff fields are located in the PCI space.

I also don't see any adjustments to handle USB3 hubs, but I did not look very hard.
USB3 hubs use different hub descriptors and a different port status field so they need some special handling.
The USB2 part of the hubs on a XHCI controller should be fine.

If you have any questions feel free to ask.

Greetings,
Thomas