Does anybody know of any tutorials on how to detect the type of processor for pentium and AMD type processors.
Also does anybody know how to detect the version and maker of the cpu.
Either links or examples in assembly would help.
Thanks in advance!
Tutorial on CPU detection
Re:Tutorial on CPU detection
I was just looking at the Intel 486 documentation today
You can use the CPUID instruction for 486DX and better processors. do:
mov eax, 0x00000000
cpuid
...and then ebx, edx, and edx(I forget the order) will give you the string "GenuineIntel". With the first reg holding "uneG", the next holding "Ieni" and so on... For AMD processors, the 12-character string is "AuthenticAMD", decoded the same way...
if you do:
mov eax, 0x00000001
cpuid
...then eax is filled with tons of stuff:
bits 0-3 give the CPU's stepping number(revision?)
bits 4-7 give the CPU's Model in it's family...
bits 8-11 give the CPU's family number, 4 = 486, 5 = Pentium/K6, 6 = Pentium II, III, IV, Celery, Athlon, Duron...(use model # to find the exact chip...
bits 12 and 13 are processor type.
bits 14-31 are reserved (On the i486, not sure about other CPUs...)
I hope this was EXACTLY what you were looking for!
You can use the CPUID instruction for 486DX and better processors. do:
mov eax, 0x00000000
cpuid
...and then ebx, edx, and edx(I forget the order) will give you the string "GenuineIntel". With the first reg holding "uneG", the next holding "Ieni" and so on... For AMD processors, the 12-character string is "AuthenticAMD", decoded the same way...
if you do:
mov eax, 0x00000001
cpuid
...then eax is filled with tons of stuff:
bits 0-3 give the CPU's stepping number(revision?)
bits 4-7 give the CPU's Model in it's family...
bits 8-11 give the CPU's family number, 4 = 486, 5 = Pentium/K6, 6 = Pentium II, III, IV, Celery, Athlon, Duron...(use model # to find the exact chip...
bits 12 and 13 are processor type.
bits 14-31 are reserved (On the i486, not sure about other CPUs...)
I hope this was EXACTLY what you were looking for!
Re:Tutorial on CPU detection
You can find here
- more details
- ASM source code
- c source
for cpu detection
- more details
- ASM source code
- c source
for cpu detection
very good documentation on CPUIDftp://download.intel.com/design/Xeon/applnots/24161821.pdf