-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
Conversation
cfcfb54
to
7b35821
Compare
6c38083
to
28a8b41
Compare
There was a problem hiding this 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?
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. |
Add the UsbIo wrapper and implement methods for the descriptive and sync transfer functions provided by the protocol.
fd054f5
to
6b787c3
Compare
I have added integration testing for the descriptor acquisition functions and the control transfers. I do not intend to test bulk, interrupt, or isochronous transfers because testing those seem to require writing part of a USB device driver. |
Thanks for your work! I left a few remarks, otherwise LGTM |
I've resolved your requests and cleaned up the code a little. |
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