Subject: Re: bus_dma
To: Matt Thomas <matt@3am-software.com>
From: Kamal R. Prasad <kamalpr@yahoo.com>
List: tech-kern
Date: 12/11/2004 21:41:31
--- Matt Thomas <matt@3am-software.com> wrote:

> At 03:20 AM 12/11/2004, Kamal R. Prasad wrote:
> >Hello,
> >
> >  Can someone point me to src code that uses
> bus_dma to
> >share a block of memory between kernel and user
> space?
> 
> uh, bus_dma isn't used for that.  

I looked at the paper by Jason Thorpe sometime back
and I BELIEVE it says it is used for kernel<-->user 
exchange of bulk data. Nevertheless, the suggestion to
use bus_dma is not mine.

> Could you explain
> what
> you are really trying to do?
> 
> 
I have written an mmap() interface for a usb device.
Userland does an mmap() to read in a block of data
without involving a copyout(). I am using vtophys()
[on freebsd for the moment] to map kernel virtual
address to a physical interface which is returned in
*paddr.
I have been given to understand that vtophys() will
not be available in future and I should use bus_dma in
future. The link below is the text of that email.

http://groups.google.co.in/groups?hl=en&lr=&threadm=fa.egdbid0.1u0211m%40ifi.uio.no&rnum=1&prev=/groups%3Fq%3Dkamalp%26hl%3Den%26lr%3D%26sa%3DG%26scoring%3Dd

While my code is being developed on Freebsd, it will
be moved to arm-netbsd [after I get the hw in hand].

Thanks for any help.
regards
-kamal

> -- 
> Matt Thomas                     email:
> matt@3am-software.com
> 3am Software Foundry              www:
> http://3am-software.com/bio/matt/
> Cupertino, CA              disclaimer: I avow all
> knowledge of this message.
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com