Open andreiw opened 9 months ago
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.
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.
Need to figure this out. Basically could expect IOMMU device drivers to publish an IOMMU protocol that would be used by FdtBusDxe.