> 
> I used to know that memory to memory copy is done by the DMA controller in
> the I/O bridge (Actually, this knowledge confues me because DMA controller
> normally does not store the data that pass through it.  Now the source and
> destination are both memory, how can it achieve this at the same time with
> one memory bus?).

Almost nobody does memory-to-memory copy with DMA controllers.  You 
certainly don't do it on the PC.

> I was also told that the function bcopy() is used to
> setup DMA.

No, bcopy is used to move data from one place to another using the CPU.

> Now I look at the bcopy() function in i386/support.s, I only
> see instructions like "rep movsb".  So how is the memory-to-memory copy
> done in FreeBSD? 

With bcopy().

-- 
\\ Give a man a fish, and you feed him for a day. \\  Mike Smith
\\ Tell him he should learn how to fish himself,  \\  [EMAIL PROTECTED]
\\ and he'll hate you for a lifetime.             \\  [EMAIL PROTECTED]




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to