Hi Matt,

I created a bootorder file and added it to cbfs, but initially had issues with USB not being properly initialized during boot.

From the cbmem log:
boot order:
1: /pci@i0cf8/usb@14/usb-*@0
2: /pci@i0cf8/usb@14/usb-*@1
... (snip)
48: /pci@i0cf8/usb@1d/hub@1/usb-*@7
49: /pci@i0cf8/*@1f,2/drive@0/disk@0
... (snip)
SeaBIOS (version rel-1.10.2-0-g5f4c7b1)
XHCI init on dev 00:14.0: regs @ 0xe0720000, 8 ports, 32 slots, 32 byte contexts
XHCI    protocol USB  2.00, 4 ports (offset 1), def 3001
XHCI    protocol USB  3.00, 4 ports (offset 5), def 1000
XHCI    extcap 0xc1 @ 0xe0728040
XHCI    extcap 0xc0 @ 0xe0728070
XHCI    extcap 0x1 @ 0xe0728330
EHCI init on dev 00:1a.0 (regs=0xe073f020)
EHCI init on dev 00:1d.0 (regs=0xe0740020)
... (snip)
XHCI no devices found
Initialized USB HUB (0 ports used)
ehci_wait_td error - status=80e42
Initialized USB HUB (0 ports used)
Initialized USB HUB (0 ports used)
All threads complete.

Googling "ehci_wait_td error - status=80e42" returns threads from years ago with people asking if it's a bug in SeaBIOS or coreboot.

I noticed that I was running SeaBIOS 1.10 and that 1.11 is now available. I updated SeaBIOS to 1.11 and reflashed, and now I am able to boot from USB successfully.

So thanks again for the tip on the bootorder file. If anyone else is having difficulties booting from USB and you're running SeaBIOS 1.10, consider upgrading to SeaBIOS 1.11. Thankfully updating resolved the USB initializing issue I was facing.

-Hal


On Sat, Dec 2, 2017 at 7:29 PM, Matt DeVillier <matt.devillier@gmail.com> wrote:
yes, just enumerate all ports/hubs.  here's mine:


if there's an impact on boot time its imperceptible.  What can slow things down are connected devices which don't initialize/respond to queries within the USB spec, but this is regardless of their presence in the bootorder file


On Sat, Dec 2, 2017 at 12:16 PM, Hal Martin <hal.martin@gmail.com> wrote:
Hi Matt,

That's a great tip, thanks for the link!

Looking at the file, it seems I would just specify every USB port from the PCH EHCI/xHCI controllers.

Do you know if this slows down boot noticeably if there are USB devices attached which aren't bootable (e.g. keyboard)? Or the case where there are potentially bootable devices (e.g. mass storage) but which lack a bootloader in the MBR?

I'll be back with results once I've done some testing.

Thanks again,
Hal

On Sat, Dec 2, 2017 at 7:08 PM, Matt DeVillier <matt.devillier@gmail.com> wrote:

Hal,

your USB controllers are at 14.0 and 1d.0, so your bootorder file needs to enumerate all devices attached to said controllers.  I'm not sure how many devices can be attached to each for IvyBridge, but here's the bootorder file Google uses for reference:


HTH,
Matt

On Sat, Dec 2, 2017 at 2:09 AM, Hal Martin <hal.martin@gmail.com> wrote:
Hi all,

I'd like to learn more about SeaBIOS boot order, but unfortunately I wasn't able to find the answer to my question on the wiki page:

I would like to add a bootscript for SeaBIOS to search for USB boot devices before falling back to the hdd or PXE.

If I have USB bootable media plugged in, SeaBIOS seems to immediately boot from the hdd. I'm not able to boot from USB unless I physically unplug the SATA connection.

When I look at the console log in cbmem, I don't see SeaBIOS searching the USB controller at all. 

It's an Ivy Bridge platform.

SeaBIOS log from cbmem:
Searching bootorder for: /pci@i0cf8/*@1f,2/drive@0/disk@0
Searching bootorder for: /pci@i0cf8/pci-bridge@1c,3/*@0
Press ESC for boot menu.

lspci:
00:00.0 Host bridge [0600]: Intel Corporation 3rd Gen Core processor DRAM Controller [8086:0154] (rev 09)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port [8086:0151] (rev 09) (prog-if 00 [Normal decode])
00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port [8086:0155] (rev 09) (prog-if 00 [Normal decode])
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04) (prog-if 30 [XHCI])
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) [8086:1502] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04) (prog-if 20 [EHCI])
00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller [8086:1e20] (rev 04)
00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4) (prog-if 00 [Normal decode])
00:1c.4 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 [8086:1e18] (rev c4) (prog-if 00 [Normal decode])
00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04) (prog-if 20 [EHCI])
00:1f.0 ISA bridge [0601]: Intel Corporation HM76 Express Chipset LPC Controller [8086:1e59] (rev 04)
00:1f.2 SATA controller [0106]: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e03] (rev 04) (prog-if 01 [AHCI 1.0])
00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller [8086:1e22] (rev 04)
00:1f.6 Signal processing controller [1180]: Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller [8086:1e24] (rev 04)

Any suggestions?

Thanks,
Hal

--
coreboot mailing list: coreboot@coreboot.org
https://mail.coreboot.org/mailman/listinfo/coreboot