Unable to run run-time loaded code on ZedBoard

Chris Johns chrisj at rtems.org
Mon Oct 26 21:25:20 UTC 2015


On 27/10/2015 8:15 am, Patrick Gauvin wrote:
>> Hmm maybe a data cache flush and instruction cache invalidate is needed.
>>
>> Maybe the L2 cache support being added has broken this test.
> 
> I added calls to rtems_cache_invalidate_entire_data and
> rtems_cache_invalidate_entire_instruction before calling the loaded
> functions (dl-load.c:54) and they now work as expected.

Many thanks for testing this and reporting back. Can you please raise a
ticket in Trac for this against me?

> I haven't looked too much at the internals of the RTL code, but should
> instruction and data cache invalidates be performed in the RTL code on
> the memory regions where objects are loaded, or is this a bug
> somewhere else? I'm willing to help with patching/testing for this
> since I have the hardware easily available.

The fix will be more complex because the memory used may need to be
cache line aligned to avoid corrupting surrounding areas when
invalidating. Another complication is not all boards have caches so I
need to review the cache API to see what is needed. I may extend the
allocator interface to add caching support.

Chris


More information about the users mailing list