-
jbk
.... and Intel's SDM actually does also define MSRs for some models for the TSC frequency as well... which gives the correct value for my home box...
-
jbk
i threw those together, but let me see how many of these from the SDM are in the lab
-
jbk
-
jbk
(might need to exclude VMs)
-
jbk
ahh.. so actually it was a rounding error because the host's tsc frequency was measured
-
jbk
at least the vmm kernel module on illumos actually emulates the MSR with the host's tsc frequency
-
jbk
(so when exact, the guest gets an exact value)
-
sommerfeld
jbk: you have Nehalem and Ivy/Sandy Bridge in there but not Westmere?
-
sommerfeld
added INTC_MODEL_WESTMERE* to the INTC_MODEL_NEHALEM* and came up with a number that matched the calibration..
-
jbk
ahh... the SDM is annoying in how it documents them...
-
jbk
I was looking at all the platforms that documented the MSR_PLATFORM_INFO msr
-
jbk
except westmere is 'we also do all these others in this other table'
-
jbk
but that does appear to be valid for them as well..
-
jbk
at least 0x1, 1e, 1f, 2e (need to look at x86_archext.h to see what those are)
-
sommerfeld
My understanding is that Westmere is more or less a process shrink of Nehalem so not surprising the docs are a little vaguer on it.
-
sommerfeld
oh, wait, off by a factor of 1000. Your program (with Westmere added) said "frequency = 2533270 MHz" (should be kHz); system calibration said 2533260631 Hz
-
Ellenor
terahertz!
-
jbk
oh grr..
-
jbk
let me update and fix...
-
jbk
(that was just to try to make it a bit easier to read)
-
jbk
sommerfeld: gist updated
-
jbk
i went through all the families and verified the 'see <other table>' and added all of those
-
jbk
(which really is i guess everything recent)
-
jbk
separate from this though, I'm wondering if the missing model #defines should be a separate ticket
-
jbk
(and if the names i used are correct or if there's better ones -- it feels like the model specifics can be a bit scattered in the docs)
-
sommerfeld
frequency = 2533270000 Hz (2.533 GHz)
-
jbk
does that sound correct for your CPU?
-
sommerfeld
that matches the PIT calibration on the Westmere.
-
jbk
ok
-
jbk
i guess i'll go ahead and create a ticket
-
jbk
though might to a little more discovery before I put up a PR
-
jbk
(trying that on various intel systems)
-
sommerfeld
(posted above: PIT calibratio was 2533260631 Hz which is within 3ppm of the nominal value).
-
sommerfeld
on the other hand, on the much newer i5-1235U, the MSRs say 2500000000 Hz while CPUID says 2496000000 Hz and HPET calibration says 2495993673 Hz
-
sommerfeld
which is more like 1600ppm error, well outside of what NTP can tolerate.
-
sommerfeld
so one datapoint says cpuid should be preferred to MSR.
-
jbk
given the CPUID based approach is newer (it also supports > 8 bits of precision), that seems reasonable...
-
jbk
i should probably have it output the family value
-
jbk
just to make it easier..
-
jbk
oh that's rather annoying
-
jbk
i had typed up everything for the issue, clicked create
-
jbk
and the AI spam checker popped up, and apparently ignored everthing, losing all of the text...
-
jbk
(I blame AI for needing that)
-
jbk
i guess i'll try later... need to do a few things outside before it rains
-
jbk
worked that time
-
jbk
and partial victory for my other stuff :)
-
jbk
also been quite a while since I've crimped RJ45..a bit rusty :P