by ysapir » Wed Oct 09, 2013 12:08 pm
A few comments:
1. The "fixed" region is semi-fixed, as it is defined in the HDF file, which you process at the e_init() call. It can really be anywhere in the system, but on the Parallella we defined it to be excluded from the Linux' space, to serve as Epiphany's private DRAM.
2. There are two address ranges involved:
- 0x3e000000 - 0x3fffffff This space is the true, physical portion of the DRAM we assigned as EXT. MEM. This is the range you'd refer to from the ARM side
- 0x8e000000 - 0x8fffffff This is the same region, remapped to a different address range ("virtual", if you will) that you refer to from the Epiphany side.
The two regions are the same. You could actually used the "ARM" region from Epiphany and it will work, to some extent. Moreover, you could refer to any address in the physical space, even the Linux' memory, and it will work.
The reason for the distinction is that the current Epiphany chip on the Parallella has some limitation preventing it from accessing certain address ranges, some of which fall in the board's physical memory range. So, we implemented the remapping, to allow for a contiguous 32MB of addressable RAM. In future generations we anticipate this problem to be resolved, so 1:1 mapping would work just fine.
Accessing Linux' virtual space from the Epiphany is not possible directly (duh!), but you could possibly work around this by finding the physical address of the pointer allocated by malloc(). If you mmap() the Linux' memory, for example, you may have the base physical address for the virtual space, and from there the offset is easy to compute. You could then access this region from Epiphany, provided that it does not fall on one of those inaccessible "windows", and provided it was not relocated by the OS, like Tim mentions.