Page 1 of 1

Limiting RAM Access

Posted: Fri Nov 11, 2016 10:53 pm
by Tighe_1
Hi there,

I'm busy trying to setup the ADC test project written by Pavel@ (repo)(background). In the thread they talk about limiting the accessible RAM from the OS.

I was curious how to do this? Can anyone point me in the correct direction? I'm trying to write to a portion of unused RAM.

Also, what is the significance of 0X1E000000? How was this address chosen? Is there an overall memory map that I can use or resource? I'm guessing this is somewhere near the end of RAM?

Thanks in advance!

(Please excuse my noobness)

Re: Limiting RAM Access

Posted: Sat Nov 12, 2016 3:02 pm
by jeanminet
Hello,

In Pavel's repo, the two following lines tell Linux not to use the upper 8 MB of RAM between 504 MB and 512 MB (0x1E000000 = 503316480):
https://github.com/pavel-demin/red-pita ... .patch#L41
https://github.com/pavel-demin/red-pita ... .patch#L22

In the ADC project, the RAM writer IP is configured to start writing data in RAM at 504 MB offset:
https://github.com/pavel-demin/red-pita ... n.tcl#L215

The server can then access the data using mmap:
https://github.com/pavel-demin/red-pita ... rver.c#L48

Good luck!
Jean

Re: Limiting RAM Access

Posted: Sun Nov 13, 2016 6:30 am
by Tighe_1
Thanks for this, Jean.

Do I have to recompile an entire bootable environment for this? I'm not overly familiar with the whole Device Tree /U-Boot stuff.

Is there some simpler way to do this?

-Tighe

Re: Limiting RAM Access

Posted: Sun Nov 13, 2016 3:06 pm
by jeanminet
Pavel's image has the feature by default.
You don't need to recompile anything.