mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-02-25 18:55:23 -06:00
Solve an issue with Core 2 Duo/Quad and same gen CPUs, where HTT flag is enabled in CPUID while the CPU does not support SMT. (#125 #129)
Now compare the number of physical core with the number of reserved APIC to check if SMT is really available or not
This commit is contained in:
parent
53f61e6b87
commit
cf156adc4a
@ -215,7 +215,11 @@ void cpuid_init(void)
|
||||
cpuid_info.topology.thread_count = cpuid_info.topology.core_count;
|
||||
|
||||
if (cpuid_info.flags.htt){
|
||||
cpuid_info.topology.thread_count *= 2;
|
||||
if (((cpuid_info.proc_info.raw >> 16) & 0xFF) > (uint32_t)cpuid_info.topology.core_count) {
|
||||
cpuid_info.topology.thread_count *= 2;
|
||||
} else {
|
||||
cpuid_info.flags.htt = !cpuid_info.flags.htt;
|
||||
}
|
||||
}
|
||||
} else if (cpuid_info.max_cpuid >= 0x2) {
|
||||
if(cpuid_info.flags.htt){
|
||||
|
Loading…
Reference in New Issue
Block a user