Re: CPU Initiated DMA

From: Robert Hancock
Date: Sat Jan 08 2011 - 13:16:29 EST


On 01/07/2011 02:55 PM, Nikolaus Rath wrote:
Hello,

I want to write a driver for a rather dumb PCI card, which cannot become
bus master itself. Is it possible to use a DMA controller on the
mainboard to still transfer data to the card without occupying the CPU?

(I believe this is the way DMA used to work on ISA cards, but do recent
x86 systems still have a DMA controller for the CPU?)

The legacy ISA DMA controller worked like that, but you can't use that with PCI devices. Essentially there is no way to do this, barring perhaps some wierd platform specific feature.

This tends to be an issue with graphics card framebuffers in some cases. You may be able to use ioremap_wc to map your device's MMIO region as write-combining to reduce the amount of CPU overhead. However, note that this can result in writes to the device being reordered.


Any pointers are greatly appreciated. I looked into "Linux Device
Drivers", but the DMA chapter seems to be only about the device becoming
busmaster.



Best,

-Nikolaus


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/