Writing code to detect processor

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Fredrick

Writing code to detect processor

Post by Fredrick »

What code can I write to detect processor speed, ram?
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re: Writing code to detect processor

Post by df »

detecting processor speed is a convoluted process.

if its a pentium class  you can use rdtsc on it and time a known instruction.

if its < pentium, you have to resort to lots of tricks (ie: make, model, stepping etc).

or

use some extended bios info stored in the tables in the bios, which give processor speed, motherboard type/maker, etc.

detecting ram is much easier. let something like grub do it for you and use its value. (grub just uses some of the extended bios calls)
-- Stu --
Post Reply