I'm trying to gather some data from the MSR registers about the voltage levels at various frequency levels. I see that the MSR register: IA32_PERF_STATUS output both the current frequency and operating voltage. But the last two hexadecimal bits give the Voltage ID.
sudo modprobe msr
sudo rdmsr -d --bitfield 15:0 0x198
On one of the forums, I see that for Core2Duo you need to substitute in the following linear equation to obtain the Votlage level at a given Frequency level.
0.7125V + VID*0.0125V
and I'm using a Sandy bridge processor. Could you please direct me to a place where I can find the linear equation or help me build it.
Any help will be appreciated.
Plus, When I read the MSR register - the last 2 bits are always 0. Why would that case occur?
My grub looks like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=disable"
Look in the System Programming guide provided by Intel.
MSR_PERF_STATUS[47:32] * (float) 1/(2^13). (typo in my version says bits [37:32] but I am sure it's [47:32].
Yes, I did look at the SDM's. The SDMs provide us with the MSR registers, the bits that represent voltage and the corresponding voltage for the 2 least significant bits.
However, On my sandy bridge processor the last two bits are always zero. Is there anyway out of it?
Ok. But do you see any place where the voltage levels at a given frequency level are given?
I don't think they are available in the SDM.
The Table 35-12. MSRs Supported by Intel® Processors based on Intel® microarchitecture code name Sandy Bridge (Contd.) in
Intel® 64 and IA-32 Architectures Software Developer’s Manual Combined Volumes: 1, 2A, 2B, 2C, 3A, 3B and 3C
Gives some information..
It'd be great if one of the intel personal sheds some light. since we are not able to figure it out.
The table 35-12 only tells us about the MSR registers and which bits to access for frequency and voltage levels.
Thank you for that. I figured that as well from the SDM. But how are you sure about the bit changes from 37 to 47?
And, Which bits represent the voltage? which ones represent the frequency? it is 4 digit hexadecimal value.
Moreover, does it represent the VDD or the VCC?
The table 7-1 ends at 1.52V for VCC.
As perfwise pointed out, the voltage ID for sandbridge is bits 32-47 of MSR IA32_PERF_STATUS (sometimes called MSR_PERF_STATUS).
And perfwise's formula (voltage = VID/(2^13) = VID/8192) is also correct. This is documented in one of the sandybridge specification update docs page 25: http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-famil...
However, the spec update also lists an erratum (HSD31) for the reported voltage id where it can be half of the expected value. The erratum says there may be a workaround in the bios and it says that the C-0 stepping of the processors for this spec update are affected. Unfortunately, the doc doesn't say which stepping number corresponds to stepping C-0. So I can't tell if you a hitting the erratum nor if there is a workaround in your bios.
I think you asked if the VID pertains to VCC. Yes. This is stated in the desktop data sheet vol 1 page 89. See the datasheets at http://www.intel.com/content/www/us/en/processors/core/CoreTechnicalResources.html .
I find the docs for a particular processor by going to ark.intel.com, select 'products by code name' at the left, lookup sandybridge, find your specific processor in the list, then click 'download datasheet' on the right. You may get a list of datasheets.... and you have to pick the right one.
Or you can just just google something like 'intel i5-2540m' and click on the ark.intel.com link.
Hope this helps.
Also, you might try looking into the linux kernel source code or the power-governor (cpu-freq?) source code.
I assume they have to deal with voltage id and that source might indicate how to decode values or workaround difficulties.
Thank you for your reply. But what is the unit of power there? mV or V or MV?
One more issue is that the voltage doesn't stay constant.. it varies based on the stress on different components of the processor. I thought it is constant irrespective of the stress for a given frequency level, isn't it?
Hope you can clear this one doubt.