On Wednesday 31 October 2007 13:05:16, Bai Shuwei wrote: > Hi, everyone > As we know, the program on the X86 can run on the differnt ring(0, 1, 2, > 3) and the linux kernel run in the ring 0 and user program in the ring 3. > And now I want to know wether there is a simple mechanism on the PowerPC > architecture? thx all! > > best regards! > > Buroc powerpc has a machine state register(MSR), bit MSR_PR present the current privilege level, if msr & MSR_PR, then it's from user space, otherwise(msr & MSR_PR == 0) it's kernel space. besides, the linux implementation only use ring0 and ring3 under i386, ring0 is highest(kernel space), ring3 is lowest (userspace) Wang -- Wang, Baojun                                        Lanzhou University Distributed & Embedded System Lab              http://dslab.lzu.edu.cn School of Information Science and Engeneering        wangbj@lzu.edu.cn Tianshui South Road 222. Lanzhou 730000                     .P.R.China Tel:+86-931-8912025                                Fax:+86-931-8912022