Debugging Toshiba Encore 2 Tablets

How do you kernel debug Toshiba Encore 2 tablets. I am trying to debug these devices with no luck. USB view shows me that the only connectable usb port is a usb 2.0 port which is not debug-able. The only debug enabled port is a usb 3.0 port which is not connectable.
The driver I am trying to debug is a storage device filter and starts very early in the boot sequence so I cannot rely on network debugging.

Any help would be much appreciated.
Here is the output from USB View:

My Computer
USB xHCI Compliant Host Controller

DriverKey: {36fc9e60-c465-11cf-8056-444553540000}\0000
VendorID: 8086
DeviceID: 0F35
SubSysID: 72708086
Revision: 0F

Debug Port Number: 0
Bus.Device.Function (in decimal): 0.20.0

Host Controller Power State Mappings
System State Host Controller Root Hub USB wakeup Powered
S0 (working) D0 S? (unmapped)
S1 (sleep) D? (unspecified) D3
S2 (sleep) D? (unspecified) D3
S3 (sleep) D? (unspecified) D3
S4 (Hibernate) D3 D2 Yes Yes
Last Sleep State S? (unmapped)
RootHub

Root Hub: USB#ROOT_HUB30#4&20bf29d4&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
Hub Power: Self Power
Number of Ports: 7
Power switching: Ganged
Compound device: No
Over-current Protection: Global
High speed capable: No
High speed: Yes
Multiple transaction translations capable: No
Performs multiple transaction translations simultaneously: No
Hub wakes when device is connected: No
Hub is bus powered: No
Hub is root: Yes
[Port1]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port2]

Is Port User Connectable: yes
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port3]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port4]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port5]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port6]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port7]

Is Port User Connectable: no
Is Port Debug Capable: yes
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: no
USB 2.0: no
USB 3.0: yes

ConnectionStatus: NoDeviceConnected

Kit ctrl-alt-k in windbg so that it says “Will breakin at next boot.”

Then use KDNET.

It will break in LONG before any drivers even get their DriverEntry routines called.

Joe.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@rizvi.ca
Sent: Tuesday, January 6, 2015 2:19 PM
To: Kernel Debugging Interest List
Subject: [windbg] Debugging Toshiba Encore 2 Tablets

How do you kernel debug Toshiba Encore 2 tablets. I am trying to debug these devices with no luck. USB view shows me that the only connectable usb port is a usb 2.0 port which is not debug-able. The only debug enabled port is a usb 3.0 port which is not connectable.
The driver I am trying to debug is a storage device filter and starts very early in the boot sequence so I cannot rely on network debugging.

Any help would be much appreciated.
Here is the output from USB View:

My Computer
USB xHCI Compliant Host Controller

DriverKey: {36fc9e60-c465-11cf-8056-444553540000}\0000
VendorID: 8086
DeviceID: 0F35
SubSysID: 72708086
Revision: 0F

Debug Port Number: 0
Bus.Device.Function (in decimal): 0.20.0

Host Controller Power State Mappings
System State Host Controller Root Hub USB wakeup Powered
S0 (working) D0 S? (unmapped)
S1 (sleep) D? (unspecified) D3
S2 (sleep) D? (unspecified) D3
S3 (sleep) D? (unspecified) D3
S4 (Hibernate) D3 D2 Yes Yes
Last Sleep State S? (unmapped)
RootHub

Root Hub: USB#ROOT_HUB30#4&20bf29d4&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
Hub Power: Self Power
Number of Ports: 7
Power switching: Ganged
Compound device: No
Over-current Protection: Global
High speed capable: No
High speed: Yes
Multiple transaction translations capable: No
Performs multiple transaction translations simultaneously: No
Hub wakes when device is connected: No
Hub is bus powered: No
Hub is root: Yes
[Port1]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port2]

Is Port User Connectable: yes
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port3]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port4]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port5]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port6]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port7]

Is Port User Connectable: no
Is Port Debug Capable: yes
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: no
USB 2.0: no
USB 3.0: yes

ConnectionStatus: NoDeviceConnected


WINDBG is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I am assuming of course that the Toshiba Encore tablets have a wired Ethernet connection and have a supported KDNET nic.

If they are like most tablets, and only have USB connectors, then you will have to use kdusb.

In that case most likely you will need to specify busparams (in many cases for tablets, the correct busparams are 0.29.0) and will need to use USB2 ehci debugging which requires the blue dongle.

Joe.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Joe Ballantyne
Sent: Tuesday, January 6, 2015 2:22 PM
To: Kernel Debugging Interest List
Subject: RE: [windbg] Debugging Toshiba Encore 2 Tablets

Kit ctrl-alt-k in windbg so that it says “Will breakin at next boot.”

Then use KDNET.

It will break in LONG before any drivers even get their DriverEntry routines called.

Joe.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@rizvi.ca
Sent: Tuesday, January 6, 2015 2:19 PM
To: Kernel Debugging Interest List
Subject: [windbg] Debugging Toshiba Encore 2 Tablets

How do you kernel debug Toshiba Encore 2 tablets. I am trying to debug these devices with no luck. USB view shows me that the only connectable usb port is a usb 2.0 port which is not debug-able. The only debug enabled port is a usb 3.0 port which is not connectable.
The driver I am trying to debug is a storage device filter and starts very early in the boot sequence so I cannot rely on network debugging.

Any help would be much appreciated.
Here is the output from USB View:

My Computer
USB xHCI Compliant Host Controller

DriverKey: {36fc9e60-c465-11cf-8056-444553540000}\0000
VendorID: 8086
DeviceID: 0F35
SubSysID: 72708086
Revision: 0F

Debug Port Number: 0
Bus.Device.Function (in decimal): 0.20.0

Host Controller Power State Mappings
System State Host Controller Root Hub USB wakeup Powered
S0 (working) D0 S? (unmapped)
S1 (sleep) D? (unspecified) D3
S2 (sleep) D? (unspecified) D3
S3 (sleep) D? (unspecified) D3
S4 (Hibernate) D3 D2 Yes Yes
Last Sleep State S? (unmapped)
RootHub

Root Hub: USB#ROOT_HUB30#4&20bf29d4&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
Hub Power: Self Power
Number of Ports: 7
Power switching: Ganged
Compound device: No
Over-current Protection: Global
High speed capable: No
High speed: Yes
Multiple transaction translations capable: No
Performs multiple transaction translations simultaneously: No
Hub wakes when device is connected: No
Hub is bus powered: No
Hub is root: Yes
[Port1]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port2]

Is Port User Connectable: yes
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port3]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port4]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port5]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port6]

Is Port User Connectable: no
Is Port Debug Capable: no
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no

ConnectionStatus: NoDeviceConnected
[Port7]

Is Port User Connectable: no
Is Port Debug Capable: yes
Companion Port Number: 0
Companion Hub Symbolic Link Name:
Protocols Supported:
USB 1.1: no
USB 2.0: no
USB 3.0: yes

ConnectionStatus: NoDeviceConnected


WINDBG is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


WINDBG is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi Joe,
Will it work on Wifi ?

Rehan

No, KDNET does not work on WIFI.

(At least, not yet.)

It will almost definitely be post Windows 10 before KDNET supports WIFI.

Joe.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@rizvi.ca
Sent: Tuesday, January 6, 2015 2:49 PM
To: Kernel Debugging Interest List
Subject: RE:[windbg] Debugging Toshiba Encore 2 Tablets

Hi Joe,
Will it work on Wifi ?

Rehan


WINDBG is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Just ordered a USB 3 debug cable. Hopefully I will get better results with it.
In the bios I can switch between USB 2 and 3 controller for the usb port. The USB view report that I posted was taken when the controller was set to USB 3. I switched to USB 2 and still I cannot connect to WinDbg, the tablet just hangs till I disconnect the cable and then it continues booting. If I connect any usb device to the tablet in this state it hangs till I disconnect.
I do change my bus params when I switch my controller.
USB 3 -> 0.20.0
USB 2 -> 0.29.0

These values were taken from the bus controller’s properties. (Also, they match the values provided in the USB View as they are supposed to)

If the tablet hangs until you disconnect the cable, try unplugging the cable from the host machine for 1 second or so, and then immediately plugging it back in.

That will sometimes get you a debugger connection.

Also, for USB2 debugging, you MUST use the debug device dongle (they are usually blue). They have 1 USB device B-female plug on each end, and you plug a USB2 A male to USB2 B male cable into each end of it, and then plug the A ends of the 2 cables into your host and target.

That device is NOT symmetric, one side supplies power to the device, and the other does not, and it does make a difference which end you plug into the target and host. (IME it works better if you plug the end that supplies power to the device into the debugger host.)

So you also might try effectively swapping which plug on that device is plugged into target vs host.

Given that you hang indefinitely during boot, I would definitely try the unplug/replug trick.

USB2 ehci debugging is almost always a massive PITA to get working. :frowning:

Also, you MUST run the debugger from an elevated command prompt the first time, so that it can properly install the drivers for the USB2 debug device, AND you MUST run a debugger that matches the bitness of your debug host. If you have a 64 bit debugger host machine make SURE you run the 64 bit version of the debugger from an elevated command prompt so it can install the proper bitness of the usb2dbg.sys driver on the host machine.

Once you get the driver installed, then you no longer need to run elevated, and you can run either bitness of the debugger.

So, the steps are:

Run the proper bitness of the debugger from an elevated command prompt, then plug in the debug device to the host debugger until you see that the driver loads, swap the cables if it doesn’t load the first time.

Then plug in the debug device to the target machine, and boot the target.

If it hangs during boot, try unplugging the debug device from the host, and then immediately plugging it back in.

Also, when you run the debugger make sure you press ctrl-alt-k in windbg so it says will break in at first boot. Do that before you boot the target.

Good luck.

Joe.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@rizvi.ca
Sent: Tuesday, January 6, 2015 4:54 PM
To: Kernel Debugging Interest List
Subject: RE:[windbg] Debugging Toshiba Encore 2 Tablets

Just ordered a USB 3 debug cable. Hopefully I will get better results with it.
In the bios I can switch between USB 2 and 3 controller for the usb port. The USB view report that I posted was taken when the controller was set to USB 3. I switched to USB 2 and still I cannot connect to WinDbg, the tablet just hangs till I disconnect the cable and then it continues booting. If I connect any usb device to the tablet in this state it hangs till I disconnect.
I do change my bus params when I switch my controller.
USB 3 -> 0.20.0
USB 2 -> 0.29.0

These values were taken from the bus controller’s properties. (Also, they match the values provided in the USB View as they are supposed to)


WINDBG is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thanks Joe, swapping the cable ends did the trick. I should mark the two ends for the future.