How to detect processor string and speed?

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator: Moderators

Post Reply
HeinanXP
Posts: 19
Joined: Sun Jul 11, 2010 1:12 pm

How to detect processor string and speed?

Post by HeinanXP » Mon Mar 28, 2011 11:09 am

Hello,

How can I detect the processor string (For example: Intel Core i7) and the speed of it (For example: 2.66 GHz)?

Thanks,

halofreak1990
Posts: 92
Joined: Thu May 27, 2010 8:54 pm
Location: Netherlands

Re: How to detect processor string and speed?

Post by halofreak1990 » Mon Mar 28, 2011 2:48 pm

The Processor Brand string can be accessed by CPUID, using eax = 0x80000002, 0x80000003 and 0x80000004 in sequence
It's a 48 byte null-terminated string, returned in four byte sequences via eax, ebx, ecx and edx per call
For more information about CPUID, read the wikipedia article at http://en.wikipedia.org/wiki/CPUID

The processor speed has to be obtained by running a speed test. Methods vary, so you'll have to find something that suits your desired level of accuracy.

HeinanXP
Posts: 19
Joined: Sun Jul 11, 2010 1:12 pm

Re: How to detect processor string and speed?

Post by HeinanXP » Mon Mar 28, 2011 5:20 pm

I really didn't understand what you said.. Could you please post some kind of code explaining exactly what do you mean?

Andyhhp
Moderator
Posts: 387
Joined: Tue Oct 23, 2007 10:05 am
Location: 127.0.0.1
Contact:

Re: How to detect processor string and speed?

Post by Andyhhp » Tue Mar 29, 2011 12:14 am

Could you please post some kind of code explaining exactly what do you mean?


What are you on about? halofreak1990 posted a link to wikipedia which explains, with code example, exactly how to do what you want.

~Andrew
Image

Post Reply