Community
cancel
Showing results for 
Search instead for 
Did you mean: 
postaquestion
Beginner
61 Views

Question - How to Determine Whether a Processor Supports HT

Is this a fair indicator of whether my processor supports HT or not?
I have a Pentium 4 processor 2.40 GHZ, 533 Mhz system bus, D845GV chipset.
CPUID and ht check utility says that HT is not supported. BIOS doesnt list HT output of a cpuid programwritten as per this page (output with eax set to zero before calling cpuid instruction)
eax set to zero: eax 00000005 ebx 756e6547 ecx 6c65746e edx 49656e69
ebx chars G e n u
ecx chars n t e l
edx chars i n e I
(output with eax set to one before calling cpuid instruction)
eax set to one: eax 00000f34 ebx 00010800 ecx 0000441d edx bfebfbff
It's surprising that HT is supported as per the details in this page: How to Determine Whether a Processor Supports Hyper-Threading Technology
0 Kudos
4 Replies
ClayB
Black Belt
61 Views

I assume that you're running Linux since a quick check of the Windows Task Manager would show if the OS thinks you have more than one logical processor.

I'm not sure what you meant in the first part that says CPUID tells you that there is no HT. Is this a specific app? The cpuid instruction, with EAX set to 1, does look to confirm that there is HT on the system (28th bit, low bit of leading 'b', is set).

I would be more trusting of the code found in the paper you cite and the results that it generates. The BIOS you are using may not support HT, so you don't see it. If that is the case, it really doesn't matter if you have HT or not since it wouldn't be accessible by the OS (even though it appears to be built into the processor). Another idea could be that the processor has the HT facility, but that it is turned off in the chip hardware. I know there were processors released that way, but I have no idea about how they would show up under the cpuid command probing.

Someone with more experience might have better information than me.

--clay

TimP
Black Belt
61 Views

Expanding on what Clay said about BIOS support:
If your machine supports HT, but it is turned off in your BIOS setup screens, the cpuid bit will show HT support, but it will not be available to the OS until you enable HT in the BIOS configuration.
The OS also would have to be booted up with the number of CPUs set high enough to account for the full number of logical processors. This would be the default, but someone could have added the flag to set it to the number of physical processors.
snm
Beginner
61 Views

The processor spec is SL88F. As per http://processorfinder.intel.com/Details.aspx?sSpec=SL88F hyper-threading shouldnt be supported.
If my processor shouldnt support Hyper-threading, then why would the CPUID instruction output indicate that Hyper-threading is supported ? My BIOS might not support Hyper-threading and i could try a BIOS upgrade. But im not sure that it would be of any help.
I assume that my program works, it uses gcc inline assembly. Below is the program. Its similar to the one in the site, but with inline assembly

#include

#define HT_BIT 0x10000000
#define EXT_FAMILY_ID 0x0f00000
#define FAMILY_ID 0x0f00

int main()
{
unsigned int ax, bx, cx, dx;
unsigned char *a, *b, *c, *d;

ax = 0;
asm("cpuid"
: "=a" (ax),
"=b" (bx),
"=c" (cx),
"=d" (dx)
: "a" (ax));

a = (unsigned char *)(&ax);
b = (unsigned char *)(&bx);
c = (unsigned char *)(&cx);
d = (unsigned char *)(&dx);

printf ("cpuid instruction output with eax set to zero: eax %08x ebx %08x ecx %08x edx %08x ", ax, bx, cx, dx);

printf ("b chars %c %c %c %c ", b[0], b[1], b[2], b[3]);
printf ("c chars %c %c %c %c ", c[0], c[1], c[2], c[3]);
printf ("d chars %c %c %c %c ", d[0], d[1], d[2], d[3]);

ax = 1;
asm("cpuid"
: "=a" (ax),
"=b" (bx),
"=c" (cx),
"=d" (dx)
: "a" (ax));

printf ("cpuid instruction output with eax set to one: eax %08x ebx %08x ecx %08x edx %08x ", ax, bx, cx, dx);
if (dx & HT_BIT)
{
printf ("HT supported ");
}
else
{
printf ("HT not supported ");
}


return 0;
}

Best Regards,
Shivram U
xraygenfit
Beginner
61 Views

The easiest thing to do is omp_get_num_procs(). This will return the number of logical processors.
Reply