Unable to write to memory region marked as both writable and executable on cortex-R82

I am running on Cortex-R82 FVP.

EL2: MPU disabled with background region also disabled. 
EL1: MPU enabled with multiple non-overlapping regions, background region disabled.

SCTLR_EL[2|1].WXN is set to 0.

Behavior: In EL1, when I write to a normal memory MPU region that has write and execute permissions enabled (around memory location 0x86400, if it matters), the write operation causes a fault. The issue disappears when the region is marked non-executable (prbar.XN bit is set).

My question is, if this is expected behavior or if it is an FVP parameter/bug? If it is expected, would be grateful if I could be pointed to the documentation that explains it further.

Parents
  • Thanks for your reply, Martin! We ran the tests, and the issue is slightly different from what I explained above. Apart from "behavior" above, everything else holds true.


    Actual behavior: code does not execute from a memory region with write permissions, and results in an abort.

    Case: Execute from memory works
    prbar_el1: 0x56502c -> region marked as RO for EL1/EL0
    prlar_el1: 0x56811f

    Case: Execution from memory fails
    prbar_el1: 0x565024 -> region marked as RW for EL1/EL0
    prlar_el1: 0x56811f
    Execption Syndrom 0x8600000c Instruction Abort taken without a change in Exception level
    FAR 0x5662a0  (0xd2800007   MOV      x7,#0)

Reply
  • Thanks for your reply, Martin! We ran the tests, and the issue is slightly different from what I explained above. Apart from "behavior" above, everything else holds true.


    Actual behavior: code does not execute from a memory region with write permissions, and results in an abort.

    Case: Execute from memory works
    prbar_el1: 0x56502c -> region marked as RO for EL1/EL0
    prlar_el1: 0x56811f

    Case: Execution from memory fails
    prbar_el1: 0x565024 -> region marked as RW for EL1/EL0
    prlar_el1: 0x56811f
    Execption Syndrom 0x8600000c Instruction Abort taken without a change in Exception level
    FAR 0x5662a0  (0xd2800007   MOV      x7,#0)

Children