- What is DMA and IOMMU ? How DMA and IOMMU used ?
- What if architecture does not support IOMMU ?
- How to use DMA without IOMMU ?

- 681
- 1
- 9
- 23
1 Answers
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.

- 75,595
- 17
- 168
- 206
-
How it is differ to use in Linux kernel (practically). is there any linux api changes ? – Pankaj Suryawanshi Jul 01 '19 at 12:34
-
I'm not sufficiently familiar with the Linux kernel to answer that. – Codo Jul 01 '19 at 12:38