Hi I am trying to implement an FPGA accelerator to be integrated with an ARM processor by means of AXI bus. FPGA accelerator includes a DMA which aims to move input data (from memory) and output data (to memory). Everything is working as a bare metal application, but I have problems to do it under Linux.
The idea is that userspace processes must provide input data and must read output data. To cope with this I am writing a device driver but I am stuck at address translation from virtual address to physical address. When I give DMA the input and output base address I am able to provide just the virtual ones that is useless for my purpose, since I do not know how to translate it into the physical ones. As a result I read and write data from wrong memory locations. I also think that another difference from bare metal is that in linux data can be fragmented while in bare metal they are in contiguous memory regions.
Do you have any suggestion or reference to address these problems? Thanks