|
Message
From: olivercamel at gmail.com<olivercamel@g...>
Date: Wed Apr 23 23:19:51 CEST 2008
Subject: [openrisc] want to know more about "user mode" of openrisc
Hi List:As the title, can somebody let me know more about "user mode" of openrisc?
As far as I know, there are a "super mode" and a "user mode" in openrisc. General registers can be accessed at any mode, but most special-purpose registers are accessible only in supervisor mode (SR[SM] =1). When the cpu starts at 0x100 reset exception or any other exceptions, it will work in the super mode.
What I want to know is, how can we switch to user mode? Is there any good reason that we have to do so? And if we jump into it, how can we switch back? since "mfspr" and "mtspr" is only availabe in super mode, if we are in user mode, how do we edit SR[SM] bit?
Thanks.
Li Xiang 4.23
|
 |