[SeaBIOS] USB1 devices and CONFIG_THREADS

David Woodhouse dwmw2 at infradead.org
Thu Dec 5 22:26:27 CET 2013


On Thu, 2013-12-05 at 11:59 -0500, Kevin O'Connor wrote:
> 
> I reviewed the code and booted my e350m1 board with an OHCI keyboard
> and I can't reproduce your issue.  Can you post the logs (with debug
> level 8) of the failure you are seeing?

With some debugging of my own added. Note that ohci_setup() is called
from usb_setup(). Not from ehci_note_port(). And that this happens:

|00fe1000| ohci_hub_detect port 0: sts 0

Before this does:

|00fe3000| port 0 has a full speed device
|00fe3000| ehci_hub_reset returns -1

I think this is because the EHCI device has a lower PCI function
(0:14.3) than its corresponding OHCI device (0:14.4)? Trying to make
sense of the loop in usb_setup(), I think it only really works if the
EHCI device comes *after* the OHCI device?

[dwmw2 at shinybook Quark_EDKII_0_8_0_RC3_1]$ grep -A103 'init usb' ~/git/clantonusb5.cap  | sed 's/ *$//'
init usb
ehci_setup()
_malloc zone=0x00fefe8f handle=ffffffff size=72 align=10 ret=0x00fe5e60 (detail=0x00fe5eb0)
EHCI init on dev 00:14.3 (regs=0x9000d010)
_malloc zone=0x00fefe8f handle=ffffffff size=4096 align=1000 ret=0x00fe4000 (detail=0x00fe5e30)
/00fe4000\ Start thread
|00fe4000| _malloc zone=0x00fefe9b handle=ffffffff size=4096 align=1000 ret=0x00fff000 (detail=0x00fe5e00)
|00fe4000| _malloc zone=0x00fefe9b handle=ffffffff size=68 align=80 ret=0x00ffef80 (detail=0x00fe5dd0)
|00fe4000| _malloc zone=0x00fefe9b handle=ffffffff size=68 align=80 ret=0x00ffef00 (detail=0x00fe5da0)
|00fe4000| _malloc zone=0x00fefe8f handle=ffffffff size=28 align=10 ret=0x00fe5d50 (detail=0x00fe5d70)
|00fe4000| _malloc zone=0x00fefe8f handle=ffffffff size=4096 align=1000 ret=0x00fe3000 (detail=0x00fe5d20)
/00fe3000\ Start thread
ohci_setup() called from usb_setup
ohci_setup()
_malloc zone=0x00fefe8f handle=ffffffff size=24 align=10 ret=0x00fe5cd0 (detail=0x00fe5cf0)
OHCI init on dev 00:14.4 (regs=0x9000c000)
_malloc zone=0x00fefe8f handle=ffffffff size=4096 align=1000 ret=0x00fe2000 (detail=0x00fe5ca0)
/00fe2000\ Start thread
|00fe2000| _malloc zone=0x00fefe9b handle=ffffffff size=256 align=100 ret=0x00ffee00 (detail=0x00fe5c70)
|00fe2000| _malloc zone=0x00fefe9b handle=ffffffff size=16 align=10 ret=0x00ffeff0 (detail=0x00fe5c40)
|00fe4000| _malloc zone=0x00fefe8f handle=ffffffff size=28 align=10 ret=0x00fe5bf0 (detail=0x00fe5c10)
|00fe4000| _malloc zone=0x00fefe8f handle=ffffffff size=4096 align=1000 ret=0x00fe1000 (detail=0x00fe5bc0)
/00fe1000\ Start thread
init ps2port
_malloc zone=0x00fefe8f handle=ffffffff size=4096 align=1000 ret=0x00fe0000 (detail=0x00fe5b90)
/00fe0000\ Start thread
|00fe0000| i8042_flush
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| i8042 flushed ff (status=ff)
|00fe0000| WARNING - Timeout at i8042_flush:71!
|00fe2000| _free 0x00fe0000 (detail=0x00fe5b90)
\00fe0000/ End thread
|00fe1000| ehci_hub_detect 1 not found one
|00fe1000| _free 0x00fe5bf0 (detail=0x00fe5c10)
|00fe3000| _free 0x00fe1000 (detail=0x00fe5bc0)
\00fe1000/ End thread
|00fe3000| ehci_hub_detect 0 found one
init lpt
Found 0 lpt ports
init serial
Found 0 serial ports
init floppy drives
init hard drives
init ahci
Found floppy of size 1474560
_malloc zone=0x00fefe97 handle=ffffffff size=36 align=10 ret=0x000f5720 (detail=0x00fe5c10)
Mapping SPI floppy at addr 0xff800000
_malloc zone=0x00fefe8f handle=ffffffff size=24 align=10 ret=0x00fe5bc0 (detail=0x00fe5be0)
Registering bootable: Ramdisk [SPI] (type:1 prio:0 data:f5720)
init megasas
handle_08
handle_hwpic1 irq=1
|00fe2000| _malloc zone=0x00fefe8f handle=ffffffff size=28 align=10 ret=0x00fe5b70 (detail=0x00fe5b90)
|00fe2000| _malloc zone=0x00fefe8f handle=ffffffff size=4096 align=1000 ret=0x00fe1000 (detail=0x00fe5b40)
/00fe1000\ Start thread
|00fe1000| ohci_hub_detect port 0: sts 0
|00fe1000| _free 0x00fe5b70 (detail=0x00fe5b90)
|00fe4000| _free 0x00fe1000 (detail=0x00fe5b40)
\00fe1000/ End thread
|00fe3000| port 0 has a full speed device
|00fe3000| ehci_hub_reset returns -1
|00fe3000| port 0 speed -1
|00fe3000| _free 0x00fe5d50 (detail=0x00fe5d70)
_free 0x00fe3000 (detail=0x00fe5d20)
\00fe3000/ End thread
handle_08
|00fe2000| _malloc zone=0x00fefe8f handle=ffffffff size=28 align=10 ret=0x00fe5d50 (detail=0x00fe5d70)
|00fe2000| _malloc zone=0x00fefe8f handle=ffffffff size=4096 align=1000 ret=0x00fe3000 (detail=0x00fe5d20)
/00fe3000\ Start thread
|00fe3000| ohci_hub_detect port 1: sts 0
|00fe3000| _free 0x00fe5d50 (detail=0x00fe5d70)
|00fe4000| _free 0x00fe3000 (detail=0x00fe5d20)
\00fe3000/ End thread
|00fe4000| check_ehci_ports found 0
|00fe4000| ehci_free_pipes 0x00fe5e60
|00fe2000| check_ohci_ports() found 0 devices
|00fe2000| ohci_free_pipes 0x00fe5cd0
handle_08
|00fe2000| _free 0x00ffee00 (detail=0x00fe5c70)
|00fe2000| _free 0x00ffeff0 (detail=0x00fe5c40)
|00fe4000| _free 0x00fe2000 (detail=0x00fe5ca0)
\00fe2000/ End thread
|00fe4000| _free 0x00fff000 (detail=0x00fe5e00)
|00fe4000| _free 0x00ffef80 (detail=0x00fe5dd0)
|00fe4000| _free 0x00ffef00 (detail=0x00fe5da0)
|00fe4000| _free 0x00fe5e60 (detail=0x00fe5eb0)
_free 0x00fe4000 (detail=0x00fe5e30)
\00fe4000/ End thread
All threads complete.
enter handle_16:



-- 
dwmw2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://www.seabios.org/pipermail/seabios/attachments/20131205/966d270c/attachment.bin>


More information about the SeaBIOS mailing list