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:
parent
fa9640b3a2
commit
f26c1151f0
3 changed files with 7 additions and 5 deletions
|
@ -612,7 +612,9 @@ static void decode_intel_number_of_cores(struct cpu_raw_data_t* raw,
|
|||
data->num_logical_cpus = logical_cpus;
|
||||
} else {
|
||||
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 {
|
||||
data->num_cores = data->num_logical_cpus = 1;
|
||||
|
|
|
@ -73,7 +73,7 @@ intel_fn4[3]=00000000 00000000 00000000 00000000
|
|||
15
|
||||
3
|
||||
1
|
||||
2
|
||||
1
|
||||
16
|
||||
-1
|
||||
256
|
||||
|
@ -86,4 +86,4 @@ intel_fn4[3]=00000000 00000000 00000000 00000000
|
|||
-1
|
||||
64 (non-authoritative)
|
||||
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
|
||||
|
|
|
@ -73,7 +73,7 @@ intel_fn4[3]=665b5101 00000000 00000000 007b7040
|
|||
15
|
||||
2
|
||||
1
|
||||
2
|
||||
1
|
||||
8
|
||||
12
|
||||
512
|
||||
|
@ -86,4 +86,4 @@ intel_fn4[3]=665b5101 00000000 00000000 007b7040
|
|||
-1
|
||||
64 (non-authoritative)
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue