xilinx_zynq_zedboard, accessing memory outside standard program range

Chris Johns chrisj at rtems.org
Fri Mar 7 00:06:14 UTC 2014


On 7/03/2014 3:37 am, Giovanni Macciocu wrote:
> Hi all,
>
> I'm working with the recent RTEMS head (11 Jan. 2014) and the xilinx_zynq_zedboard BSP.
>
> I'm having a problem with accessing memory outside of the standard program range, I'm trying to write to an FPGA memory register as follows:
>
> *(volatile uint32_t*) 0x4120000 = 0xff;
>
> This results in a program crash. If I do the same on the same hardware design but on non RTEMS Software then it is no problem to access the memory this way.
> Is Rtems somehow preventing direct memory access outside of the standard program range?
>

Correct it is by default being conservative. The default set up is for 
the code and devices RTEMS knows and needs. It has no ability to know 
your specific PL logic and its memory requirements.

The MMU set up code in the Zynq BSP is tagged with a weak attribute so 
you can add a suitable function to your application and it can set up 
the MMU. Copy this file:

http://git.rtems.org/rtems/tree/c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstartmmu.c

and add the specific sections you need.

Chris



More information about the devel mailing list