moving to kernal/supervisor mode on MIPS

Hi , I am working on MIPS32-4Kc processor. For profiling my code i used "mfc0" instruction to get the "count" register value.This is working well on simulator and also on Board using JTAG, but when i try to cross-compile on run on the same Board which is booted with Linux OS, it is giving exception (because in user mode we don't have privilages to acess co-processor)

So how can we move from user mode to privilaged modes to run my program. can anyone suguest a method...

bye Raju

Reply to
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.