[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - Access Host(O/S)-Ram from Epiphany via DMA

Access Host(O/S)-Ram from Epiphany via DMA

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

Access Host(O/S)-Ram from Epiphany via DMA

Postby moses_rotesmeer » Tue May 23, 2017 11:16 pm

moses_rotesmeer
 
Posts: 13
Joined: Fri Aug 08, 2014 9:52 pm

Re: Access Host(O/S)-Ram from Epiphany via DMA

Postby sebraa » Mon May 29, 2017 12:10 pm

The Epiphany can only access the 32 MB shared memory area directly. Officially.

However, if the Epiphany chip accesses an off-chip address and that access goes out on the correct eLink interface, then it will go directly into the physical memory of the ARM host. I once did a proof-of-concept showing that, but I wouldn't recommend going this route. Keep in mind that these kind of accesses basically bypass any security measurements, ARM caches and Linux memory management simultaneously. Getting this to work reliably definitely requires more understanding than I have. Don't do it.
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

Re: Access Host(O/S)-Ram from Epiphany via DMA

Postby moses_rotesmeer » Mon May 29, 2017 12:37 pm

Ok, thank you for your response. I understand that this Access would bypass e.g the Linux memory Protection. However, I'm actually tring to access some bss section of a program running in linux, without any awareness of this by either linux or the program and also by avoiding interference/modification of this program. I thought using a DMA Acces from the Epiphany core to the main memory might be the best solution for this requirement. Any other suggestions to achieve this are highly appreciated :-)
moses_rotesmeer
 
Posts: 13
Joined: Fri Aug 08, 2014 9:52 pm

Re: Access Host(O/S)-Ram from Epiphany via DMA

Postby polas » Mon May 29, 2017 1:44 pm

polas
 
Posts: 46
Joined: Thu Mar 05, 2015 9:41 pm

Re: Access Host(O/S)-Ram from Epiphany via DMA

Postby moses_rotesmeer » Mon May 29, 2017 2:06 pm

Any program on the host.
Btw. I only need to read from the main-memory (not to write)
Thank you for your suggestion, I considered a similar approach, however, I thought a direct access from the epiphany cores is preferred since I could safe a memcopy from main-mem to shared mem first.
From the ARM/Linux perspective the access should be as invisible/non-intrusive as possible (including as little overhead on the host system (ARM) as possible).
That's another reason why I considered the DMA as my preferred solution in this scenario.
moses_rotesmeer
 
Posts: 13
Joined: Fri Aug 08, 2014 9:52 pm

Re: Access Host(O/S)-Ram from Epiphany via DMA

Postby 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 1618 times
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

Re: Access Host(O/S)-Ram from Epiphany via DMA

Postby moses_rotesmeer » Tue May 30, 2017 8:34 am

thank you, that helps me a lot.
Ok, it's going to be tricky, but otherwise it wouldn't be fun, would it? :D
best,
moses
moses_rotesmeer
 
Posts: 13
Joined: Fri Aug 08, 2014 9:52 pm


Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 6 guests

cron