-
-
Notifications
You must be signed in to change notification settings - Fork 176
Feat: IoMmu protocol #1728
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
base: main
Are you sure you want to change the base?
Feat: IoMmu protocol #1728
Conversation
Thanks for working on this :) I haven't had a chance to look at the |
Is this ready for review? Currently it's marked as draft still. (No worries if that's intentional, just want to be sure you're not waiting on review.) |
I still need to write some test for it. I have been busy with some other things, so I'll send those over as soon as I can. Feel free to take a look if you want. |
@nicholasbishop I am trying to write some test for this, but I cant seem to get a protocol handle. I went into the uefi shell of the qemu vm, and the IoMmu driver image is present: dh -p 4e939de9-d948-4b0f-88ed-e6e1ce517c1e -v
Handle dump by protocol '4E939DE9-D948-4B0F-88ED-E6E1CE517C1E'
Shell> dh -p 03c4e603-ac28-11d3-9a2d-0090273fc14d -v
Handle dump by protocol 'PXEBaseCode'
Shell> dh 28 -v
28: 3ECF0C18
ImageDevicePath(3ECF2A98)
Fv(7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1)/FvFile(8657015B-EA43-440D-949A-AF3BE365C0FC)
LoadedImage(3ECF20C0)
Name..........: IoMmuDxe So I am assuming the driver is failing to find hardware. I have tried a few different things, different EDK2 builds and followed the virtio instructions here, but nothing has worked. Ik it worked on hardware, so if you have any ideas on how to get qemu setup for IoMmu please let me know. |
This PR adds the IoMmu Protocol to
uefi-rs
, enabling easy DMA (Direct Memory Access) for devices. This is a draft to get some initial feedback before writinguefi-rs
tests. It is already working in my internal project. The main areas I would like feedback on are:unmap()
andfree_buffer()
?free_buffer_raw()
andunmap_raw()
be made public?General Implementation:
ref:
#1723