benilla-re systems structs docs

QueryCpuMaxMhz

function · core · host

Address
0x42c0e0 · 100 bytes, up to 0x42c143
Meaning
Stores the maximum MHz from CallNtPowerInformation times 10^6 in 0x884c70; returns 1 on success
Confidence
verified, proof one
Finding
core/time#processor-frequency

Finding: Processor frequency in core: time

OsGetCpuFrequency (0x42c060) returns the processor's frequency in hertz as a 64-bit integer. The first call runs QueryCpuMaxMhz (0x42c0e0); 0x42c0b0 keeps only whether it succeeded. On success the answer is MaxMhz of the first processor record, times 10⁶. Otherwise every call returns the largest counter rate the calibration has stored (0x884060), sleeping 500 ms while that is 0, without limit. The query fails when powrprof.dll will not load, CallNtPowerInformation is missing or the call returns a nonzero status. The output buffer is four 24-byte records. Per Microsoft's documentation (one record per logical processor, STATUS_BUFFER_TOO_SMALL for a short buffer), a host with more than four logical processors fails it and takes the fallback; that rests on the documentation, not the exe.

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.