Re: [coreboot] SeaBIOS wit USB3.0 hub and USB3.0 devide behind the hub
Hi Kevin. I have tried your fix but it doesn't help. You can find a (huge) log with loglevel 5 here: http://pastebin.com/21rrAhfA Werner Gesendet: Donnerstag, 11. Dezember 2014 um 19:46 Uhr Von: Kevin O'Connor ke...@koconnor.net An: Werner Zeh werner@gmx.net Cc: coreboot@coreboot.org, seab...@seabios.org Betreff: Re: [coreboot] SeaBIOS wit USB3.0 hub and USB3.0 devide behind the hub On Wed, Dec 10, 2014 at 07:21:54AM +0100, Werner Zeh wrote: Hi all. I have made some tests with SeaBIOS and XHCI and found, that on my board (which is baytrail-based) a USB3.0 hub won't work. For those who are familar with SeaBIOS I have attached two logfiles from SeaBIOS. One of them is with the USB3.0 flash drive directly connected to one of the root ports of SoC (in which case the boot process starts from the flash drive) and the other is with the same flash drive but a USB3.0 hub in between (I have used a hub from Delock #62534, http://www.delock.de/produkte/F_247_extern_62534/merkmale.html). In the hub-case, I see the No bootable device screen and no boot will happen. Maybe someone more experienced can see the cause from the logs. ?SeaBIOS (version rel-1.7.5-116-g56b252e-dirty-20141210_064921-deerlf0x73) [...] |1ad7d000| xhci_process_events: ring 0x1adcb200 [trb 0x1adcb200, evt 0x1adcb300, type 32, eidx 1, cc 1] |1ad7d000| device rev=0300 cls=09 sub=00 proto=03 size=512 |1ad7d000| xhci_realloc_pipe: usbdev 0x1ad82bc0, ring 0x1adba600, slotid 4, epid 1 [...] |1ad7f000| xhci_process_events: ring 0x1adba600 [trb 0x1adba6c0, evt 0x1adba700, type 32, eidx 13, cc 6] It looks like the hub is found, but responds with a stall error on the get_hub_desc() request. Looks like usb3 hubs use a different descriptor id. You could try the patch below - it's a lot of guess work though. -Kevin diff --git a/src/hw/usb-hub.c b/src/hw/usb-hub.c index c21cbfb..7688ef2 100644 --- a/src/hw/usb-hub.c +++ b/src/hw/usb-hub.c @@ -17,7 +17,10 @@ get_hub_desc(struct usb_pipe *pipe, struct usb_hub_descriptor *desc) struct usb_ctrlrequest req; req.bRequestType = USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_DEVICE; req.bRequest = USB_REQ_GET_DESCRIPTOR; -req.wValue = USB_DT_HUB8; +if (pipe-speed == USB_SUPERSPEED) +req.wValue = USB_DT_HUB38; +else +req.wValue = USB_DT_HUB8; req.wIndex = 0; req.wLength = sizeof(*desc); return usb_send_default_control(pipe, req, desc); @@ -105,7 +108,9 @@ usb_hub_reset(struct usbhub_s *hub, u32 port) ret = get_port_status(hub, port, sts); if (ret) goto fail; -if (!(sts.wPortStatus USB_PORT_STAT_RESET)) +if (!(sts.wPortStatus USB_PORT_STAT_RESET) + (hub-usbdev-speed != USB_SUPERSPEED +|| !(sts.wPortStatus USB_PORT_STAT_LINK_MASK))) break; if (timer_check(end)) { warn_timeout(); @@ -119,6 +124,8 @@ usb_hub_reset(struct usbhub_s *hub, u32 port) // Device no longer present return -1; +if (hub-usbdev-speed == USB_SUPERSPEED) +return USB_SUPERSPEED; return ((sts.wPortStatus USB_PORT_STAT_SPEED_MASK) USB_PORT_STAT_SPEED_SHIFT); diff --git a/src/hw/usb-hub.h b/src/hw/usb-hub.h index 5b09947..f7436a5 100644 --- a/src/hw/usb-hub.h +++ b/src/hw/usb-hub.h @@ -11,6 +11,7 @@ int usb_hub_setup(struct usbdevice_s *usbdev); / #define USB_DT_HUB (USB_TYPE_CLASS | 0x09) +#define USB_DT_HUB3 (USB_TYPE_CLASS | 0x0a) struct usb_hub_descriptor { u8 bDescLength; @@ -48,7 +49,8 @@ struct usb_port_status { #define USB_PORT_STAT_SUSPEND 0x0004 #define USB_PORT_STAT_OVERCURRENT 0x0008 #define USB_PORT_STAT_RESET 0x0010 -#define USB_PORT_STAT_L10x0020 +#define USB_PORT_STAT_LINK_SHIFT5 +#define USB_PORT_STAT_LINK_MASK (0x7 USB_PORT_STAT_LINK_SHIFT) #define USB_PORT_STAT_POWER 0x0100 #define USB_PORT_STAT_SPEED_SHIFT 9 #define USB_PORT_STAT_SPEED_MASK(0x3 USB_PORT_STAT_SPEED_SHIFT) -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] Updated coreboot build environment for Windows
Patrick Georgi [mailto:patr...@georgi-clan.de] wrote: ]Sent: Sunday, December 14, 2014 09:38 AM ]To: coreboot@coreboot.org ]Subject: Re: [coreboot] Updated coreboot build environment for Windows ] ]Am 13.12.2014 um 15:14 schrieb Peter Stuge: ] Finally push that to gerrit for review as usual. ]... and ideally also push it upstream. ] ]They want it as mail, linux-style to linux-te...@vger.kernel.org, with ]some note that it's for the cbootimage repository. OK, here it is, http://thread.gmane.org/gmane.linux.ports.tegra/20348 Thanks, Scott ] ]Patrick -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Re: [coreboot] SeaBIOS wit USB3.0 hub and USB3.0 devide behind the hub
On Mon, Dec 15, 2014 at 09:06:51AM +0100, Werner Zeh wrote: Hi Kevin. I have tried your fix but it doesn't help. You can find a (huge) log with loglevel 5 here: http://pastebin.com/21rrAhfA Thanks. I obtained a USB3 hub and it works for me on both my c720 and e350m1 with the updated patch below. Please CC the seabios mailing list on replies. -Kevin From 9b244e4a887adba2281d46c0fb366823111ba4bc Mon Sep 17 00:00:00 2001 From: Kevin O'Connor ke...@koconnor.net Date: Fri, 12 Dec 2014 14:16:43 -0500 Subject: [PATCH] usb: Testing of USB3 hub support Signed-off-by: Kevin O'Connor ke...@koconnor.net --- src/hw/usb-hub.c | 36 ++-- src/hw/usb-hub.h | 6 +- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/src/hw/usb-hub.c b/src/hw/usb-hub.c index c21cbfb..54e341b 100644 --- a/src/hw/usb-hub.c +++ b/src/hw/usb-hub.c @@ -17,13 +17,28 @@ get_hub_desc(struct usb_pipe *pipe, struct usb_hub_descriptor *desc) struct usb_ctrlrequest req; req.bRequestType = USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_DEVICE; req.bRequest = USB_REQ_GET_DESCRIPTOR; -req.wValue = USB_DT_HUB8; +if (pipe-speed == USB_SUPERSPEED) +req.wValue = USB_DT_HUB38; +else +req.wValue = USB_DT_HUB8; req.wIndex = 0; req.wLength = sizeof(*desc); return usb_send_default_control(pipe, req, desc); } static int +set_hub_depth(struct usb_pipe *pipe, u16 depth) +{ +struct usb_ctrlrequest req; +req.bRequestType = USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_DEVICE; +req.bRequest = HUB_REQ_SET_HUB_DEPTH; +req.wValue = depth; +req.wIndex = 0; +req.wLength = 0; +return usb_send_default_control(pipe, req, NULL); +} + +static int set_port_feature(struct usbhub_s *hub, int port, int feature) { struct usb_ctrlrequest req; @@ -105,7 +120,9 @@ usb_hub_reset(struct usbhub_s *hub, u32 port) ret = get_port_status(hub, port, sts); if (ret) goto fail; -if (!(sts.wPortStatus USB_PORT_STAT_RESET)) +if (!(sts.wPortStatus USB_PORT_STAT_RESET) + (hub-usbdev-speed != USB_SUPERSPEED +|| !(sts.wPortStatus USB_PORT_STAT_LINK_MASK))) break; if (timer_check(end)) { warn_timeout(); @@ -119,6 +136,8 @@ usb_hub_reset(struct usbhub_s *hub, u32 port) // Device no longer present return -1; +if (hub-usbdev-speed == USB_SUPERSPEED) +return USB_SUPERSPEED; return ((sts.wPortStatus USB_PORT_STAT_SPEED_MASK) USB_PORT_STAT_SPEED_SHIFT); @@ -154,6 +173,19 @@ usb_hub_setup(struct usbdevice_s *usbdev) hub.portcount = desc.bNbrPorts; hub.op = HubOp; +if (usbdev-speed == USB_SUPERSPEED) { +int depth = 0; +struct usbdevice_s *parent = usbdev-hub-usbdev; +while (parent) { +depth++; +parent = parent-hub-usbdev; +} + +ret = set_hub_depth(usbdev-defpipe, depth); +if (ret) +return ret; +} + // Turn on power to ports. int port; for (port=0; portdesc.bNbrPorts; port++) { diff --git a/src/hw/usb-hub.h b/src/hw/usb-hub.h index 5b09947..880378c 100644 --- a/src/hw/usb-hub.h +++ b/src/hw/usb-hub.h @@ -11,6 +11,9 @@ int usb_hub_setup(struct usbdevice_s *usbdev); / #define USB_DT_HUB (USB_TYPE_CLASS | 0x09) +#define USB_DT_HUB3 (USB_TYPE_CLASS | 0x0a) + +#define HUB_REQ_SET_HUB_DEPTH 0x0C struct usb_hub_descriptor { u8 bDescLength; @@ -48,7 +51,8 @@ struct usb_port_status { #define USB_PORT_STAT_SUSPEND 0x0004 #define USB_PORT_STAT_OVERCURRENT 0x0008 #define USB_PORT_STAT_RESET 0x0010 -#define USB_PORT_STAT_L10x0020 +#define USB_PORT_STAT_LINK_SHIFT5 +#define USB_PORT_STAT_LINK_MASK (0x7 USB_PORT_STAT_LINK_SHIFT) #define USB_PORT_STAT_POWER 0x0100 #define USB_PORT_STAT_SPEED_SHIFT 9 #define USB_PORT_STAT_SPEED_MASK(0x3 USB_PORT_STAT_SPEED_SHIFT) -- 1.9.3 -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
[coreboot] Gigabyte GA-J1900N-D3V-1.x data
Hi coreboot and flashrom, I recently got a Gigabyte GA-J1900N-D3V-1.x board. This board is interesting to me because A) it's Bay Trail, B) it's got dual NICs and real serial ports, and C) it's inexpensive. I followed the guide at http://www.coreboot.org/Motherboard_Porting_Guide I put the logs and a README with more info at http://lackof.org/taggart/hacking/coreboot/GA-J1900N-D3V-1.x/ (and a tarball of that dir in the parent dir) The flashrom output is from SVN trunk as of today to ensure latest chip support. In particular flashrom reports untested: Found chipset Intel Bay Trail with PCI ID 8086:0f1c. Found Macronix flash chip MX25U6435E/F (8192 kB, SPI). I haven't yet attempted anything beyond that. I don't yet have an off-board way to flash the chips, I'm hoping to order something soon. If you have ideas of other things to try please let me know. Thanks, -- Matt Taggart m...@lackof.org -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot