discussion forum



message

Name: Christian Ludloff
eMail: ludloff@sandpile.org
Date: March 18, 2004 at 11:42:18
Subject: Re: Finding CPU frequency
In Reply To: Finding CPU frequency by
unknow on March 18, 2004 at 10:28:23
Text: | I need to compute the CPU frequency in a driver application
| I just need to know the maximum CPU frequency (not the actual).

Obtaining this information is complicated and processor-specific.
And subject to change, as new CPUs are introduced. So you want to
avoid having to code this stuff all by yourself.

It is likely that the target OS provides a suitable API function.

| All PC's display the CPU frequency...I guess there must be
| some assembly instruction to query the CPU speed.

Yes, most PCs display this type information during POST.

But then, a BIOS is almost always tailored to the particular PC.

| The Intel manual says that the processor clock speed can be got
| thru the CPUID instruction.

Only on selected Intel processors -- not all of them.

| Can someone elaborate how do I do that or any other way?

Intel's CPUID application note provides details on how to extract
the processor speed from the processor name string of a processor
that supports this particular feature.

--
CL

optional link: sandpile.org



post a followup message
(Be nice... or be blocked. Be technical... or be erased.)

Name: optional link title:
eMail: optional link URL:
Subject: optional image URL:
  Insert line breaks by hand when only about one inch remains at the right side. Otherwise your message will be unreadable.
Text:
 

  Note: The above eMail form fields may look unaligned if you are using a browser other than Netscape Navigator version 3.0.



currently posted followup messages
(You may have to press the RELOAD button of your browser.)




main page