You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The svc (Supervisor Call) instruction generates a synchronous exceptions that traps EL0 into EL1, so it's not used to drop EL but instead it's used to raise it. For example if user-space (running at EL0) want to request an OS service (running at EL1), it will use the svc instruction.
If you want to drop EL, you use the eret (Exception return) instruction. It will restore the processor state using spsr_eln (which in-fact also contains the EL to restore) and elr_eln (address to return to).
you mentioned "when we enter el1_entry function the execution should be already at EL1 mode.", but
int el = get_el(); printf("Exception level: %d \r\n", el);
the code shows it is exception level 3, seems self contradiction,
also, without calling "svc", how did you change the exception level from 3 to 1?
thanks in advance!
The text was updated successfully, but these errors were encountered: