RAM 到 RAM 的 DMA 传输
我的一个朋友告诉我,在 x86 架构上,DMA 控制器无法在两个不同的 RAM 位置之间传输。它只能在RAM和外设(如PCI总线)之间传输。
这是真的吗?
因为 AFAIK DMA 控制器应该能够在位于总线上并具有地址的任意设备之间运行。特别是,如果源地址和目标地址都属于同一物理设备,我认为没有问题。
A friend of mine has told me that on x86 architecture DMA controller can't transfer between two different RAM locations. It can only transfer between RAM and peripheral (such as PCI bus).
Is this true?
Because AFAIK DMA controller should be able between arbitrary devices that sit on BUS and have an address. In particular I see no problem if both source and destionation addresses belong to the same physical device.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
ISA(还记得吗?;-)DMA 芯片当然有一个 Fetch-and-Deposit 传输类型。
但是,来自 MASM32 论坛:
ISA (remember? ;-) DMA chips certainly have a Fetch-and-Deposit transfer type.
However, from the MASM32 forums:
是的,内存到内存的传输可以达到 80386 系列,我已经尝试过使用“现代”x86 :)
指定源和目标的 RAM。您可能需要注意 L1 缓存的一致性,具体取决于您正在编程的设备以及是否启用了缓存。
您可能会在 Linux 内核中找到一些用于刷新影子内存中视频 RAM 页面的代码。这敲响了警钟。
Yes, memory to memory transfer is possible well up to 80386 family I have tried with "modern" x86's :)
Specify RAM for source and destination. You might have to watch out for coherence of the L1 cache depending on the device you are programming and if you have enabled the cache.
You might find some code in the Linux kernel for refreshing video RAM pages in shadow memory. This rings a bell.
肯定有 DMA 引擎无法在 2 个 RAM 地址之间传输,因此问题的第二部分已经基于错误的前提。
There are definitely DMA engines that cannot transfer between 2 ram addresses, so the second part of the question is already based on an incorrect premise.