Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Ethernet over USB kernel debugging

Ben_EnglishBen_English Member Posts: 3

There was a similar topic here https://community.osr.com/discussion/258914/kdnet-on-a-usb-nic but the circumstances have changed enough in the 5 years since that thread that I think a new post isn't unwarranted.

I am trying to debug a specific laptop target that has no ethernet port (and its wireless adapter is not on the MSDN supported NIC list). The target is running a recent Windows 10, and Win10 doesn't support any kernel debugging but ethernet after version 1607. It has a thunderbolt port and usb ports. I have normally been debugging via a supported ethernet adapter in an eGPU enclosure connected by thunderbolt, but unfortunately what I'm trying to debug now is related to hotplugging that thunderbolt port, so this does not work in this scenario.

So, does anyone know if the updated supported NIC list yet contains any USB-ethernet NICs that I could buy for this purpose? I've tried searching for NICs by their device id / product ID in the list but haven't really had any luck with this.

Thanks,
-Ben

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 12,982
    via Email
    Ben_English wrote:
    > I am trying to debug a specific laptop target that has no ethernet port (and its wireless adapter is not on the MSDN supported NIC list). The target is running a recent Windows 10, and Win10 doesn't support any kernel debugging but ethernet after version 1607.

    What??  Is that true?  I had heard 1394 was dropped, but were USB and
    RS232 also dropped?


    > So, does anyone know if the updated supported NIC list yet contains any USB-ethernet NICs that I could buy for this purpose? I've tried searching for NICs by their device id / product ID in the list but haven't really had any luck with this.

    I seriously doubt it.  As I've said before, the kernel debugger (the
    part that's in the kernel) does not use operating system drivers.  It
    has its own separate corral of drivers, so that it isn't affected by
    driver issues.  It doesn't have a general purpose USB stack -- USB
    debugging uses a "back door" mechanism that goes straight to the HCI. 
    Thus, it seems very unlikely they can drive enough of USB to enumerate,
    configure, and drive a USB NIC.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,223

    Win10 doesn't support any kernel debugging but ethernet after version 1607

    Not true. Why do you say that?

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • Ben_EnglishBen_English Member Posts: 3

    @Tim_Roberts said:

    ...and Win10 doesn't support any kernel debugging but ethernet after version 1607.

    What?? Is that true? I had heard 1394 was dropped, but were USB and
    RS232 also dropped?

    @Peter_Viscarola_(OSR) said:

    Win10 doesn't support any kernel debugging but ethernet after version 1607

    Not true. Why do you say that?

    Peter

    Ah, because I apparently misread the documentation! Thanks for pointing this out. I pretty much exclusively used 1394 until this change, and then switched to ethernet. I guess I need to acquire an appropriate USB cable to debug this.

  • Ben_EnglishBen_English Member Posts: 3

    Well, I may have spoken too soon. It appears that neither of the USB ports on this laptop are debug capable according to usbview. It of course has no serial ports. Am I out of options?

    @Tim_Roberts said:

    So, does anyone know if the updated supported NIC list yet contains any USB-ethernet NICs that I could buy for this purpose? I've tried searching for NICs by their device id / product ID in the list but haven't really had any luck with this.

    I seriously doubt it. As I've said before, the kernel debugger (the part that's in the kernel) does not use operating system drivers. It has its own separate corral of drivers, so that it isn't affected by driver issues. It doesn't have a general purpose USB stack -- USB debugging uses a "back door" mechanism that goes straight to the HCI. Thus, it seems very unlikely they can drive enough of USB to enumerate, configure, and drive a USB NIC.

    Hmm, that's good to know. I am able to use an ethernet port on a connected thunderbolt device for kernel debugging, I wonder how that works? It seems likely that it must use OS drivers - I doubt there is a kernel debug specific thunderbolt driver. Unfortunately I don't have a second thunderbolt port with which to debug the first one, so I think I'm still out of luck. Are there any other options? The only other ports on this thing are audio, SD card, and HDMI...

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 12,982
    via Email
    Ben_English wrote:
    >
    > Hmm, that's good to know. I am able to use an ethernet port on a connected thunderbolt device for kernel debugging, I wonder how that works? It seems likely that it must use OS drivers - I doubt there is a kernel debug specific thunderbolt driver.

    Because Thunderbolt 3 is essentially just PCIExpress over a wire.  No
    drivers are required.  The hardware magically makes it look like PCIExpress.


    > Unfortunately I don't have a second thunderbolt port with which to debug the first one, so I think I'm still out of luck. Are there any other options? The only other ports on this thing are audio, SD card, and HDMI...

    Not really. There is probably a header on the motherboard that exposes a
    debug-capable port, like an RS232 header, but unless you're in the
    factory, there's probably no way to get at it.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA