RAM 到 RAM 的 DMA 传输

发布于 2024-10-05 13:43:37 字数 183 浏览 0 评论 0原文

我的一个朋友告诉我,在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

神仙妹妹 2024-10-12 13:43:37

ISA(还记得吗?;-)DMA 芯片当然有一个 Fetch-and-Deposit 传输类型。

但是,来自 MASM32 论坛

嗨,

检查“未记录的电脑”,
他说内存到内存 DMA 是
可能的。然后他接着说
可能存在问题、限制、
CPU 可以进行复制
无论如何比 DMA 硬件更快
(386+ 上的 MOVSD)。

所以这似乎是可以的,
但谁在乎呢,类似的事情。

问候,

史蒂夫·N

ISA (remember? ;-) DMA chips certainly have a Fetch-and-Deposit transfer type.

However, from the MASM32 forums:

Hi,

Checking in "The Undocumented PC",
he says memory to memory DMA is
possible. He then goes on to say that
there can be problems, limitations,
and that the CPU can do the copy
faster than the DMA hardware anyway
(MOVSD on 386+).

So it seems to be a yes you can,
but who cares, kind of thing.

Regards,

Steve N.

凝望流年 2024-10-12 13:43:37

是的,内存到内存的传输可以达到 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.

蓝海 2024-10-12 13:43:37

肯定有 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文