Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arch: arm: cortex_a_r: Fix restore of registers while exiting exception
This commit fixes potential unpredictable behavior, caused by using the ^ form of ldmia instruction, while exiting an exception in SMP mode on Cortex-A/R. Change: Use "pop" instead of "ldmia" to restore user mode registers while exiting from an exception via `z_arm_cortex_ar_exit_exc`. Reason for change: Processor mode is always set to system (MODE_SYS) before calling `z_arm_cortex_ar_exit_exc` and hence, the user mode register can be accessed directly without the ^ form of the instruction. Also, LDMIA instruction is UNPREDICTABLE in SYStem mode. Signed-off-by: Sudan Landge <[email protected]>
- Loading branch information