[SeaBIOS] [PATCH v3 3/3] usb: add xhci support

Idwer Vollering vidwer at gmail.com
Tue Sep 24 16:47:26 CEST 2013


2013/9/13 Gerd Hoffmann <kraxel at redhat.com>:
> $subject says all.  Support for usb3 streams is not implemented yet,
> otherwise it is fully functional.  Tested all usb devices supported
> by qemu (keyboard, storage, usb hubs), except for usb attached scsi
> in usb3 mode (which needs streams).
>
> Tested on qemu only, tagged with QEMU_HARDWARE because of that.
> Testing with physical hardware to be done.

Booting an Asus F2A85-M, with CONFIG_DEBUG_LEVEL=7 and a keyboard
(Chesen PS/2-to-USB bridge) in one of its USB3 ports:

SeaBIOS (version rel-1.7.3-68-g0b3607f-dirty-20130924_163327-mint)
init usb
XHCI init on dev 00:10.0: regs @ 0xf0148000, 4 ports, 32 slots
XHCI    extcap 0x1 @ f0148500
XHCI    protocol USB  3.00, 2 ports (offset 1)
XHCI    protocol USB  2.00, 2 ports (offset 3)
/bf101000\ Start thread
|bf101000| configure_xhci: resetting
XHCI init on dev 00:10.1: regs @ 0xf014a000, 4 ports, 32 slots
XHCI    extcap 0x1 @ f014a500
XHCI    protocol USB  3.00, 2 ports (offset 1)
XHCI    protocol USB  2.00, 2 ports (offset 3)
/bf100000\ Start thread
|bf100000| configure_xhci: resetting
/bf0ff000\ Start thread
|bf0ff000| xhci_hub_detect port #1: 0x000002a0, powered, pls 5, speed 0 [ - ]
\bf0ff000/ End thread
EHCI init on dev 00:12.2 (regs=0xf014f820)
/bf0ff000\ Start thread
/bf0fe000\ Start thread
/bf0fc000\ Start thread
|bf0fc000| xhci_hub_detect port #1: 0x000002a0, powered, pls 5, speed 0 [ - ]
\bf0fc000/ End thread
/bf0fc000\ Start thread
|bf0fc000| xhci_hub_detect port #2: 0x000002a0, powered, pls 5, speed 0 [ - ]
\bf0fc000/ End thread
EHCI init on dev 00:13.2 (regs=0xf014f920)
/bf0fc000\ Start thread
/bf0fb000\ Start thread
/bf0fa000\ Start thread
\bf0fe000/ End thread
/bf0fe000\ Start thread
|bf0fe000| xhci_hub_detect port #2: 0x000002a0, powered, pls 5, speed 0 [ - ]
\bf0fe000/ End thread
/bf0fe000\ Start thread
|bf0fe000| xhci_hub_detect port #3: 0x000202e1, powered, pls 7, speed 0 [ - ]
|bf0fe000| xhci_hub_reset port #3: 0x000202e1, powered, pls 7, speed 0 [ - ]
OHCI init on dev 00:14.5 (regs=0xf014e000)
/bf0f9000\ Start thread
/bf0f8000\ Start thread
\bf0fb000/ End thread
/bf0fb000\ Start thread
\bf0fa000/ End thread
/bf0fa000\ Start thread
|bf0fa000| xhci_hub_detect port #3: 0x000002a0, powered, pls 5, speed 0 [ - ]
\bf0fa000/ End thread
/bf0fa000\ Start thread
|bf0fa000| xhci_hub_detect port #4: 0x000002a0, powered, pls 5, speed 0 [ - ]
\bf0fa000/ End thread
init ps2port
/bf0fa000\ Start thread
|bf0fa000| i8042_flush
|bf0fa000| i8042_command cmd=1aa
|bf0fa000| i8042_wait_write
|bf0fa000| i8042_wait_read
|bf0fa000| i8042 param=55
|bf0fa000| i8042_command cmd=1ab
|bf0fa000| i8042_wait_write
|bf0fa000| i8042_wait_read
|bf0fa000| i8042 param=0
|bf0fa000| ps2_command aux=0 cmd=2ff
|bf0fa000| i8042 ctr old=30 new=30
|bf0fa000| i8042_command cmd=1060
|bf0fa000| i8042_wait_write
|bf0fa000| i8042_wait_write
/bf0f7000\ Start thread
\bf0f8000/ End thread
/bf0f8000\ Start thread
\bf0fb000/ End thread
/bf0fb000\ Start thread
|bf0fb000| xhci_hub_detect port #4: 0x000202e1, powered, pls 7, speed 0 [ - ]
|bf0fb000| xhci_hub_reset port #4: 0x000202e1, powered, pls 7, speed 0 [ - ]
|bf0fe000| XHCI port #3: 0x00200a03, powered, enabled, pls 0, speed 2 [Low]
|bf0fe000| set_address 0x000edc00
|bf0fe000| xhci_alloc_pipe: usbdev 0xbf102070, ring 0xbf11e500, slotid 0, epid 1
init lpt
Found 0 lpt ports
init serial
Found 1 serial ports
init floppy drives
init hard drives
init ahci
AHCI controller at 11.0, iobase f014f000, irq 0
AHCI: cap 0xf3309f07, ports_impl 0x4
/bf0f6000\ Start thread
|bf0f6000| AHCI/2: probing
|bf0f6000| AHCI/2: link up
|bf0fa000| i8042_command cmd=1060
|bf0fa000| i8042_wait_write
|bf0fa000| i8042_wait_write
|bf0fa000| ps2_sendbyte aux=0 cmd=ff
|bf0fa000| i8042_kbd_write c=255
|bf0fa000| i8042_wait_write
/bf0f5000\ Start thread
\bf0f5000/ End thread
/bf0f5000\ Start thread
\bf0f7000/ End thread
/bf0f7000\ Start thread
\bf0f8000/ End thread
|bf0fb000| XHCI port #4: 0x00200e03, powered, enabled, pls 0, speed 3 [High]
|bf0fb000| set_address 0x000edb90
|bf0fb000| xhci_alloc_pipe: usbdev 0xbf0fdea0, ring 0xbf11e300, slotid 0, epid 1
|bf0fe000| xhci_cmd_enable_slot:
|bf0fe000| xhci_trb_queue: ring 0xbf11ed00 [nidx 1, len 0]
|bf0fe000| xhci_process_events: status change port #3
|bf0fe000| xhci_process_events: status change port #3
|bf0fe000| xhci_process_events: ring 0xbf11ed00 [trb 0xbf11ed00, evt
0xbf11ee00, type 33, eidx 1, cc 1]
|bf0fe000| xhci_control: enable slot: got slotid 1
|bf0fe000| xhci_control: root port 3, route 0x0
|bf0fe000| xhci_cmd_address_device: slotid 1
|bf0fe000| xhci_trb_queue: ring 0xbf11ed00 [nidx 2, len 0]
init megasas
|bf0f6000| AHCI/2: ... finished, status 0x51, ERROR 0x4
|bf0fa000| ps2 read fe
|bf0fa000| Got ps2 nak (status=51)
|bf0fa000| i8042_command cmd=1060
|bf0fa000| i8042_wait_write
|bf0fa000| i8042_wait_write
|bf0fa000| ps2 command 2ff failed (aux=0)
\bf0fa000/ End thread
/bf0fa000\ Start thread
\bf0fa000/ End thread
/bf0fa000\ Start thread
\bf0f5000/ End thread
\bf0f7000/ End thread
|bf0fb000| xhci_cmd_enable_slot:
|bf0fb000| xhci_trb_queue: ring 0xbf11ea00 [nidx 1, len 0]
|bf0fb000| xhci_process_events: status change port #4
|bf0fb000| xhci_process_events: status change port #4
|bf0fb000| xhci_process_events: ring 0xbf11ea00 [trb 0xbf11ea00, evt
0xbf11eb00, type 33, eidx 1, cc 1]
|bf0fb000| xhci_control: enable slot: got slotid 1
|bf0fb000| xhci_control: root port 4, route 0x0
|bf0fb000| xhci_cmd_address_device: slotid 1
|bf0fb000| xhci_trb_queue: ring 0xbf11ea00 [nidx 2, len 0]
|bf0fe000| xhci_process_events: ring 0xbf11ed00 [trb 0xbf11ed10, evt
0xbf11ee00, type 33, eidx 2, cc 1]
|bf0f6000| Searching bootorder for: /pci at i0cf8/*@11/drive at 2/disk at 0
|bf0f9000| ohci_free_pipes 0xbf0fdda0
\bf0fa000/ End thread
|bf0ff000| ehci_free_pipes 0xbf102180
|bf0fb000| xhci_process_events: ring 0xbf11ea00 [trb 0xbf11ea10, evt
0xbf11eb00, type 33, eidx 2, cc 1]
|bf0fe000| xhci_update_pipe: usbdev 0xbf102070, ring 0xbf11e500,
slotid 1, epid 1
|bf0fe000| config_usb: 0xbf11e620
|bf0fe000| xhci_trb_queue: ring 0xbf11e500 [nidx 1, len 8]
|bf0fe000| xhci_trb_queue: ring 0xbf11e500 [nidx 2, len 8]
|bf0fe000| xhci_trb_queue: ring 0xbf11e500 [nidx 3, len 0]
|bf0fe000| xhci_xfer_kick: ring 0xbf11e500, slotid 1, epid 1
|bf0f6000| AHCI/2: registering: "AHCI/2: Maxtor 6L250S0 ATA-7
Hard-Disk (233 GiBytes)"
|bf0f6000| Registering bootable: AHCI/2: Maxtor 6L250S0 ATA-7
Hard-Disk (233 GiBytes) (type:2 prio:103 data:f4840)
\bf0f6000/ End thread
\bf0f9000/ End thread
|bf0fc000| ehci_free_pipes 0xbf0fdfb0
|bf0fb000| xhci_update_pipe: usbdev 0xbf0fdea0, ring 0xbf11e300,
slotid 1, epid 1
|bf0fb000| config_usb: 0xbf11e420
|bf0fb000| xhci_trb_queue: ring 0xbf11e300 [nidx 1, len 8]
|bf0fb000| xhci_trb_queue: ring 0xbf11e300 [nidx 2, len 8]
|bf0fb000| xhci_trb_queue: ring 0xbf11e300 [nidx 3, len 0]
|bf0fb000| xhci_xfer_kick: ring 0xbf11e300, slotid 1, epid 1
\bf0ff000/ End thread
|bf0fb000| xhci_process_events: ring 0xbf11e300 [trb 0xbf11e320, evt
0xbf11e400, type 32, eidx 3, cc 6]
|bf0fb000| xhci_control: control xfer failed (cc 6)
|bf0fb000| xhci_cmd_disable_slot: slotid 1
|bf0fb000| xhci_trb_queue: ring 0xbf11ea00 [nidx 3, len 0]
\bf0fc000/ End thread
|bf0fb000| xhci_process_events: ring 0xbf11ea00 [trb 0xbf11ea20, evt
0xbf11eb00, type 33, eidx 3, cc 1]
\bf0fb000/ End thread
|bf100000| XHCI no devices found
\bf100000/ End thread
|bf0fe000| WARNING - Timeout at xhci_event_wait:403!
|bf0fe000| xhci_control: control xfer failed (cc -1)
|bf0fe000| xhci_cmd_disable_slot: slotid 1
|bf0fe000| xhci_trb_queue: ring 0xbf11ed00 [nidx 3, len 0]
|bf0fe000| xhci_process_events: ring 0xbf11ed00 [trb 0xbf11ed20, evt
0xbf11ee00, type 33, eidx 3, cc 1]
\bf0fe000/ End thread
|bf101000| XHCI no devices found
\bf101000/ End thread
All threads complete.
Scan for option roms
Attempting to init PCI bdf 00:00.0 (vd 1022:1410)
Attempting to map option rom on dev 00:00.0
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:01.1 (vd 1002:9902)
Attempting to map option rom on dev 00:01.1
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:10.0 (vd 1022:7812)
Attempting to map option rom on dev 00:10.0
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:10.1 (vd 1022:7812)
Attempting to map option rom on dev 00:10.1
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:11.0 (vd 1022:7801)
Attempting to map option rom on dev 00:11.0
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:12.0 (vd 1022:7807)
Attempting to map option rom on dev 00:12.0
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:12.2 (vd 1022:7808)
Attempting to map option rom on dev 00:12.2
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:13.0 (vd 1022:7807)
Attempting to map option rom on dev 00:13.0
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:13.2 (vd 1022:7808)
Attempting to map option rom on dev 00:13.2
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:14.0 (vd 1022:780b)
Attempting to map option rom on dev 00:14.0
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:14.2 (vd 1022:780d)
Attempting to map option rom on dev 00:14.2
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:14.3 (vd 1022:780e)
Attempting to map option rom on dev 00:14.3
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:14.4 (vd 1022:780f)
Attempting to map option rom on dev 00:14.4
Skipping non-normal pci device (type=81)
Attempting to init PCI bdf 00:14.5 (vd 1022:7809)
Attempting to map option rom on dev 00:14.5
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:14.7 (vd 1022:7806)
Attempting to map option rom on dev 00:14.7
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:15.0 (vd 1022:43a0)
Attempting to map option rom on dev 00:15.0
Skipping non-normal pci device (type=81)
Attempting to init PCI bdf 00:15.1 (vd 1022:43a1)
Attempting to map option rom on dev 00:15.1
Skipping non-normal pci device (type=81)
Attempting to init PCI bdf 00:18.0 (vd 1022:1400)
Attempting to map option rom on dev 00:18.0
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:18.1 (vd 1022:1401)
Attempting to map option rom on dev 00:18.1
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:18.2 (vd 1022:1402)
Attempting to map option rom on dev 00:18.2
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:18.3 (vd 1022:1403)
Attempting to map option rom on dev 00:18.3
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:18.4 (vd 1022:1404)
Attempting to map option rom on dev 00:18.4
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:18.5 (vd 1022:1405)
Attempting to map option rom on dev 00:18.5
Option rom sizing returned 0 0
Attempting to init PCI bdf 03:00.0 (vd 10ec:8168)
Attempting to map option rom on dev 03:00.0
Option rom sizing returned 0 0

Press F12 for boot menu.

Checking for bootsplash
Searching bootorder for: HALT
Mapping hd drive 0x000f4840 to 0
drive 0x000f4840: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=490234752
finalize PMM
malloc finalize
Space available for UMB: d0000-eb000, f4340-f4840
Returned 61440 bytes of ZoneHigh
e820 map has 7 items:
  0: 0000000000000000 - 000000000009fc00 = 1 RAM
  1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED
  2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
  3: 0000000000100000 - 00000000bf11e000 = 1 RAM
  4: 00000000bf11e000 - 00000000e0000000 = 2 RESERVED
  5: 00000000f8000000 - 00000000fc000000 = 2 RESERVED
  6: 0000000100000000 - 000000021f000000 = 1 RAM
Jump to int19
enter handle_19:
  NULL
Booting from Hard Disk...
Booting from 0000:7c00



More information about the SeaBIOS mailing list