Fatal exception while changing the memory entries in ARMv7 MMU

Gedare Bloom gedare at rtems.org
Sat Jul 25 16:14:52 UTC 2020


On Sat, Jul 25, 2020 at 9:44 AM Utkarsh Rai <utkarsh.rai60 at gmail.com> wrote:
>
> Hello,
> While changing the memory entries for a section in the ARMv7 MMU using 'arm_cp15_set_translation_table_entries()' I get fatal exception error. On stepping through the debugger, the exception occurs when invalidating the data TLB entries, using 'arm_cp15_tlb_data_invalidate_entry()'.
>
> You can view the relevant snippet here. Interestingly enough, the fatal exception occurs when I change the memory attribute from READ/WRITE to READ ONLY. Can someone point out my mistake?

My best guess: The block of memory you pass is in global space. It is
not likely to be page aligned. So when you change to read-only, you
probably change some other global variables to read-only also, and
then something tries to write to them.

To see if that is the problem, use the aligned() attribute (we have
RTEMS_ALIGNED) with the page size.

> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list