[SeaBIOS] xhci controller and slot count

Kevin O'Connor kevin at koconnor.net
Sun Dec 29 21:11:32 CET 2013


I think I've found the remaining issue with the XHCI controller on my
e350m1.  The controller doesn't like the dummy context entries count
that seabios assigns during a configure event.  The patch below allows
me to use keyboard and mice on the xhci controller.  Interestingly,
the xhci controller doesn't seem to care about that field at all when
using super speed devices.

However, the controller still doesn't work for high speed flash
devices.  It looks like the controller doesn't like getting two
configure events - it accepts the first configure event for the bulkin
pipe, but then complains about the second configure event for the
bulkout pipe.  Unfortunately, it looks like fixing this would require
significant changes to the seabios usb code.

-Kevin


--- a/src/hw/usb-xhci.c
+++ b/src/hw/usb-xhci.c
@@ -922,7 +922,7 @@ xhci_alloc_pipe(struct usbdevice_s *usbdev
             goto fail;
         in->add |= (1 << pipe->epid);
         struct xhci_slotctx *slot = (void*)&in[1 << xhci->context64];
-        slot->ctx[0] |= (31 << 27); // context entries
+        slot->ctx[0] |= (pipe->epid << 27); // context entries
 
         struct xhci_epctx *ep = (void*)&in[(pipe->epid+1) << xhci->context64];
         if (eptype == USB_ENDPOINT_XFER_INT)



More information about the SeaBIOS mailing list