Is there a way to know if it is privilege mode?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a way to know if it is privilege mode?

627 Views
jaejynshin
Contributor III

Hello Expert

 

I want to know if current running app is privilege mode or not.

The simplest way is check MSR but if it is not privilege mode, Program Exception occurs.

Is there a safe way to check which the mode without Exception or Interrupt?

 

Thank you
Jaejyn

Labels (1)
0 Kudos
1 Reply

516 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

You will have to temporarily switch into supervisor mode by system call instruction that invokes IVOR8 exception and copies actual MSR content to SRR1 register.