cpuid - eax = 0x2

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
DruG5t0r3

cpuid - eax = 0x2

Post by DruG5t0r3 »

I'm trying to find documentation as to the "function" number 2 of cpuid which gives information such as l2 cache size and etc. Looks like the web page on Intel's site is gone. Any help is appreciated.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:cpuid - eax = 0x2

Post by Brendan »

Hi,
DruG5t0r3 wrote:I'm trying to find documentation as to the "function" number 2 of cpuid which gives information such as l2 cache size and etc. Looks like the web page on Intel's site is gone. Any help is appreciated.
Try this link (see page 17): http://bochs.sourceforge.net/techspec/24161821.pdf

Please note that other CPU manufacturers do it a different way...


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
DruG5t0r3

Re:cpuid - eax = 0x2

Post by DruG5t0r3 »

thanks, thats like exactly what I needed. Only question is, why isn't that doc available on Intel's site?...
smiddy

Re:cpuid - eax = 0x2

Post by smiddy »

You can also try http://sandpile.org/ia32/cpuid.htm which contains a wealth of technical information, but now description on your own algorithm development and pitfalls to watch out for.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:cpuid - eax = 0x2

Post by Brendan »

Hi,
smiddy wrote: You can also try http://sandpile.org/ia32/cpuid.htm which contains a wealth of technical information, but now description on your own algorithm development and pitfalls to watch out for.
I can probably make this easier for everyone - my OS has CPU cache detection code that it uses for determining page colours for the memory managers.

I've attached this code - no copyright and no warranties (if you use it you own it).


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply