DMA引擎和DMA控制器有什么区别? [英] What is the difference between DMA-Engine and DMA-Controller?

查看:616
本文介绍了DMA引擎和DMA控制器有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 如上所述,dma引擎和dma控制器(专注于linux)有什么区别?

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

Linux dma引擎何时成立?这是专用设备还是支持dma的所有外围设备的一部分?

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

在浏览linux源代码时,我发现了驱动程序ste_dma40.c.任何驱动程序如何使用此引擎?

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

推荐答案

DMA-直接内存访问.驱动程序在不涉及CPU的情况下读取/写入HW存储器的操作(释放它来做其他事情).

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控制器-魔术无法完成读写.如果CPU不这样做,我们需要另一个硬件来完成.许多年前(在ISA/EISA时代),通常在执行此操作的主板上使用共享硬件.近年来,每个硬件都有自己的DMA硬件机制. 但是在所有情况下,此特定硬件都会获取源地址和目标地址并传递数据.通常在完成后触发中断.

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引擎-现在我不确定您的意思了.我相信您可能是指处理DMA的软件方面. DMA比通常的I \ O稍微复杂一点,因为在DMA操作期间,所有内存SRC和DST都必须始终存在.如果将DST地址交换到磁盘,则HW将写入错误的地址,并且系统将崩溃. DMA的这一方面和其他方面由驱动程序处理,其中的代码段可能称为"DMA引擎"

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"

*"DMA引擎"的另一种解释可能是固件(或硬件)的代码部分,该固件在硬件方面处理DMA硬件控制器.

*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.

这篇关于DMA引擎和DMA控制器有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆