Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between DMA and IOMMU?

  • What is DMA and IOMMU ? How DMA and IOMMU used ?
  • What if architecture does not support IOMMU ?
  • How to use DMA without IOMMU ?
like image 255
Pankaj Suryawanshi Avatar asked Jul 01 '19 11:07

Pankaj Suryawanshi


People also ask

What is the purpose of IOMMU?

The Input-Output Memory Management Unit (IOMMU) is a component in a memory controller that translates device virtual addresses (can be also called I/O addresses or device addresses) to physical addresses. The concept of IOMMU is similar to Memory Management Unit (MMU).

What is IOMMU mode?

Intel processors and AMD I/O Virtualization (AMD-Vi or IOMMU) in AMD processors, is an I/O memory. management feature that remaps I/O DMA transfers and device interrupts. This feature (strictly speaking, is a. function of the chipset, rather than the CPU) can allow virtual machines to have direct access to hardware I/O.

What is difference between DMA and IOP?

The I/O processor solves two problems: The job of input and output is assumed by the CPU. Although DMA does not require CPU for data exchange between peripherals and memory, it only reduces the burden of CPU. Because in DMA, the initialization of input and output is still done by CPU.


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.

like image 184
Codo Avatar answered Oct 03 '22 08:10

Codo