DMA to User-Space
Jonathan Haws
Jonathan.Haws at sdl.usu.edu
Thu Nov 5 04:50:04 EST 2009
> 1. I open /dev/mem and get a file descriptor
> 2. I use mmap to reserve some physical addresses for my buffers in
> user space.
> 3. I give that address to the FPGA for DMA use.
> 4. When I get the FPGA interrupt, I invalidate the data cache and
> write the data to disk
>
> Does that sound like it would work? Would the address I receive
> from mmap() and pass to the FPGA be the actual physical address, or
> would I need to send the physical address to the FPGA and use the
> mmap() address to access and write to disk?
One more question about this approach: does the mmap() call prevent the kernel from using this memory for other purposes? Will the kernel be able to "move" this memory elsewhere? I guess what I am asking is if this memory is locked for all other purposes?
More information about the Linuxppc-dev
mailing list