by sebraa » Tue May 30, 2017 7:20 am
Hi,
the Epiphany can directly access Linux' physical memory by just reading and writing through pointers; there is no need to use any DMA engines. At least, this was the state when I tried it (see the attached file), I do not know if this works with the current images. I have not tested the code now.
Keep in mind that these direct accesses bypass any caches, so the Epiphany may read stale data, and writes may not be noticed by the application. Getting this to work reliable may require some evil invalidation magic. Also, the Epiphany may be able to directly access some of the ARM peripheral registers (i.e. interrupt controller and such), but the same reservations apply there.
Another thing to consider is that finding the physical memory page of a running Linux application is tricky (think of ASLR), and may change at any time (think of swapping). Also, the routing algorithm employed by the Epiphany strictly routes by addresses, and only one of the eLink interfaces is actually connected to the Zynq. This means that large areas of the address space are not reachable from the Epiphany chip at all.
Best of luck,
sebraa
- Attachments
-
- host-dma.tar
- host direct access, proof-of-concept
- (20 KiB) Downloaded 1649 times