Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Dec 1999 21:26:43 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: memory-to-memory copy 
Message-ID:  <199912020526.VAA00818@mass.cdrom.com>
In-Reply-To: Your message of "Wed, 01 Dec 1999 16:25:22 EST." <Pine.GSO.3.96.991201161752.5996A-100000@sol.cs.binghamton.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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,  \\  msmith@freebsd.org
\\ and he'll hate you for a lifetime.             \\  msmith@cdrom.com




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912020526.VAA00818>