Basically, it is up to a kernel device driver to provide the translation. User space should never have access to DMA devices as that would bypass all security on the system.
Userspace cannot know if a memory is or is not in physical memory, nor where in physical memory a particular data page is. It may be swapped out... or shuffled around between scheduling activities that the userspace application knows about.
It is possible to get some fixed location (locking pages in memory), but besides requiring privileges to do so, there is only so much that can be done. Even then, it is limited to using a virtual address of the page.
This is also not a newbie subject. You might try the linux hardware forum, but really, your problem is in writing device drivers.
Last edited by jpollard; 12-16-2012 at 08:07 AM.
|