Is it possible to get the cores privilege state in user mode ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Is it possible to get the cores privilege state in user mode ?

457件の閲覧回数
martinschulthei
Contributor III

Hi,

as mentioned in the question, I want to know if there is a possibility to read out a e.g. core register to get the current privilege state in user mode. (MSR PR-Bit).

Problem is that the MSR is not readable in user mode.

We'd like to add a mechanism to determine whether we need a system call to access specific memory regions (e.g. peripherals which are only accessible in supervisor mode) or not (Performance issues).

The solution should be usable for all e200zX cores.

Thank you in advance and best regards

Martin

0 件の賞賛
1 返信

373件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, as MSR register cannot be read in user mode it can only be done by system call the same way as you would switch to user mode but you would not edit SRR1 content. Thus you will return to user mode, but you may store MSR content (stored in SRR1 during system call).

pastedImage_1.png

0 件の賞賛