What is the difference between DMA and IOMMU?

7.1k Views Asked by At
  • What is DMA and IOMMU ? How DMA and IOMMU used ?
  • What if architecture does not support IOMMU ?
  • How to use DMA without IOMMU ?
1

There are 1 best solutions below

2
On BEST ANSWER

DMA (direct memory access) is a hardware feature that allows memory access to occur independently of the program currently run by the micro processor. It can either be used by I/O devices to directly read from or write to memory without executing any micro processor instructions. Or, it can be used to efficiently copy blocks of memory. During DMA transfers, the micro processor can execute an unrelated program at the same time.

IOMMU (input–output memory management unit) is a hardware feature that extends MMU to I/O devices. A MMU maps virtual memory addresses to physical memory address. While the normal MMU is used to give each process its own virtual address space, the IOMMU is used to give each I/O device its own virtual address space. That way, the I/O device sees a simple contiguous address space, possibly accessible with 32 bit addresses while in reality the physical address space is fragmented and extends beyond 32 bit.

DMA without IOMMU requires the I/O devices to use the real physical addresses. The physical addresses must also be used by the processor when setting up the DMA transfer. Additionall, DMA without IOMMU can be used for memory copy (as it involves no I/O devices).

IOMMU is only available on more powerful micro processor. You will not find it on microcontrollers and most embedded systems.