dd86k / ddcpuid

🔬 dd's x86 CPU Identification tool
MIT License
36 stars 1 forks source link

Implement current frequency readings #8

Closed dd86k closed 3 years ago

dd86k commented 7 years ago

This is possible with the RDTSC instruction. There's an example set in AP-485.pdf (Intel® Processor Identification and the CPUID Instruction, May 2002).

The idea is to calculate the delta between two time-stamps like so:

Actual frequency = (Ending TSC value – Beginning TSC value) / reference period

However, I have no idea who to actually do this in D ASM. Most deltas I got was 21, and with a reference period of 100 would get me 2100 (MHz), but my processor runs at a supposed 1600 MHz at idle, 3400 MHz as its base clock and up to 3900 MHz with the turbo boost.

So we'll see.

dd86k commented 5 years ago

Should take multiple samples at best

dd86k commented 3 years ago

Closing as this deviates from the simple purpose of this framework.