HI,
Has anyone used "__readmsr and __writemsr" while writing device
drivers for windows. These are intrinsic functions in VC++. Not sure
how to use it to read MSR values. A sample code demonstrating these
command will be helpful. When I try to use them I get a bunch of
Linking errors.

Thanks
NM

Re: __readmsr and __writemsr usage by Your

Your
Fri Sep 08 05:26:55 CDT 2006

Hi,

It seems you need to declare function prototypes like this :

// ripped from <ntddk.h>

//
// Define function to read the value of the time stamp counter
//

#define ReadTimeStampCounter() __rdtsc()

ULONG64
__rdtsc (
VOID
);

#pragma intrinsic(__rdtsc)

I don't know where __*msr function are defined.

Hope it helps.

nandish.murthy@intel.com a écrit :
> HI,
> Has anyone used "__readmsr and __writemsr" while writing device
> drivers for windows. These are intrinsic functions in VC++. Not sure
> how to use it to read MSR values. A sample code demonstrating these
> command will be helpful. When I try to use them I get a bunch of
> Linking errors.
>
> Thanks
> NM
>