Re: Sample code for performing a DMA from local memory to local memory
- From: "Stephan Wolf [MVP]" <stewo68@xxxxxxxxxxx>
- Date: 24 May 2005 07:29:21 -0700
Calvin Guan wrote:
> Are you positive? I'm pretty sure it won't do DMA at least on x86
system.
Just to be more precise:
WRITE_REGISTER_BUFFER_ULONG() does not have anything to do with DMA. It
will just take care of transfering a data block from host memory to a
range of device "registers", i.e. usually some (shared) memory area
exposed by the device.
On x86, this is simply implemented as REP MOVSD, I guess.
DMA, however, is a completely different thing. Almost two decades ago,
when the x86 CPU clock rate was in the ~10 MHz range, so-called system
DMA was faster than REP MOVSW (no 32-bit MOVSD was available at that
time).
Today, REP MOVSD is about a couple orders of magnitude faster compared
to the system DMA controller.
The system DMA controller is still there today, as Max pointed out, but
its just there for compatibility reasons. For instance, DMA for the ISA
and EISA bus was using the system DMA controller (slave).
PCI does no longer use the system DMA controller. PCI cards that want
to use DMA must support busmaster DMA themselves. No system DMA chips
involved whatsoever.
[One could, however, still use the system DMA controller to move memory
to a shared memory range exposed by some PCI device - if the physical
address range is within the first 24 bits.]
See also
"Accessing Hardware Registers" by MVP Mark Roddy
http://www.wd-3.com/archive/PioAccess.htm
Stephan
.
- References:
- Sample code for performing a DMA from local memory to local memory
- From: Gerald Chang
- Re: Sample code for performing a DMA from local memory to local memory
- From: Maxim S. Shatskih
- Re: Sample code for performing a DMA from local memory to local memory
- From: Calvin Guan
- Sample code for performing a DMA from local memory to local memory
- Prev by Date: Windows: How to support 2 chip in a single driver?
- Next by Date: Re: Windows: How to support 2 chip in a single driver?
- Previous by thread: Re: Sample code for performing a DMA from local memory to local memory
- Next by thread: Re: Sample code for performing a DMA from local memory to local me
- Index(es):
Relevant Pages
|