Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Rajiv_N_
Beginner
347 Views

Voltage levels at different frequency levels on Sandy bridge processor

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.

0 Kudos
29 Replies
Rajiv_N_
Beginner
290 Views

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"

perfwise
Beginner
290 Views

Look in the System Programming guide provided by Intel.  

http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html

It says in table 35-11:

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].

perfwise

Bernard
Black Belt
290 Views

Did you consult "Software Development Manuals"?

Rajiv_N_
Beginner
290 Views

iliyapolak,

Yes, I did consult the SDM. I did not find them. Any help will be appreciated.

Rajiv_N_
Beginner
290 Views

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?

Bernard
Black Belt
290 Views

It seems that lower word of IA32_PERF_STATUS is controlling Intel Speed Step technology,but exact description is not given.

http://forum.osdev.org/viewtopic.php?f=15&t=26703

Rajiv_N_
Beginner
290 Views

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..

Bernard
Black Belt
290 Views

Yes I would like to see the exact description,but it is not available in SDM (table 35-12).It is interesting what lowest byte is supposed to set?

Rajiv_N_
Beginner
290 Views

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.

Bernard
Black Belt
290 Views

Usually if the description is absent the exact info is given as a NDA.

Rajiv_N_
Beginner
290 Views

perfwise

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.

GHui
Beginner
290 Views

How did you set global_ctrl and event_select?

Rajiv_N_
Beginner
290 Views

@GHui,

I'm not trying to set the values. I'm just trying to read them.

To set the values you need to do wrmsr <hex value> <new hex value>

Bernard
Black Belt
290 Views

>>>The table 7-1 ends at 1.52V for VCC.>>>

Can you tell me where in SDM I can find this table?

thanks

Patrick_F_Intel1
Employee
290 Views

Hello Rajiv,

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.

Pat

Patrick_F_Intel1
Employee
290 Views

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.

Pat

Bernard
Black Belt
290 Views

@Rajiv

Thank you.

Rajiv_N_
Beginner
290 Views

Hi Pat,

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.

Thanks.

Bernard
Black Belt
74 Views

Maybe you are seeing fluctuation of the voltage.

Reply