Read Base Clock Frequency

Read Base Clock Frequency

I understand that the frequency of the base clock varies between the nehalem and the sandy/ivy bridge architectures (133.33 MHz vs 100 MHz). Is there a way to read this number from an MSR or some other source? 

10 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

If there is another way, I have not seen it.

In my tools I have to check the cpuid family and model to see on which cpu I'm running and then use the appropriate 100 or 133 MHz speed.

Sorry,

Pat

>>...In my tools I have to check the cpuid family and model to see on which cpu I'm running and then use the appropriate 100 or
>>133 MHz speed.

Patrick, Could you be more specific, please?

IIRC I saw in the documentation that one of the MSR registers 0xCE reports base frequency.I need to check ISDM to verify this.

Hello Sergey,

It is just the standard, pain-in-the-rear code like:

if ( family == 0x6 && xmodel == 0x3e ) {

    bclock == 100 ;   // so cpu model is ivybridge, bclock is 100 MHz

} else if ( family == 0x6 && xmodel == 0x2a ) { // sandybridge...

the family and xmodel (extended model) is based on the CPUID app note http://www.intel.com/content/www/us/en/processors/processor-identification-cpuid-instruction-note.html

There is a discussion of using cpuid to ID cpu type at http://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers

Pat

 

>>...the family and xmodel (extended model) is based on the CPUID app note...

Thanks for the note, Patrick. I didn't see processor-identification-cpuid-instruction-note.pdf document before.

hope you may interested in the following link

software.intel.com/en-us/platform-monitoring

>>hope you may interested in the following link
>>
>>software.intel.com/en-us/platform-monitoring

Thanks for the link.

Great link PONRAM.

My conclusion for the original question is that Patrick's method using cpuid is the only viable option, and I have implemented that in my code. Thank you all for your responses.

Thank you PONRAM for the link.It contains a great amount of information.

Login to leave a comment.