xilinx_zynq_zedboard, accessing memory outside standard program range

Gedare Bloom gedare at rtems.org
Thu Mar 6 17:34:41 UTC 2014


On Thu, Mar 6, 2014 at 11:37 AM, Giovanni Macciocu <G.Macciocu at sron.nl> 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?
>
The MMU setup on this and the other ARM boards using the cp15 makes it
a fault to access any region not defined by the configuration table
passed to arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache().

You can see what the xilinx zynq bsp does in
c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstartmmu.c.
Since zynq_setup_mmu_and_cache() is 'weak', your application can
provide an alternate implementation of this function and you can copy
the existing code but define an arm_cp15_start_section_config
structure with a definition for the region of your FPGA registers.

Gedare

> Regards,
>
>
>
>
> Giovanni Macciocu, Software Design Engineer
> SRON Netherlands Institute for Space Research
> Sorbonnelaan 2, 3584 CA Utrecht, The Netherlands
>
>
>
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel



More information about the devel mailing list