This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to return from exception generated by SMC instruction

Hi,

I am experimenting execution level switching on A53. I go from EL3->El2, then call SMC instruction to return to EL3. As soon as SMC instruction is executed, the processor enters EL3 mode and an exception is generated.

I have written an exception handler to return from this question. My question is should I use an ERET at the end of the exception handler? In that case will it go back to EL2 or will remain in EL3(since the exception was generated in EL2)? I would like for the processor to remain in EL3. SHould I manually modify the ELR so that the processor remains in EL3. I want to know how it is normally done.

Parents Reply Children
  • Hi i trying do transition from EL3 to EL2 exception ,but after ERET of EL3 mode it change the mode to EL2 , but as soon as when it will execute first instruction of EL2 , then It goes to Exception ...

    This is happen for every secure to non secure transition in Armv8-A .

    Please Guide if you know why this happen?

    Thank you in advance.

    Regards

    Sanjay Kumar