Hi Ali,

I assume that if inUserMode() is true, current instruction is an application
instruction. This makes sense in ALPHA_FS: I classified the committed
instructions into these two modes, and OS instructions are fewer than 1% of
app instructions. However, in ALPHA_SE, every committed instruction returns
false from inUserMode(), thus being identified as OS instruction. Shouldn't
all the instructions in SE are in user mode? or maybe I shouldn't test this
function under SE?

Lide

On Mon, Oct 25, 2010 at 11:42 AM, Ali Saidi <[email protected]> wrote:

> Check out the isUserMode() function in src/arch/alpha/utility.hh
>
> Ali
>
>
>
> On Mon, 25 Oct 2010 16:01:26 +0300, "George Tz." <[email protected]>
> 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 <[email protected]> wrote:
>
>> Thanks, George. Can you (or anybody else) elaborate on this?
>>
>>
>> On Sun, Oct 24, 2010 at 11:54 PM, George Tz. <[email protected]> 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 <[email protected]>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]
>>>> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>>>>
>>>
>>>
>>> _______________________________________________
>>> m5-users mailing list
>>> [email protected]
>>> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>>>
>>
>> _______________________________________________
>> m5-users mailing list
>> [email protected]
>> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>>
>
>
>
> _______________________________________________
> m5-users mailing list
> [email protected]
> 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