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

FdtBusDxe DMA API implementation: consider DT device iommu property #20

Open
andreiw opened this issue Jan 28, 2024 · 2 comments
Open
Labels
documentation Improvements or additions to documentation

Comments

@andreiw
Copy link
Contributor

andreiw commented Jan 28, 2024

Need to figure this out. Basically could expect IOMMU device drivers to publish an IOMMU protocol that would be used by FdtBusDxe.

@andreiw
Copy link
Contributor Author

andreiw commented Jan 29, 2024

https://cdrdv2-public.intel.com/671554/intel-whitepaper-using-iommu-for-dma-protection-in-uefi.pdf
https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Include/Protocol/IoMmu.h

It's a bit unfortunate EDKII_IOMMU_MAP doesn't take the EFI_HANDLE. This basically assumes that all IOMMUs in a system have equal capabilities and that the computed bus address (or allocated CPU memory) is equally valid for any IOMMU. That's true for server-grade systems but it doesn't need to be true for any implementation, and certainly won't be true for hardware which provides I/O protection but not translation.

@andreiw
Copy link
Contributor Author

andreiw commented Jan 29, 2024

As a stop gap can add support for EDII_IOMMU_MAP (as well as an example of a DT controller IOMMU), but it's not a bad idea to come up with a better API.

@andreiw andreiw added the documentation Improvements or additions to documentation label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant