mq1n/Win11SysCheck

CPU clock speed check is wrong

ericwj opened this issue · 1 comments

PROCESSOR_POWER_INFORMATION.CurrentMhz is obviously wrong, because it depends on power management. The processor may have been throttled below 1GHz.

I don't think PROCESSOR_POWER_INFORMATION contains the correct processor speed at all. MaxMhz may be the number to check for, but without verifying that it actually is, it'd be better to parse the Processor Brand String from CPUID, e.g. "Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz".

The brand string can be obtained in ASCII by copying the 3*4*4 bytes in EAX..EDX obtained from CPUID.EAX[0x8000_0002..0x8000_0004] into a buffer. The brand string ends with MHz, GHz or THz and contains a number with a decimal dot before that.

mq1n commented

I'll convert CurrentMhz checks to MaxMhz.
Currently I don't get any misinformation report about processor speed, if it's not works correctly I will change check method with alternatives.