1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-12-16 16:35:45 +00:00

Fix issue with HyperThreading status in old cpus

Early P4 processors come with the HT flag, but that feature
is not enabled.

This makes it work the way it should.
This commit is contained in:
wdlkmpx 2016-04-24 17:28:16 +00:00
parent fa9640b3a2
commit f26c1151f0
3 changed files with 7 additions and 5 deletions

View file

@ -612,7 +612,9 @@ static void decode_intel_number_of_cores(struct cpu_raw_data_t* raw,
data->num_logical_cpus = logical_cpus; data->num_logical_cpus = logical_cpus;
} else { } else {
data->num_cores = 1; data->num_cores = 1;
data->num_logical_cpus = (logical_cpus >= 2 ? logical_cpus : 2); data->num_logical_cpus = (logical_cpus >= 1 ? logical_cpus : 1);
if (data->num_logical_cpus == 1)
data->flags[CPU_FEATURE_HT] = 0;
} }
} else { } else {
data->num_cores = data->num_logical_cpus = 1; data->num_cores = data->num_logical_cpus = 1;

View file

@ -73,7 +73,7 @@ intel_fn4[3]=00000000 00000000 00000000 00000000
15 15
3 3
1 1
2 1
16 16
-1 -1
256 256
@ -86,4 +86,4 @@ intel_fn4[3]=00000000 00000000 00000000 00000000
-1 -1
64 (non-authoritative) 64 (non-authoritative)
P-4 Celeron D (Prescott-256) P-4 Celeron D (Prescott-256)
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni dts64 monitor ds_cpl cid xtpr fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm pbe pni dts64 monitor ds_cpl cid xtpr

View file

@ -73,7 +73,7 @@ intel_fn4[3]=665b5101 00000000 00000000 007b7040
15 15
2 2
1 1
2 1
8 8
12 12
512 512
@ -86,4 +86,4 @@ intel_fn4[3]=665b5101 00000000 00000000 007b7040
-1 -1
64 (non-authoritative) 64 (non-authoritative)
Mobile P-4 (Northwood) Mobile P-4 (Northwood)
fpu vme de pse tsc msr pae mce cx8 mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr fpu vme de pse tsc msr pae mce cx8 mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm pbe cid xtpr