Hi Fellows,
I want to determine in code, if the processor is in EL0 mode or not. I read CurrentEL register to do this but if my code is running from EL0, it throws an exception since we can't access CurrentEL from EL0. Is there any alternative and easy way to do determine mode that works even at EL0? Thanks.
Regards,
Mughees
Well I agree about just determining the level, but using the same code and doing something different is a reasonable idea. It is what multiple threads within a single virtual address space do and what the thread id register is for. Plus it is I think quite a good idea to be able to share library code between privilege levels. A while ago I'd been thinking about running the client part of a database system at a privileged level to control system resources and sharing the code with the user level.