1 Reply Latest reply on Aug 21, 2010 3:19 AM by gyokuran

    Trying to calculate true frequency - segfault with rdmsr

    gyokuran

      Hello everyone,

       

      I'm trying to make a small command line tool that displays the actual frequency (especially when Turbo is on) according to the Frequency Algorithm outlined in point 2.2 in the intel whitepaper http://download.intel.com/design/processor/applnots/320354.pdf. However, I'm stuck at the very first step, that is reading the MSR with ECX=0xCE - the following code snippet simply segfaults:

       

      unsigned low, high;

      asm volatile ("rdsm" : "=a" (low), "=d" (high) : "c" (0xce));

       

      Any ideas why?

       

      /proc/cpuinfo says that msr flag is present, the processor is an Intel Xeon X5550