HI,
If I execute this on a Dell T410, which has two Xeon E5530 Quad Core processors, I get the output shown below:
mov eax, 4
mov ebx, 0
mov ecx, 0
mov edx, 0
CPUID
; at this point eax=0x1c004121, ebx=0x1c0003f, ecx=0x3f, edx=0x0
According to Intel AP-485: "The BIOS will use this function to determine the number of cores implemented in a specific physical processor package. To do this the BIOS must initially set the EAX register to 4 and the ECX register to 0 prior to executing the CPUID instruction. After executing the CPUID instruction, (EAX[31:26] + 1) contains the number of cores."
As you can see, EAX[31:26] is 7, so this package has 8 cores. But I know it only has 4. Can anyone tell me how to determine the number of cores in Intel processors that works for the E5530?
By the way, the number of logical processors works out to be 16, which I would expect as this processor is hyperthreaded. But again I know it actually has only 8 logical processors.
If I execute the CPUID instruction for all supported functions I get:
cpuid function, eax, ebx, ecx, edx
0x0, 0xb, 0x756e6547, 0x6c65746e, 0x49656e69,
0x1, 0x106a5, 0x7100800, 0x9ce3bd, 0xbfebfbff,
0x2, 0x55035a01, 0xf0b2e4, 0x0, 0x9ca212c,
0x3, 0x0, 0x0, 0x0, 0x0,
0x4, 0x1c004121, 0x1c0003f, 0x3f, 0x0,
0x5, 0x40, 0x40, 0x3, 0x1120,
0x6, 0x3, 0x2, 0x1, 0x0,
0x7, 0x0, 0x0, 0x0, 0x0,
0x8, 0x0, 0x0, 0x0, 0x0,
0x9, 0x0, 0x0, 0x0, 0x0,
0xa, 0x7300403, 0x44, 0x0, 0x603,
0xb, 0x1, 0x2, 0x100, 0x7,
0x80000000, 0x80000008, 0x0, 0x0, 0x0,
0x80000001, 0x0, 0x0, 0x1, 0x28100000,
0x80000002, 0x65746e49, 0x2952286c, 0x6f655820, 0x2952286e,
0x80000003, 0x55504320, 0x20202020, 0x20202020, 0x45202020,
0x80000004, 0x30333535, 0x20402020, 0x30342e32, 0x7a4847,
0x80000005, 0x0, 0x0, 0x0, 0x0,
0x80000006, 0x0, 0x0, 0x1006040, 0x0,
0x80000007, 0x0, 0x0, 0x0, 0x100,
0x80000008, 0x3028, 0x0, 0x0, 0x0,
cat /proc/cpuinfo– Zifre Jul 28 '09 at 13:48