xhci bochs - qemu - real hardware
Posted: Wed Jan 29, 2020 2:35 pm
Hello everyone.
I have been working on my XHCI driver for half a year now.
This is the code I wrote for it so far: https://github.com/AdeRegt/SanderOSUSB/ ... dev/xhci.c
I used BOCHS as my main testing device since it had great debugging tools.
I'm running BOCHS with an emulated USB stick.
I got my BOCHS code this far that I am attempting to read the descriptor of the connected USB device.
Somehow, this returns an array of 0 on Bochs:
00118992392e[USBMSD] USB MSD handle_control: unknown descriptor type 0x00
I was hoping this would be because I'm just emulating a USB and I wanted to test it on qemu.
My code on qemu and real hardware was totally incompatible with addresses.
I had to use an offset on real hardware of 0x7C and on qemu I found a way to get the right offset (lines 57-64 in my code).
I run my code again and qemu hangs at line 295.
My questions are:
A: What did I do wrong that qemu keeps hanging at line 295?
B: Is there a more easy way to get the right offsets?
The following messages are emitted by qemu after the reset:
[email protected]:usb_xhci_reset === RESET ===
[email protected]:usb_xhci_slot_disable slotid 1
[email protected]:usb_xhci_ep_disable slotid 1, epid 1
[email protected]:usb_xhci_ep_disable slotid 1, epid 3
[email protected]:usb_xhci_slot_disable slotid 2
[email protected]:usb_xhci_ep_disable slotid 2, epid 1
[email protected]:usb_xhci_slot_disable slotid 3
[email protected]:usb_xhci_slot_disable slotid 4
[email protected]:usb_xhci_slot_disable slotid 5
[email protected]:usb_xhci_slot_disable slotid 6
[email protected]:usb_xhci_slot_disable slotid 7
[email protected]:usb_xhci_slot_disable slotid 8
[email protected]:usb_xhci_slot_disable slotid 9
[email protected]:usb_xhci_slot_disable slotid 10
[email protected]:usb_xhci_slot_disable slotid 11
[email protected]:usb_xhci_slot_disable slotid 12
[email protected]:usb_xhci_slot_disable slotid 13
[email protected]:usb_xhci_slot_disable slotid 14
[email protected]:usb_xhci_slot_disable slotid 15
[email protected]:usb_xhci_slot_disable slotid 16
[email protected]:usb_xhci_slot_disable slotid 17
[email protected]:usb_xhci_slot_disable slotid 18
[email protected]:usb_xhci_slot_disable slotid 19
[email protected]:usb_xhci_slot_disable slotid 20
[email protected]:usb_xhci_slot_disable slotid 21
[email protected]:usb_xhci_slot_disable slotid 22
[email protected]:usb_xhci_slot_disable slotid 23
[email protected]:usb_xhci_slot_disable slotid 24
[email protected]:usb_xhci_slot_disable slotid 25
[email protected]:usb_xhci_slot_disable slotid 26
[email protected]:usb_xhci_slot_disable slotid 27
[email protected]:usb_xhci_slot_disable slotid 28
[email protected]:usb_xhci_slot_disable slotid 29
[email protected]:usb_xhci_slot_disable slotid 30
[email protected]:usb_xhci_slot_disable slotid 31
[email protected]:usb_xhci_slot_disable slotid 32
[email protected]:usb_xhci_slot_disable slotid 33
[email protected]:usb_xhci_slot_disable slotid 34
[email protected]:usb_xhci_slot_disable slotid 35
[email protected]:usb_xhci_slot_disable slotid 36
[email protected]:usb_xhci_slot_disable slotid 37
[email protected]:usb_xhci_slot_disable slotid 38
[email protected]:usb_xhci_slot_disable slotid 39
[email protected]:usb_xhci_slot_disable slotid 40
[email protected]:usb_xhci_slot_disable slotid 41
[email protected]:usb_xhci_slot_disable slotid 42
[email protected]:usb_xhci_slot_disable slotid 43
[email protected]:usb_xhci_slot_disable slotid 44
[email protected]:usb_xhci_slot_disable slotid 45
[email protected]:usb_xhci_slot_disable slotid 46
[email protected]:usb_xhci_slot_disable slotid 47
[email protected]:usb_xhci_slot_disable slotid 48
[email protected]:usb_xhci_slot_disable slotid 49
[email protected]:usb_xhci_slot_disable slotid 50
[email protected]:usb_xhci_slot_disable slotid 51
[email protected]:usb_xhci_slot_disable slotid 52
[email protected]:usb_xhci_slot_disable slotid 53
[email protected]:usb_xhci_slot_disable slotid 54
[email protected]:usb_xhci_slot_disable slotid 55
[email protected]:usb_xhci_slot_disable slotid 56
[email protected]:usb_xhci_slot_disable slotid 57
[email protected]:usb_xhci_slot_disable slotid 58
[email protected]:usb_xhci_slot_disable slotid 59
[email protected]:usb_xhci_slot_disable slotid 60
[email protected]:usb_xhci_slot_disable slotid 61
[email protected]:usb_xhci_slot_disable slotid 62
[email protected]:usb_xhci_slot_disable slotid 63
[email protected]:usb_xhci_slot_disable slotid 64
[email protected]:usb_xhci_port_link port 1, pls 5
[email protected]:usb_xhci_port_notify port 1, bits 0x20000
[email protected]:usb_xhci_port_link port 2, pls 5
[email protected]:usb_xhci_port_notify port 2, bits 0x20000
[email protected]:usb_xhci_port_link port 3, pls 5
[email protected]:usb_xhci_port_notify port 3, bits 0x20000
[email protected]:usb_xhci_port_link port 4, pls 5
[email protected]:usb_xhci_port_notify port 4, bits 0x20000
[email protected]:usb_xhci_port_link port 5, pls 7
[email protected]:usb_xhci_port_notify port 5, bits 0x20000
[email protected]:usb_xhci_port_link port 6, pls 7
[email protected]:usb_xhci_port_notify port 6, bits 0x20000
[email protected]:usb_xhci_port_link port 7, pls 5
[email protected]:usb_xhci_port_notify port 7, bits 0x20000
[email protected]:usb_xhci_port_link port 8, pls 5
[email protected]:usb_xhci_port_notify port 8, bits 0x20000
[email protected]:usb_xhci_irq_intx level 0
[email protected]:usb_xhci_oper_read off 0x0004, ret 0x00000001
[email protected]:usb_xhci_oper_read off 0x0000, ret 0x00000000
[email protected]:usb_xhci_runtime_read off 0x0028, ret 0x00000000
[email protected]:usb_xhci_runtime_write off 0x0028, val 0x00000001
[email protected]:usb_xhci_runtime_write off 0x0038, val 0x00116c00
[email protected]:usb_xhci_runtime_write off 0x003c, val 0x00000000
[email protected]:usb_xhci_runtime_write off 0x0030, val 0x00116a00
[email protected]:usb_xhci_runtime_write off 0x0034, val 0x00000000
[email protected]:usb_xhci_oper_read off 0x0018, ret 0x00000000
[email protected]:usb_xhci_oper_write off 0x0018, val 0x00116e00
[email protected]:usb_xhci_oper_write off 0x001c, val 0x00000000
[email protected]:usb_xhci_oper_read off 0x0030, ret 0x00000000
[email protected]:usb_xhci_oper_write off 0x0030, val 0x00116b00
[email protected]:usb_xhci_oper_write off 0x0034, val 0x00000000
[email protected]:usb_xhci_oper_read off 0x0000, ret 0x00000000
[email protected]:usb_xhci_oper_write off 0x0000, val 0x00000004
[email protected]:usb_xhci_irq_intx level 0
[email protected]:usb_xhci_oper_read off 0x0000, ret 0x00000004
[email protected]:usb_xhci_oper_write off 0x0000, val 0x00000005
[email protected]:usb_xhci_run
[email protected]:usb_xhci_irq_intx level 0
[email protected]:usb_xhci_oper_read off 0x0004, ret 0x00000000
[email protected]:usb_xhci_oper_read off 0x0000, ret 0x00000005
[email protected]:usb_xhci_port_read port 1, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_write port 1, off 0x0000, val 0x00000210
[email protected]:usb_xhci_port_reset port 1, warm 0
[email protected]:usb_xhci_port_read port 1, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_read port 2, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_write port 2, off 0x0000, val 0x00000210
[email protected]:usb_xhci_port_reset port 2, warm 0
[email protected]:usb_xhci_port_read port 2, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_read port 3, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_write port 3, off 0x0000, val 0x00000210
[email protected]:usb_xhci_port_reset port 3, warm 0
[email protected]:usb_xhci_port_read port 3, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_read port 4, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_write port 4, off 0x0000, val 0x00000210
[email protected]:usb_xhci_port_reset port 4, warm 0
[email protected]:usb_xhci_port_read port 4, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_read port 5, off 0x0000, ret 0x00020ee1
[email protected]:usb_xhci_doorbell_write off 0x0000, val 0x00000000
[email protected]:usb_xhci_fetch_trb addr 0x0000000000116e00, CR_ENABLE_SLOT, p 0x0000000000000000, s 0x00000000, c 0x00002400
[email protected]:usb_xhci_runtime_read off 0x0020, ret 0x00000000
The following are the working bochs messages:
00184710831d[XHCI ] register read from offset 0x0000: 0x0000000000000020 (len=1)
00184784396d[XHCI ] register read from offset 0x0002: 0x0000000000000100 (len=4)
00184820376d[XHCI ] register read from offset 0x0010: 0x000000000140530F (len=4)
00184820376d[XHCI ] register read from offset 0x0007: 0x0000000000000000 (len=1)
00184930819d[XHCI ] register read from offset 0x0018: 0x0000000000000600 (len=4)
00185003908d[XHCI ] register read from offset 0x0014: 0x0000000000000800 (len=4)
00185076520d[XHCI ] register read from offset 0x0058: 0x0000000000000000 (len=4)
00185112883d[XHCI ] register read from offset 0x0050: 0x0000000000000000 (len=4)
00185149235d[XHCI ] register read from offset 0x0038: 0x0000000000000000 (len=4)
00185185587d[XHCI ] register read from offset 0x0020: 0x0000000000000000 (len=4)
00185221478d[XHCI ] register read from offset 0x0020: 0x0000000000000000 (len=4)
00185221478d[XHCI ] register write to offset 0x0020: 0x0000000000000002 (len=4)
00188584523d[XHCI ] register read from offset 0x0024: 0x0000000000000001 (len=4)
00188584523d[XHCI ] register read from offset 0x0020: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register read from offset 0x0628: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register write to offset 0x0628: 0x0000000000000001 (len=4)
00188622016d[XHCI ] register write to offset 0x0638: 0x0000000000116C00 (len=4)
00188622016d[XHCI ] register write to offset 0x063C: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register write to offset 0x0630: 0x0000000000116A00 (len=4)
00188622016d[XHCI ] register write to offset 0x0634: 0x0000000000000000 (len=4)
00188622016d[XHCI ] Interrupter 00: Event Ring Table (at 0x0000000000116a00) has 1 entries:
00188622016d[XHCI ] 00: address = 0x0000000000116c00 Count = 16
00188622016d[XHCI ] register read from offset 0x0038: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register write to offset 0x0038: 0x0000000000116E00 (len=4)
00188622016d[XHCI ] register write to offset 0x003C: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register read from offset 0x0050: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register write to offset 0x0050: 0x0000000000116B00 (len=4)
00188622016d[XHCI ] register write to offset 0x0054: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register read from offset 0x0020: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register write to offset 0x0020: 0x0000000000000004 (len=4)
00192184587d[XHCI ] register read from offset 0x0020: 0x0000000000000004 (len=4)
00192184587d[XHCI ] register write to offset 0x0020: 0x0000000000000005 (len=4)
00195784640d[XHCI ] register read from offset 0x0024: 0x0000000000000000 (len=4)
00195784640d[XHCI ] register read from offset 0x0020: 0x0000000000000005 (len=4)
00195858290d[XHCI ] register read from offset 0x0420: 0x0000000000000000 (len=4)
00195858308d[XHCI ] register write to offset 0x0420: 0x0000000000000210 (len=4)
00195858308i[XHCI ] Reset port #1, type=0
00199384698d[XHCI ] register read from offset 0x0420: 0x0000000000201203 (len=4)
00199531697d[XHCI ] register write to offset 0x0800: 0x0000000000000000 (len=4)
00199531697d[XHCI ] Command Doorbell Rang
00199531697d[XHCI ] Dump command trb: 9(dec) (0x0000000000000000 0x00000000 0x00002400) (0)
00199531697d[XHCI ] 0x0000000000116e00: Command Ring: Found Enable Slot TRB (slot = 1) (returning 1)
00199531697d[XHCI ] register read from offset 0x0620: 0x0000000000000001 (len=1)
00199614344d[XHCI ] register write to offset 0x0800: 0x0000000000000000 (len=4)
00199614344d[XHCI ] Command Doorbell Rang
00199614344d[XHCI ] Dump command trb: 11(dec) (0x00000000000304d0 0x00000000 0x01002C00) (0)
00199614344d[XHCI ] slot_context->int_target = 0, slot_context->max_exit_latency = 0
00199614344d[XHCI ] ep_num = 1, speed = -1, ep_context->max_packet_size = 1
00199614344d[XHCI ] 0x0000000000116e10: Command Ring: SetAddress TRB (bsr = 0) (addr = 2) (slot = 1) (returning 1)
00199614376d[XHCI ] register read from offset 0x0620: 0x0000000000000001 (len=1)
00199688937d[XHCI ] register write to offset 0x0800: 0x0000000000000000 (len=4)
00199688937d[XHCI ] Command Doorbell Rang
00199688937d[XHCI ] Dump command trb: 12(dec) (0x00000000000304d0 0x00000000 0x01003000) (0)
00199688937d[XHCI ] 0x0000000000116e20: Command Ring: Found Config_EP TRB (slot = 1) (returning 1)
00199688937d[XHCI ] register read from offset 0x0620: 0x0000000000000001 (len=1)
00199800258d[XHCI ] register write to offset 0x0804: 0x0000000000000001 (len=4)
00199800258d[XHCI ] Rang Doorbell: slot = 1 ep = 1 (IN)
00199800258d[XHCI ] Found TRB: address = 0x0000000000117000 0x0000000000040680 0x00400008 0x00030841 1
00199800258d[XHCI ] Found TRB: address = 0x0000000000117000 0x0000000000040680 0x00400008 0x00030841 1 (SPD occurred = 0)
00199800258d[XHCI ] 0x0000000000117000: Transfer Ring (slot = 1) (ep = 1) (len = 8): Found SETUP TRB
00199800258e[USBMSD] USB MSD handle_control: unknown descriptor type 0x00
00199800258d[XHCI ] OUT: Transferred 8 bytes (ret = -3)
00199800258d[XHCI ] Found TRB: address = 0x0000000000117010 0x0000000000030524 0x00000008 0x00010C01 1 (SPD occurred = 0)
00199800258d[XHCI ] 0x0000000000117010: Transfer Ring (slot = 1) (ep = 1) (len = 8): Found DATA STAGE TRB
00199800258d[XHCI ] Process Transfer Ring: Processed 2 TRB's
00199800258d[XHCI ] register read from offset 0x0620: 0x0000000000000001 (len=1)
00599911076d[XHCI ] register read from offset 0x0430: 0x0000000000000000 (len=4)
00599911076d[XHCI ] register write to offset 0x0430: 0x0000000000000210 (len=4)
00599911076i[XHCI ] Reset port #2, type=0
00603111124d[XHCI ] register read from offset 0x0430: 0x00000000000002A0 (len=4)
00603111124d[XHCI ] register read from offset 0x0440: 0x0000000000000000 (len=4)
00603111124d[XHCI ] register write to offset 0x0440: 0x0000000000000210 (len=4)
00603111124i[XHCI ] Reset port #3, type=0
00606711184d[XHCI ] register read from offset 0x0440: 0x00000000000002A0 (len=4)
00606711184d[XHCI ] register read from offset 0x0450: 0x0000000000000000 (len=4)
00606711184d[XHCI ] register write to offset 0x0450: 0x0000000000000210 (len=4)
00606711184i[XHCI ] Reset port #4, type=0
00610311244d[XHCI ] register read from offset 0x0450: 0x00000000000002A0 (len=4)
00610311244e[XHCI ] register read from unknown offset 0x00000460: 0x0000000000000000 (len=4)
00610311244d[XHCI ] register read from offset 0x0460: 0x0000000000000000 (len=4)
00610311244d[XHCI ] register write to offset 0x0460: 0x0000000000000210 (len=4)
00610311244e[XHCI ] register write to unknown offset 0x00000460: 0x0000000000000210 (len=4)
00613911295e[XHCI ] register read from unknown offset 0x00000460: 0x0000000000000000 (len=4)
00613911295d[XHCI ] register read from offset 0x0460: 0x0000000000000000 (len=4)
00613911302d[XHCI ] register read from offset 0x0038: 0x0000000000000008 (len=4)
01741168000p[XGUI ] >>PANIC<< POWER button turned off.
I have been working on my XHCI driver for half a year now.
This is the code I wrote for it so far: https://github.com/AdeRegt/SanderOSUSB/ ... dev/xhci.c
I used BOCHS as my main testing device since it had great debugging tools.
I'm running BOCHS with an emulated USB stick.
I got my BOCHS code this far that I am attempting to read the descriptor of the connected USB device.
Somehow, this returns an array of 0 on Bochs:
00118992392e[USBMSD] USB MSD handle_control: unknown descriptor type 0x00
I was hoping this would be because I'm just emulating a USB and I wanted to test it on qemu.
My code on qemu and real hardware was totally incompatible with addresses.
I had to use an offset on real hardware of 0x7C and on qemu I found a way to get the right offset (lines 57-64 in my code).
I run my code again and qemu hangs at line 295.
My questions are:
A: What did I do wrong that qemu keeps hanging at line 295?
B: Is there a more easy way to get the right offsets?
The following messages are emitted by qemu after the reset:
[email protected]:usb_xhci_reset === RESET ===
[email protected]:usb_xhci_slot_disable slotid 1
[email protected]:usb_xhci_ep_disable slotid 1, epid 1
[email protected]:usb_xhci_ep_disable slotid 1, epid 3
[email protected]:usb_xhci_slot_disable slotid 2
[email protected]:usb_xhci_ep_disable slotid 2, epid 1
[email protected]:usb_xhci_slot_disable slotid 3
[email protected]:usb_xhci_slot_disable slotid 4
[email protected]:usb_xhci_slot_disable slotid 5
[email protected]:usb_xhci_slot_disable slotid 6
[email protected]:usb_xhci_slot_disable slotid 7
[email protected]:usb_xhci_slot_disable slotid 8
[email protected]:usb_xhci_slot_disable slotid 9
[email protected]:usb_xhci_slot_disable slotid 10
[email protected]:usb_xhci_slot_disable slotid 11
[email protected]:usb_xhci_slot_disable slotid 12
[email protected]:usb_xhci_slot_disable slotid 13
[email protected]:usb_xhci_slot_disable slotid 14
[email protected]:usb_xhci_slot_disable slotid 15
[email protected]:usb_xhci_slot_disable slotid 16
[email protected]:usb_xhci_slot_disable slotid 17
[email protected]:usb_xhci_slot_disable slotid 18
[email protected]:usb_xhci_slot_disable slotid 19
[email protected]:usb_xhci_slot_disable slotid 20
[email protected]:usb_xhci_slot_disable slotid 21
[email protected]:usb_xhci_slot_disable slotid 22
[email protected]:usb_xhci_slot_disable slotid 23
[email protected]:usb_xhci_slot_disable slotid 24
[email protected]:usb_xhci_slot_disable slotid 25
[email protected]:usb_xhci_slot_disable slotid 26
[email protected]:usb_xhci_slot_disable slotid 27
[email protected]:usb_xhci_slot_disable slotid 28
[email protected]:usb_xhci_slot_disable slotid 29
[email protected]:usb_xhci_slot_disable slotid 30
[email protected]:usb_xhci_slot_disable slotid 31
[email protected]:usb_xhci_slot_disable slotid 32
[email protected]:usb_xhci_slot_disable slotid 33
[email protected]:usb_xhci_slot_disable slotid 34
[email protected]:usb_xhci_slot_disable slotid 35
[email protected]:usb_xhci_slot_disable slotid 36
[email protected]:usb_xhci_slot_disable slotid 37
[email protected]:usb_xhci_slot_disable slotid 38
[email protected]:usb_xhci_slot_disable slotid 39
[email protected]:usb_xhci_slot_disable slotid 40
[email protected]:usb_xhci_slot_disable slotid 41
[email protected]:usb_xhci_slot_disable slotid 42
[email protected]:usb_xhci_slot_disable slotid 43
[email protected]:usb_xhci_slot_disable slotid 44
[email protected]:usb_xhci_slot_disable slotid 45
[email protected]:usb_xhci_slot_disable slotid 46
[email protected]:usb_xhci_slot_disable slotid 47
[email protected]:usb_xhci_slot_disable slotid 48
[email protected]:usb_xhci_slot_disable slotid 49
[email protected]:usb_xhci_slot_disable slotid 50
[email protected]:usb_xhci_slot_disable slotid 51
[email protected]:usb_xhci_slot_disable slotid 52
[email protected]:usb_xhci_slot_disable slotid 53
[email protected]:usb_xhci_slot_disable slotid 54
[email protected]:usb_xhci_slot_disable slotid 55
[email protected]:usb_xhci_slot_disable slotid 56
[email protected]:usb_xhci_slot_disable slotid 57
[email protected]:usb_xhci_slot_disable slotid 58
[email protected]:usb_xhci_slot_disable slotid 59
[email protected]:usb_xhci_slot_disable slotid 60
[email protected]:usb_xhci_slot_disable slotid 61
[email protected]:usb_xhci_slot_disable slotid 62
[email protected]:usb_xhci_slot_disable slotid 63
[email protected]:usb_xhci_slot_disable slotid 64
[email protected]:usb_xhci_port_link port 1, pls 5
[email protected]:usb_xhci_port_notify port 1, bits 0x20000
[email protected]:usb_xhci_port_link port 2, pls 5
[email protected]:usb_xhci_port_notify port 2, bits 0x20000
[email protected]:usb_xhci_port_link port 3, pls 5
[email protected]:usb_xhci_port_notify port 3, bits 0x20000
[email protected]:usb_xhci_port_link port 4, pls 5
[email protected]:usb_xhci_port_notify port 4, bits 0x20000
[email protected]:usb_xhci_port_link port 5, pls 7
[email protected]:usb_xhci_port_notify port 5, bits 0x20000
[email protected]:usb_xhci_port_link port 6, pls 7
[email protected]:usb_xhci_port_notify port 6, bits 0x20000
[email protected]:usb_xhci_port_link port 7, pls 5
[email protected]:usb_xhci_port_notify port 7, bits 0x20000
[email protected]:usb_xhci_port_link port 8, pls 5
[email protected]:usb_xhci_port_notify port 8, bits 0x20000
[email protected]:usb_xhci_irq_intx level 0
[email protected]:usb_xhci_oper_read off 0x0004, ret 0x00000001
[email protected]:usb_xhci_oper_read off 0x0000, ret 0x00000000
[email protected]:usb_xhci_runtime_read off 0x0028, ret 0x00000000
[email protected]:usb_xhci_runtime_write off 0x0028, val 0x00000001
[email protected]:usb_xhci_runtime_write off 0x0038, val 0x00116c00
[email protected]:usb_xhci_runtime_write off 0x003c, val 0x00000000
[email protected]:usb_xhci_runtime_write off 0x0030, val 0x00116a00
[email protected]:usb_xhci_runtime_write off 0x0034, val 0x00000000
[email protected]:usb_xhci_oper_read off 0x0018, ret 0x00000000
[email protected]:usb_xhci_oper_write off 0x0018, val 0x00116e00
[email protected]:usb_xhci_oper_write off 0x001c, val 0x00000000
[email protected]:usb_xhci_oper_read off 0x0030, ret 0x00000000
[email protected]:usb_xhci_oper_write off 0x0030, val 0x00116b00
[email protected]:usb_xhci_oper_write off 0x0034, val 0x00000000
[email protected]:usb_xhci_oper_read off 0x0000, ret 0x00000000
[email protected]:usb_xhci_oper_write off 0x0000, val 0x00000004
[email protected]:usb_xhci_irq_intx level 0
[email protected]:usb_xhci_oper_read off 0x0000, ret 0x00000004
[email protected]:usb_xhci_oper_write off 0x0000, val 0x00000005
[email protected]:usb_xhci_run
[email protected]:usb_xhci_irq_intx level 0
[email protected]:usb_xhci_oper_read off 0x0004, ret 0x00000000
[email protected]:usb_xhci_oper_read off 0x0000, ret 0x00000005
[email protected]:usb_xhci_port_read port 1, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_write port 1, off 0x0000, val 0x00000210
[email protected]:usb_xhci_port_reset port 1, warm 0
[email protected]:usb_xhci_port_read port 1, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_read port 2, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_write port 2, off 0x0000, val 0x00000210
[email protected]:usb_xhci_port_reset port 2, warm 0
[email protected]:usb_xhci_port_read port 2, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_read port 3, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_write port 3, off 0x0000, val 0x00000210
[email protected]:usb_xhci_port_reset port 3, warm 0
[email protected]:usb_xhci_port_read port 3, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_read port 4, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_write port 4, off 0x0000, val 0x00000210
[email protected]:usb_xhci_port_reset port 4, warm 0
[email protected]:usb_xhci_port_read port 4, off 0x0000, ret 0x000202a0
[email protected]:usb_xhci_port_read port 5, off 0x0000, ret 0x00020ee1
[email protected]:usb_xhci_doorbell_write off 0x0000, val 0x00000000
[email protected]:usb_xhci_fetch_trb addr 0x0000000000116e00, CR_ENABLE_SLOT, p 0x0000000000000000, s 0x00000000, c 0x00002400
[email protected]:usb_xhci_runtime_read off 0x0020, ret 0x00000000
The following are the working bochs messages:
00184710831d[XHCI ] register read from offset 0x0000: 0x0000000000000020 (len=1)
00184784396d[XHCI ] register read from offset 0x0002: 0x0000000000000100 (len=4)
00184820376d[XHCI ] register read from offset 0x0010: 0x000000000140530F (len=4)
00184820376d[XHCI ] register read from offset 0x0007: 0x0000000000000000 (len=1)
00184930819d[XHCI ] register read from offset 0x0018: 0x0000000000000600 (len=4)
00185003908d[XHCI ] register read from offset 0x0014: 0x0000000000000800 (len=4)
00185076520d[XHCI ] register read from offset 0x0058: 0x0000000000000000 (len=4)
00185112883d[XHCI ] register read from offset 0x0050: 0x0000000000000000 (len=4)
00185149235d[XHCI ] register read from offset 0x0038: 0x0000000000000000 (len=4)
00185185587d[XHCI ] register read from offset 0x0020: 0x0000000000000000 (len=4)
00185221478d[XHCI ] register read from offset 0x0020: 0x0000000000000000 (len=4)
00185221478d[XHCI ] register write to offset 0x0020: 0x0000000000000002 (len=4)
00188584523d[XHCI ] register read from offset 0x0024: 0x0000000000000001 (len=4)
00188584523d[XHCI ] register read from offset 0x0020: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register read from offset 0x0628: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register write to offset 0x0628: 0x0000000000000001 (len=4)
00188622016d[XHCI ] register write to offset 0x0638: 0x0000000000116C00 (len=4)
00188622016d[XHCI ] register write to offset 0x063C: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register write to offset 0x0630: 0x0000000000116A00 (len=4)
00188622016d[XHCI ] register write to offset 0x0634: 0x0000000000000000 (len=4)
00188622016d[XHCI ] Interrupter 00: Event Ring Table (at 0x0000000000116a00) has 1 entries:
00188622016d[XHCI ] 00: address = 0x0000000000116c00 Count = 16
00188622016d[XHCI ] register read from offset 0x0038: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register write to offset 0x0038: 0x0000000000116E00 (len=4)
00188622016d[XHCI ] register write to offset 0x003C: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register read from offset 0x0050: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register write to offset 0x0050: 0x0000000000116B00 (len=4)
00188622016d[XHCI ] register write to offset 0x0054: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register read from offset 0x0020: 0x0000000000000000 (len=4)
00188622016d[XHCI ] register write to offset 0x0020: 0x0000000000000004 (len=4)
00192184587d[XHCI ] register read from offset 0x0020: 0x0000000000000004 (len=4)
00192184587d[XHCI ] register write to offset 0x0020: 0x0000000000000005 (len=4)
00195784640d[XHCI ] register read from offset 0x0024: 0x0000000000000000 (len=4)
00195784640d[XHCI ] register read from offset 0x0020: 0x0000000000000005 (len=4)
00195858290d[XHCI ] register read from offset 0x0420: 0x0000000000000000 (len=4)
00195858308d[XHCI ] register write to offset 0x0420: 0x0000000000000210 (len=4)
00195858308i[XHCI ] Reset port #1, type=0
00199384698d[XHCI ] register read from offset 0x0420: 0x0000000000201203 (len=4)
00199531697d[XHCI ] register write to offset 0x0800: 0x0000000000000000 (len=4)
00199531697d[XHCI ] Command Doorbell Rang
00199531697d[XHCI ] Dump command trb: 9(dec) (0x0000000000000000 0x00000000 0x00002400) (0)
00199531697d[XHCI ] 0x0000000000116e00: Command Ring: Found Enable Slot TRB (slot = 1) (returning 1)
00199531697d[XHCI ] register read from offset 0x0620: 0x0000000000000001 (len=1)
00199614344d[XHCI ] register write to offset 0x0800: 0x0000000000000000 (len=4)
00199614344d[XHCI ] Command Doorbell Rang
00199614344d[XHCI ] Dump command trb: 11(dec) (0x00000000000304d0 0x00000000 0x01002C00) (0)
00199614344d[XHCI ] slot_context->int_target = 0, slot_context->max_exit_latency = 0
00199614344d[XHCI ] ep_num = 1, speed = -1, ep_context->max_packet_size = 1
00199614344d[XHCI ] 0x0000000000116e10: Command Ring: SetAddress TRB (bsr = 0) (addr = 2) (slot = 1) (returning 1)
00199614376d[XHCI ] register read from offset 0x0620: 0x0000000000000001 (len=1)
00199688937d[XHCI ] register write to offset 0x0800: 0x0000000000000000 (len=4)
00199688937d[XHCI ] Command Doorbell Rang
00199688937d[XHCI ] Dump command trb: 12(dec) (0x00000000000304d0 0x00000000 0x01003000) (0)
00199688937d[XHCI ] 0x0000000000116e20: Command Ring: Found Config_EP TRB (slot = 1) (returning 1)
00199688937d[XHCI ] register read from offset 0x0620: 0x0000000000000001 (len=1)
00199800258d[XHCI ] register write to offset 0x0804: 0x0000000000000001 (len=4)
00199800258d[XHCI ] Rang Doorbell: slot = 1 ep = 1 (IN)
00199800258d[XHCI ] Found TRB: address = 0x0000000000117000 0x0000000000040680 0x00400008 0x00030841 1
00199800258d[XHCI ] Found TRB: address = 0x0000000000117000 0x0000000000040680 0x00400008 0x00030841 1 (SPD occurred = 0)
00199800258d[XHCI ] 0x0000000000117000: Transfer Ring (slot = 1) (ep = 1) (len = 8): Found SETUP TRB
00199800258e[USBMSD] USB MSD handle_control: unknown descriptor type 0x00
00199800258d[XHCI ] OUT: Transferred 8 bytes (ret = -3)
00199800258d[XHCI ] Found TRB: address = 0x0000000000117010 0x0000000000030524 0x00000008 0x00010C01 1 (SPD occurred = 0)
00199800258d[XHCI ] 0x0000000000117010: Transfer Ring (slot = 1) (ep = 1) (len = 8): Found DATA STAGE TRB
00199800258d[XHCI ] Process Transfer Ring: Processed 2 TRB's
00199800258d[XHCI ] register read from offset 0x0620: 0x0000000000000001 (len=1)
00599911076d[XHCI ] register read from offset 0x0430: 0x0000000000000000 (len=4)
00599911076d[XHCI ] register write to offset 0x0430: 0x0000000000000210 (len=4)
00599911076i[XHCI ] Reset port #2, type=0
00603111124d[XHCI ] register read from offset 0x0430: 0x00000000000002A0 (len=4)
00603111124d[XHCI ] register read from offset 0x0440: 0x0000000000000000 (len=4)
00603111124d[XHCI ] register write to offset 0x0440: 0x0000000000000210 (len=4)
00603111124i[XHCI ] Reset port #3, type=0
00606711184d[XHCI ] register read from offset 0x0440: 0x00000000000002A0 (len=4)
00606711184d[XHCI ] register read from offset 0x0450: 0x0000000000000000 (len=4)
00606711184d[XHCI ] register write to offset 0x0450: 0x0000000000000210 (len=4)
00606711184i[XHCI ] Reset port #4, type=0
00610311244d[XHCI ] register read from offset 0x0450: 0x00000000000002A0 (len=4)
00610311244e[XHCI ] register read from unknown offset 0x00000460: 0x0000000000000000 (len=4)
00610311244d[XHCI ] register read from offset 0x0460: 0x0000000000000000 (len=4)
00610311244d[XHCI ] register write to offset 0x0460: 0x0000000000000210 (len=4)
00610311244e[XHCI ] register write to unknown offset 0x00000460: 0x0000000000000210 (len=4)
00613911295e[XHCI ] register read from unknown offset 0x00000460: 0x0000000000000000 (len=4)
00613911295d[XHCI ] register read from offset 0x0460: 0x0000000000000000 (len=4)
00613911302d[XHCI ] register read from offset 0x0038: 0x0000000000000008 (len=4)
01741168000p[XGUI ] >>PANIC<< POWER button turned off.