by ysapir » Wed Dec 19, 2012 6:22 pm
It is not the Linux loader that is loading the chip with the images. The Epiphany loader is a callable API (callable by the host, that is) that merely copies a binary image onto the chip cores. You build your image using the Epiphany compiler and linker, linking your code modules with whatever runtime library required for your application (newlib, eLib, etc.) and the CRT0. The linking is static, as we don't support shared objects on the chip (b/c we don't run an OS). Thus, the resulting binary (.elf executable) contains all the code it needs to run the program, placed, by the linker, in its final address locations (on a core's SRAM, using local addresses, or outside of a core, on another core or DRAM, using global addresses).
This binary is all you need to run a program on the chip. So, the e-loader copies this binary to the chip, considering the target core, and optionally runs the program by sending the special interrupt signal. To make it clear - the e-loader does not do any manipulation on the binary image (other than change its global address prefix, to direct the data to the desired core).
As of now, the Parallella architecture is comprised of the ARM running Linux, which "sees" the general purpose DRAM space (used by Linux). Then, there is the Epiphany chip that has its dedicated DRAM space (ERAM). This ERAM is not seen or used by the Linux, in a manner equivalent to graphics GRAM on graphics boards.
The host can access the ERAM similar to the way it can access other memory-mapped devices. That is, you need a driver or other means to "get out" of the Linux virtual memory space. For this we have the e-host API, which serves as the Epiphany driver. The Epiphany is limited to accessing the ERAM. It cannot signal the host in any way other than share a memory mailbox in ERAM or its SRAM. It is the host's responsibility to poll this mailbox.