Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between DMA-Engine and DMA-Controller?

  1. As mentioned above, what is the difference between a dma engine and a dma-controller (on focus on linux)?

  2. When does the linux dma engine come into place? Is this a special device or always part of all periphery devices, which support dma?

  3. When browsing the linux source, I found the driver ste_dma40.c. How does any driver uses this engine?

like image 555
john s. Avatar asked May 26 '17 07:05

john s.


People also ask

What is difference between DMA and DMA controller?

DMA is an abbreviation of direct memory access. DMA is a method of data transfer between main memory and peripheral devices. The hardware unit that controls the DMA transfer is a DMA controller. DMA controller transfers the data to and from memory without the participation of the processor.

What is a DMA engine?

The DMA engine is a generic kernel framework for developing a DMA controller driver. The main goal of DMA is offloading the CPU when it comes to copy memory. One delegates a transaction (I/O data transfers) to the DMA engine by the use of channels.

What does DMA controller mean?

Direct memory access (DMA) is a method that allows an input/output (I/O) device to send or receive data directly to or from the main memory, bypassing the CPU to speed up memory operations. The process is managed by a chip known as a DMA controller (DMAC).

What is a DMA controller?

DMA controller definition is, an external device that is used to control the data transfer between memory and I/O device without the processorinvolvement is known DMA controller. This controller has the capacity to access the memory directly to read or write operations.

How does DMA transfer work in a computer?

It sends a DMA request (in form of interrupt) to CPU. CPU initiates the the transfer by providing appropriate grant signals to the data bus. And passes the control to the DMA controller which controls the rest of the data transfer and transfers the data directly to I/O device.

Why DMA does not require 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. The problem of sharing DMA interface of high speed equipment in large computer system.

What is direct memory access (DMA)?

Direct Memory Access (DMA) : DMA Controller is a hardware device that allows I/O devices to directly access memory with less participation of the processor. DMA controller needs the same old circuits of an interface to communicate with the CPU and Input/Output devices. Fig-1 below shows the block diagram of the DMA controller.


2 Answers

DMA - Direct memory access. The operation of your driver reading or writing from/to your HW memory without the CPU being involved in it (freeing it to do other stuff).

DMA Controller - reading and writing can't be done by magic. if the CPU doesn't do it, we need another HW to do it. Many years ago (at the time of ISA/EISA) it was common to use a shared HW on the motherboard that did this operation. In recent years , each HW has its own DMA HW mechanism. But in all cases this specific HW gets the source address and the destination address and passes the data. Usually triggering an interrupt when done.

DMA Engine - Now here I am not sure what you mean. I believe you probably refer to the SW side that handles the DMA. DMA is a little more complicated than usual I\O since all memory SRC and DST has to be physically present at all times during the DMA operation. If the DST address is swapped to disk, the HW will write to a bad address and the system will crash. This and other aspects of DMA are handled by the driver with code sections you probably refer to as the "DMA Engine"

*Another interpretation of what 'DMA Engine' is, may be a code part of Firmware (or HW) that handles the DMA HW controller on the HW side.

like image 140
Sharon Katz Avatar answered Sep 19 '22 19:09

Sharon Katz


According to this document, http://www.asprom.com/application/intel_3.pdf:

The 82C37 DMA controllers should not be confused with the DMA engines found in some earlier MCH (Memory Controller Hub) components. These DMA controllers are tied to the ISA/LPC bus and used mostly for transfers to/from slow devices such as floppy disk controllers.

So it seems it is a device found on previous platfroms that used MCHs devices.

like image 38
Jimmy Manley Avatar answered Sep 18 '22 19:09

Jimmy Manley