Skip to content

uefi: Add safe EFI_USB_IO_PROTOCOL bindings #1625

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JarlEvanson
Copy link
Contributor

@JarlEvanson JarlEvanson commented Apr 13, 2025

Add a safe wrapper around the EFI_USB_IO_PROTOCOL.

This adds wrappers around the synchronous USB transfers, acquiring the USB descriptors, and resetting the USB interface.

Relies on #1626.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

@JarlEvanson JarlEvanson force-pushed the usb-io branch 4 times, most recently from cfcfb54 to 7b35821 Compare April 15, 2025 17:17
@JarlEvanson JarlEvanson changed the title uefi: Begin safe EFI_USB_IO_PROTOCOL bindings uefi: Add safe EFI_USB_IO_PROTOCOL bindings Apr 15, 2025
@JarlEvanson JarlEvanson marked this pull request as ready for review April 15, 2025 17:22
@JarlEvanson JarlEvanson force-pushed the usb-io branch 4 times, most recently from cfca040 to 6c38083 Compare April 17, 2025 21:26
Add the UsbIo wrapper and implement methods for the descriptive and sync
transfer functions provided by the protocol.
Copy link
Member

@phip1611 phip1611 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but can you please add an integration test? If needed, attach any USB device to QEMU. Not sure what's the best way, but I suppose you have a better understanding of USB right now than me.

Do you see an opportunity for an integration test?

@JarlEvanson
Copy link
Contributor Author

I can do that.

Testing the descriptor and reset functions should be easy, but testing the transfer functions will probably require implementing some of a USB device driver. Furthermore, testing the USB isochronous transfers would require a audio or video device, which does not appear to be easily available on QEMU.

I probably won't get around to it until Thursday.

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.

2 participants