[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DMA memory mapping
--- David Stroupe <dstroupe@keyed-upsoftware.com> wrote:
> I am developing a framegrabber driver. I need to map memory for
> the
> grabber to DMA the images into. I have it working currently where
> the
> grab happens into kernel memory and then I copy_to_user to get the
> buffer into user space. I think I can eliminate this step by using
>
> remap_page_range which would allow me to access the grabbed images
> directly from user space. The argument to remap_page_range that I
> don't
> understand is the first argument...the virtual address. I know how
> big
> the buffer is, I know the physical address of the buffer allocated
> in
> the kernel, I have to set the protection such that the pages are
> not
> swapped...how do I get a virtual address to pass to the driver so
> that
> this mapping can take place?
>
__va() will work, but only with low memory addresses.
See http://www.xml.com/ldd/chapter/book/ch13.html#t1
Best of luck, ;-)
--Christine
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/