Skip to contentSkip to conversation

New VID codes for Intel Core and Conroe

PATCH New Rudolf Marek 3 participants 11 messages May 27, 2006 – Jun 11, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 New VID codes for Intel Core and Conroe

Hello Yuan,

I have finally put the patch together. It was a bit tricky without Conroe datasheet ;) I added the mobile Core processor support too. Please can you give a try and see if it reports meaningful results which should be round 1.2V for Conroe?

Thanks goes to Rene Pavlik for the formula verfication.

Regards
Rudolf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vid_core.patch
Type: text/x-patch
Size: 2683 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060527/257c13cd/vid_core.bin

#1 lore raw

PATCH 1/1 New VID codes for Intel Core and Conroe

Hi Rudolf,

drivers/hwmon/hwmon-vid.c

Quoted 7 lines
drivers/hwmon/hwmon-vid.c +1 -2
(...)
 /* vrm is the VRM/VRD document version multiplied by 10.
-   val is the 4-, 5- or 6-bit VID code.
-   Returned value is in mV to avoid floating point in the kernel. */
+   val is the 4-, 5-, 6- or 7-bit VID code.

Maybe this is time to go with "4 or more". I'm pretty certain we will see 8-bit VID codes in the future.

drivers/hwmon/hwmon-vid.c

Quoted 2 lines
drivers/hwmon/hwmon-vid.c +2 -0
+   Returned value is in mV to avoid floating point in the kernel. 
+   Some VID have some bits in uV scale, this is rounded to mV */

This was the case of VRD 10 already, and for this one we do truncate, not round. We need to be consistent here, either round all, or truncate all.

drivers/hwmon/hwmon-vid.c int vid_from_reg(int val, u8 vrm) · line 97

Quoted 12 lines

int vid_from_reg(int val, u8 vrm)
{

drivers/hwmon/hwmon-vid.c +4 -1
 	int vid;
@@ -80,7 +91,10 @@ int vid_from_reg(int val, u8 vrm)
 			vid -= 125;
 		vid /= 10;      /* only return 3 dec. places for now */
 		return vid;
-
+	case 110:		/* Intel Conroe */
+				/* compute in uV, round to mV */
+		return((val & 0x7e) ? (1600500 - ((val & 0x7f) - 2) * 6250)
+				      / 1000 : 0);

If we go for rounding, please separate the +500 offset from the base voltage value, so as to make it clear it is there for rounding purposes.

drivers/hwmon/hwmon-vid.c int vid_from_reg(int val, u8 vrm) · line 125

Quoted 10 lines
drivers/hwmon/hwmon-vid.c +3 -0
 	case 24:                /* Opteron processor */
 		return(val = 0x1f ? 0 : 1550 - val * 25);
 
@@ -106,6 +120,9 @@ int vid_from_reg(int val, u8 vrm)
 				    1750 - val * 50);
 	case 13:
 		return(1708 - (val & 0x3f) * 16);
+	case 14:		/* Intel Core */
+				/* compute in uV, round to mV */
+		return((1500500 - (val & 0x7f) * 12500) / 1000);

Same here. Additionally, values above 0x77 should be filtered out somehow, as they seem to be invalid (they would result in 0 or nevative Vcore.)

Signature · 1 line
Jean Delvare
#2 lore raw

PATCH 1/1 New VID codes for Intel Core and Conroe

In reply to Rudolf Marek
Quoted 6 lines · Rudolf Marek

I have finally put the patch together. It was a bit tricky without Conroe datasheet ;) I added the mobile Core processor support too. Please can you give a try and see if it reports meaningful results which should be round
1.2V for Conroe?

I tried ;)
vrm:110
cpu0_vid:1513
cpu1_vid:1225

Best Regards
Yuan Mu

=============================================The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Winbond is strictly prohibited; and any information in this email irrelevant to the official business of Winbond shall be deemed as neither given nor endorsed by Winbond. -------------- next part --------------
A non-text attachment was scrubbed...
Name: ymu.vcf
Type: text/x-vcard
Size: 56 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060530/c23fa2a5/ymu.vcf

#3 lore raw

PATCH 1/1 New VID codes for Intel Core and Conroe

In reply to Rudolf Marek

Hello,

Quoted 5 lines

I tried ;)
vrm:110
cpu0_vid:1513
cpu1_vid:1225

The second one looks good. The first one is in fact 001111 which is a bit suspicious value. Please can you check the driver/raw bits reading?

Thanks,

Regards
Rudolf

#4 lore raw

PATCH 1/1 New VID codes for Intel Core and Conroe

In reply to Rudolf Marek

Hi Rudolf,

Quoted 10 lines
Quoted 6 lines

I tried ;)
vrm:110
cpu0_vid:1513
cpu1_vid:1225

The second one looks good. The first one is in fact 001111 which is a bit suspicious value. Please can you check the driver/raw bits reading?

VID0REG: 0x10
VID1REG: 0xbf

cpu0_vid:1513
cpu1_vid:1219

in0_input:1182
in1_input:1188

Best Regards
Yuan Mu

=============================================The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Winbond is strictly prohibited; and any information in this email irrelevant to the official business of Winbond shall be deemed as neither given nor endorsed by Winbond. -------------- next part --------------
A non-text attachment was scrubbed...
Name: ymu.vcf
Type: text/x-vcard
Size: 56 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060531/6dbe9cc0/ymu.vcf

#5 lore raw

PATCH 1/1 New VID codes for Intel Core and Conroe

In reply to Rudolf Marek

Hello

Jean, thanks for the review. Here comes updated patch. I hope that it is OK.

This patch adds support for two new VID codes, supporting Intel mobile Core processors and new Conroe based platforms.

regards
Rudolf
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vid_upd
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060604/8906ff3c/attachment.pl

#6 lore raw

PATCH 1/1 New VID codes for Intel Core and Conroe

In reply to Rudolf Marek

Hi Rudolf,

Quoted 4 lines

Jean, thanks for the review. Here comes updated patch. I hope that it is OK.

This patch adds support for two new VID codes, supporting Intel mobile Core processors and new Conroe based platforms.

Applied, thanks. No signed-off-by line?

Signature · 1 line
Jean Delvare
#7 lore raw

PATCH 1/1 New VID codes for Intel Core and Conroe

In reply to Rudolf Marek

Hi Rudolf,

Quoted 4 lines
Quoted 4 lines

Jean, thanks for the review. Here comes updated patch. I hope that it is OK.

This patch adds support for two new VID codes, supporting Intel mobile Core processors and new Conroe based platforms.

It seems that the official VRD 11.0 documentation is now available from Intel:
http://www.intel.com/design/processor/applnots/313214.htm

It includes an "Extended VRD 10.0" VID table. I seem to understand that the CPUs may alternatively use this table or the VRD 11.0 table you added support for. I don't really understand what would make a CPU use one rather than the other though. Can you please investigate? Then your patch might need some more work. At least it would be nice to point to the official location for the VRD 11.0 table.

Thanks,

Signature · 1 line
Jean Delvare
#8 lore raw

PATCH 1/1 New VID codes for Intel Core and Conroe

In reply to Rudolf Marek

Hi Jean,

Quoted 7 lines

It includes an "Extended VRD 10.0" VID table. I seem to understand that the CPUs may alternatively use this table or the VRD 11.0 table you added support for. I don't really understand what would make a CPU use one rather than the other though. Can you please investigate? Then your patch might need some more work. At least it would be nice to point to the official location for the VRD 11.0 table.

Ok I have investigated. It took me one hour to figure it all out.

the VID_SELECT pin is for motherboard that has LGA775 and wants to support old and new CPUs. Intel introduced the bit already for older Celeron D
http://www.intel.com/design/celeron/datashts/304092.htm

Page 69 clarifies it all.

They already reserved enough bits for VID, using just 5 of them.

With the VID_SEL bit they will just do what we do in software to detect the VRM version. So => we dont care about this bit.

As for the Extended VRD 10.0:

it just adds one more bit do be able to fine grain the 5bit VID. And because my patch already rounds it we should not care about this too.

All in all we dont need to do anything special unless we switch to uV as return value.

I will resend the patch in the moment with updated VRM11 stuff.

Regards
Rudolf

#9 lore raw

PATCH 1/1 New VID codes for Intel Core and Conroe

In reply to Rudolf Marek

Hello

This patch adds support for two new VID codes, supporting Intel mobile Core processors and new Conroe based platforms.

Signed-off-by Rudolf Marek <r.marek at sh.cvut.cz>

This one has fixed VRM11 url and also it seems Intel extended it to 8 bits.

Regards
Rudolf
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: upd_vid2
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060609/8e8e375e/attachment.pl

#10 lore raw

PATCH 1/1 New VID codes for Intel Core and Conroe

In reply to Rudolf Marek

Hi Rudolf,

Quoted 6 lines

This patch adds support for two new VID codes, supporting Intel mobile Core processors and new Conroe based platforms.

Signed-off-by Rudolf Marek <r.marek at sh.cvut.cz>

This one has fixed VRM11 url and also it seems Intel extended it to 8 bits.

Thanks for this update, I've replaced the old version with this one in my stack.

Thanks for the clarification with regards to extended VRD 10 too.

Signature · 1 line
Jean Delvare