Hello,
I am using TrustZone together with Trusted Firmware-M and Zephyr on the AN521 board in QEMU. After setting SAU and MPC memory regions, during Zephyr setup, "cpsid i" is called using inline assembly. However, this call from non-secure code memory triggers a SecureFault with the Attribution unit violation flag, suggesting memory access to a secure address. I cannot understand how this instruction could cause the SecureFault and thus have no idea how to fix it. The SecureFault Address Register is set as valid and holds an address within the non-secure stack, which is part of the non-secure region defined by the SAU. Do you have any ideas or suggestions which might help me?
EDIT: The instruction was not the problem (see my response down below)
Martin
If the problem is solved then mark it as "answered"!