Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: BOS and Microsoft OS specific descriptors support #1432

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

dragonmux
Copy link
Contributor

This PR implements support to locm3's USB stack for Binary Object Store (BOS) descriptors, and the Microsoft OS 2.0 Descriptor specification (which requires BOS support).

The motivation for doing this it to provide support in Black Magic Probe for auto-binding drivers to the Trace and DFU interfaces via descriptors in the firmware.

Additionally this PR implements tests for all the new descriptor requests added via the gadget0 framework and implements a gadget0 platform to allow the native BMP hardware to be used as a testing platform (this is the hardware we had available)

@dragonmux
Copy link
Contributor Author

dragonmux commented Aug 17, 2022

We're aware the build is currently failing.. we'll fix the reason why in the morning. It's a question of platforms missed in the addition rather than a real bug.

Edit: This is now fixed.

@dragonmux dragonmux force-pushed the feature/bos-and-microsoft-os-specific-descriptors branch 2 times, most recently from 4f4fa72 to fe6043b Compare August 18, 2022 09:05
@dragonmux dragonmux force-pushed the feature/bos-and-microsoft-os-specific-descriptors branch from fe6043b to 3705594 Compare August 22, 2022 20:25
@petrutoader
Copy link

petrutoader commented Jan 31, 2023

Is this of interest to the project? We currently need BOS descriptors and need to decide if we should create a fork or wait for this pull request to be merged.

@karlp
Copy link
Member

karlp commented Feb 1, 2023

It is of interest to the project, and the submitter here has done a great job of adding the requested tests. Regardless, testing on windows is not exactly something that fills me with joy. It's pretty high on my list though. As you can see of course, it's not exactly a minor "the header has the wrong value copied from the reference manual" so it's not something that happens overnight.

@petrutoader
Copy link

Thanks for the clarification, totally understandable.

…ptor component of a platform capability descriptor
@dragonmux dragonmux force-pushed the feature/bos-and-microsoft-os-specific-descriptors branch from 2f25f5f to 0c6c7c2 Compare April 17, 2023 05:50
@ALTracer
Copy link

Reporting that this is a working and useful feature.
https://developer.chrome.com/articles/build-for-webusb/#microsoft-os-compatibility-descriptors
Both my Win10 and Win11 boxes recognized the WINUSB in WCID/BOS descriptors and attached WinUSB.sys drivers to Blackmagic Debug Probe-compatible board interfaces for DFU and TraceSWO (the other two interfaces are CDC-ACM and "just work" with usbser.sys already). This is after blackmagic-debug/blackmagic#1509 got merged.
It should improve user experience even on old&unsupported WinXP & Win7 after a one-time .inf installation. https://github.com/pbatard/libwdi/wiki/WCID-Devices#wcid-advantages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants