• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Reading model specific registers (MSRs)

xtknight

Elite Member
It seems like this should be a fairly straightforward operation. So here is the inline x86 asm code I'm trying. I move 10h (IA32_TIME_STAMP_COUNTER) into the ecx register, which is supposed to be TSC (time stamp counter). Yeah, I know, I could just use rdtsc, but eventually I'm going to read another MSR so I wanted to test it with this first.

Why oh why does it crash? The rdtsc function below it is fine. ReadMSR() crashes right after the 'rdmsr' asm operation is called.
 
Well, apparently in Windows NT you need to write a kernel-mode driver to access MSRs. In Linux, super-user mode is enough. Does Windows NT expose an API so I can get MSRs?
 
Back
Top