LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   application needs fast access to physical memory (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/application-needs-fast-access-to-physical-memory-844917/)

123steve123 11-17-2010 03:45 PM

application needs fast access to physical memory
 
My application needs a fast way to access a specific physical DDR memory region. The application runs on an MPC8548 PowerPC which has an MMU. I've tried two approaches that are typical for Linux, mmap() and using a kernel module that implements read()/write() into this region and I'm finding that performance is very slow for both. It's a couple orders of magnitude slower than, for example, copying a large buffer from one place in the application's virtual memory to another place in the application's virtual memory.

I'm exploring other alternatives that includes:
1. Port to uClinux which may allow an application more direct access into kernel/physical memory
2. Modify the MMU somehow to allow access by the application to physical memory at a specific range of addresses

Both approaches appear to be fairly non-trivial. Is there another approach that should be considered?

Matir 11-17-2010 05:30 PM

It sounds like you're talking about doing DMA into physical RAM. The best advice I can offer is to look at how DMA is implemented for drivers, as in http://www.xml.com/ldd/chapter/book/ch13.html.

123steve123 11-17-2010 05:48 PM

I'm looking for a memory transfer mechanism between a user application and physical memory. DMA as described by the Linux Device Drivers book details a mechanism to allow other hardware peripherals access to CPU memory. In other words, it's a hardware to hardware transfer instead of a software (application in this case) to hardware transfer.


All times are GMT -5. The time now is 05:18 AM.