Skip to contentSkip to conversation

Support for Family 10h CPUs - Not all sensors are

lm-sensors Jan Bessai 4 participants 7 messages Nov 21, 2009 – Nov 23, 2009

lore
Share & tools
lore

Jan Bessai

author
#0 lore raw

Hi,

according to AMD (
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/41322.pdf
) not all AMD K10 CPUs have defect sensors. In fact only DR-* revisions are affected. All CPUs with Socket AM3 as well as all Phenom II Processors and some Opterons are unaffected (DA-*, RB-*, HY-*).
Please reconsider the statement "Embedded sensors are known to be unreliable, and won't be supported ever.". Linux should not lack temperature sensor support for such popular Processors.

Kind regards,

Jan

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#1 lore raw
Quoted 7 lines · Jan Bessai

according to AMD (
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/41322.pdf
) not all AMD K10 CPUs have defect sensors. In fact only DR-* revisions are affected. All CPUs with Socket AM3 as well as all Phenom II Processors and some Opterons are unaffected (DA-*, RB-*, HY-*).
Please reconsider the statement "Embedded sensors are known to be unreliable, and won't be supported ever.".

We can do that. But how does this translate into CPUID numbers? That's all we can check.

Quoted 2 lines

Linux should not lack temperature sensor support for such popular Processors.

This is a pointless statement, I hope you realize it. There are a lot of things that should not be, but are still, for various reasons. Want an example? A big company such as AMD shouldn't have released millions of CPUs with broken thermal sensors. As it stands, we do what we can to cope with their mistake.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Jan Bessai
Quoted 9 lines · Jean Delvare
Quoted 3 lines

Linux should not lack temperature sensor support for such popular Processors.

This is a pointless statement, I hope you realize it. There are a lot of things that should not be, but are still, for various reasons. Want an example? A big company such as AMD shouldn't have released millions of CPUs with broken thermal sensors. As it stands, we do what we can to cope with their mistake.

Pardon, this was meant to be an argument for adding the drivers - without any critical intention. I appreciate your work, I see that it was AMD who released broken products and I just wanted to give a reason for not dropping support for the complete k10 cpu family.

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#3 lore raw
In reply to Jan Bessai
Quoted 10 lines · Jean Delvare
Quoted 7 lines · Jan Bessai

according to AMD (
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/41322.pdf
) not all AMD K10 CPUs have defect sensors. In fact only DR-* revisions are affected. All CPUs with Socket AM3 as well as all Phenom II Processors and some Opterons are unaffected (DA-*, RB-*, HY-*).
Please reconsider the statement "Embedded sensors are known to be unreliable, and won't be supported ever.".

We can do that. But how does this translate into CPUID numbers?

Family 0xF, extended family 1, model 2.

Or, to quote a certain driver that happend to be posted on this list recently:

static bool __devinit has_erratum_319(void)

{
	/*
	 * Erratum 319: The thermal sensor of older Family 10h processors
	 *              (B steppings) may be unreliable.
	 */
	return boot_cpu_data.x86 = 0x10 && boot_cpu_data.x86_model <= 2;
}

HTH
Clemens

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#4 lore raw
In reply to Jan Bessai
Quoted 17 lines · Clemens Ladisch
Quoted 10 lines · Jean Delvare
Quoted 7 lines · Jan Bessai

according to AMD (
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/41322.pdf
) not all AMD K10 CPUs have defect sensors. In fact only DR-* revisions are affected. All CPUs with Socket AM3 as well as all Phenom II Processors and some Opterons are unaffected (DA-*, RB-*, HY-*).
Please reconsider the statement "Embedded sensors are known to be unreliable, and won't be supported ever.".

We can do that. But how does this translate into CPUID numbers?

Family 0xF, extended family 1, model 2.

Or, to quote a certain driver that happend to be posted on this list recently:

Quoted 8 lines

static bool __devinit has_erratum_319(void)

{
	/*
	 * Erratum 319: The thermal sensor of older Family 10h processors
	 *              (B steppings) may be unreliable.
	 */
	return boot_cpu_data.x86 = 0x10 && boot_cpu_data.x86_model <= 2;
}

OK, this would lead to the following patch for sensors-detect. Can you please test it?

Index: CHANGES
=================================--- CHANGES (révision 5799)
+++ CHANGES (copie de travail)
@@ -25,7 +25,7 @@
The SMSC LPC47M233 isn't currently supported Support upcoming sysfs path to i2c adapters Rename the modprobe configuration file to lm_sensors.conf
- Drop AMD K10 detection (unreliable sensors)
+ Only report AMD Family 10h CPU with model > 2
Add detection for AMD Family 11h thermal sensors Add detection for Intel Atom thermal sensors Add detection for National Semiconductor LM73
Index: prog/detect/sensors-detect
=================================--- prog/detect/sensors-detect (révision 5799)
+++ prog/detect/sensors-detect (copie de travail)
@@ -1878,6 +1878,10 @@
driver => "k8temp",
detect => \&k8temp_pci_detect,
}, {
+ name => "AMD Family 10h thermal sensors",
+ driver => "to-be-written",
+ detect => \&fam10h_pci_detect,
+ }, {
name => "AMD Family 11h thermal sensors",
driver => "to-be-written",
detect => \&fam11h_pci_detect,
@@ -5334,6 +5338,25 @@
return 9;
}

+sub fam10h_pci_detect
+{
+ return unless exists $pci_list{'1022:1203'};
+
+ # Errata 319 (Inaccurate Temperature Measurement) affects
+ # revisions DR-BA, DR-B2 and DR-B3, all have model number = 2.
+ # So we only pick CPU with model number > 2.
+ my $probecpu;
+ foreach $probecpu (@cpu) {
+ if ($probecpu->{vendor_id} eq 'AuthenticAMC' &&
+ $probecpu->{'cpu family'} = 0x10 &&
+ $probecpu->{model} > 2) {
+ return 9;
+ }
+ }
+
+ return;
+}
+
sub fam11h_pci_detect
{
return unless exists $pci_list{'1022:1303'};

I have also updated wiki/Devices.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#5 lore raw
In reply to Jan Bessai

Review

Quoted 1 line · Jean Delvare
(quoted diff) +1 -0
+		if ($probecpu->{vendor_id} eq 'AuthenticAMC' &&

+ if ($probecpu->{vendor_id} eq 'AuthenticAMD' &&

Signature · 6 lines
Clemens

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#6 lore raw
In reply to Jan Bessai
Quoted 4 lines · Clemens Ladisch

Review

Quoted 1 line · Jean Delvare
(quoted diff) +1 -0
+		if ($probecpu->{vendor_id} eq 'AuthenticAMC' &&

+ if ($probecpu->{vendor_id} eq 'AuthenticAMD' &&

Oops, thanks. Fixed and committed.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors