=== USB Kernel Debugging Improvements

Contact: Tom Jones <thj@FreeBSD.org>

XHCI USB controllers offer a mode which allows them to be used as a system debugging interface.
XHCI debug uses a special USB 3 cable with VBUS, D+ and D- disconnected.
The feature can be used to live debug the FreeBSD kernel, enabling investigation of issues which cause the system video console to lock up and there is not an alternative such as a serial console.
This can happen when debugging issues with graphics drivers.

mailto:hrs@FreeBSD.org[Hiroki Sato] developed support for the XHCI debug interface and made it available as some in progress git branches.
This implementation enables FreeBSD to operate as both a Debug Host and a Debug Target, with support for debugging from the loader through to the kernel.

In this quarter there has been significant debugging of the debug interfaces associated with the host side of xhci debug.
A custom board was designed to support two debug modes with USB-C, xhci debug and the USB-C Debug Accessory Mode (DAM).
DAM enables an alt mode for USB-C connectors, on some devices such as 2025 Framework laptops and the desktop this mode enables access to a SOC UART for debugging.

Further revisions of the hardware are needed to create a complete xhci USB-C adapter and a more fully featured DAM adapter.

Reviews have been created for the loader portion of the implementation and several changes have been extracted out and landed in the tree.

Sponsor: The FreeBSD Foundation
