Page 1 of 1

cpuid - eax = 0x2

Posted: Wed Jun 15, 2005 11:19 am
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.

Re:cpuid - eax = 0x2

Posted: Wed Jun 15, 2005 11:42 am
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

Re:cpuid - eax = 0x2

Posted: Wed Jun 15, 2005 12:00 pm
by DruG5t0r3
thanks, thats like exactly what I needed. Only question is, why isn't that doc available on Intel's site?...

Re:cpuid - eax = 0x2

Posted: Wed Jun 15, 2005 1:47 pm
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.

Re:cpuid - eax = 0x2

Posted: Thu Jun 16, 2005 2:31 am
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