I am running Linux kernel 3.3 on Xilinx's Microblaze with full MMU. the task that I am doing requires me to know the following: I need to create a text file (buffer) and locate the physical address of this buffer and I don't want the kernel to write this file into discontinuous regions of memory.
the reason I need this because I have a DMA engine that streams data from a preset physical memory address, so I need to force Linux to create the buffer file at that exact memory location, so that when I write data into this file its immediately transmitted by the DMA Engine to another Hardware core
More details:
my system has a 512 MB DDR3 RAM connected to the system via "Xilinx' multi port memory controller (MPMC). the base address of this memory controller is 0x90000000, all units in the system access memory through this controller, including MicroBlaze, The DMA unit that I have uses a special interface called Native Personality Interface (NPI) to communicate with memory at a very low level, thus resulting a very high speed performance.
This NPI DMA unit was originally designed to be utilized under a very basic embedded kernel called "xilkernel" which did not support virtual memory, neither MMU was part of MicroBlaze, so the programmer could see where the OS code will reside and select a physical memory address such as 0x91800000 as the source address which DMA will stream from, then the programmer can place a file in that exact address and run the system
when we needed to the migrate the project to use Linux instead of xilkernel we ran into this issue, I have files on an external storage device which I can access as block device from Linux and I need move each file to main memory (DDR3 RAM) and make the DMA stream the file. currently the DMA streams from a fixed address but I can make it generic if needed.