Check out the isUserMode() function in src/arch/alpha/utility.hh


Ali 

On Mon, 25 Oct 2010 16:01:26 +0300, "George Tz."  wrote:  

I
apologise for the previous message, but I accidentally hit reply.

So as
I was saying:

In my case lets say that in the fetch_impl.hh file I have
added the following code after the fetching of the original
instruction.

 //Instruction fetch
 if
(cpu->readMiscReg(AlphaISA::IPR_ICM, tid) != AlphaISA::mode_kernel) { 

//Fault Injection

 }   
 Also in case you have a DynInst Object (e.g
O3DynInst *xc) available you can use
 if
(xc->readMiscReg(AlphaISA::IPR_ICM) != AlphaISA::mode_kernel) {
 //...

}

That's all I have got until now.
 If anyone else has more on the
topic, I would also be interested.

George Tziantzioulis

On Mon, Oct
25, 2010 at 3:34 PM, Lide Duan  wrote:
 Thanks, George. Can you (or
anybody else) elaborate on this? 

On Sun, Oct 24, 2010 at 11:54 PM,
George Tz.  wrote:
 I have been searching for that and though I am not
quite sure if it is the best way, I believe you can do it by checking
the IPR_ICM register.
 Please someone correct me if I am wrong.

George
Tziantzioulis

On Mon, Oct 25, 2010 at 7:19 AM, Lide Duan  wrote:  


Hi, 

I am wondering if there is anyway to distinguish application
instructions from Linux OS instructions in ALPHA_FS mode?


Thanks,
Lide
  _______________________________________________

m5-users mailing list
[email protected]
[4]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
[5]

_______________________________________________
 m5-users mailing
list
[email protected]
[6]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
[7]

_______________________________________________
 m5-users mailing
list
[email protected]
[8]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users [9]




Links:
------
[1] mailto:[email protected]
[2]
mailto:[email protected]
[3] mailto:[email protected]
[4]
mailto:[email protected]
[5]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
[6]
mailto:[email protected]
[7]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
[8]
mailto:[email protected]
[9]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to