Hi:
If CPU is in secure state, and calling the none-secure world method. Dose this allowed or it will generat a security fault
In addition to Joseph's comments, please note that the Arm Compiler 6 has full support for developing with secure and non-secure world code, including the generation of the appropriate BLXNS instruction etc. Please see the below application note, written for MDK, though equally applies to the DS-5 tool if that is your preference (both toolkits include the Arm Compiler.www.keil.com/.../apnt_291.pdf
Thank you guys for help.
I just wandering about the protections about in secure state directly call to none-secure method through function pointers, not using BLXNS, just BLX. I found that it will causing fault exceptions on our testing platform.
Hi Rising,
Other than the branch instructions which are dedicated to be executed for state transitions (like BLXNS, BXNS), the existing branch instructions like BLX, BX, BL <label> instructions when executed from secure state to a non-secure state address shall result in a secure-fault.
However, if the existing branch instructions like BLX, BX, BL <label> is executed from non-secure state to a secure target address with the target state bit set to 0 shall result in usage fault.
Hope this helps.
Thanks,
Uma