From: Rudolf Marek <r.marek@assembler.cz>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] coretemp add more safety checks
Date: Thu, 10 May 2007 22:39:10 +0000 [thread overview]
Message-ID: <46439F0E.2080709@assembler.cz> (raw)
In-Reply-To: <4634A411.4030703@assembler.cz>
[-- Attachment #1: Type: text/plain, Size: 555 bytes --]
Hello
here comes updated patch, I added a check if certain Core2 are desktop or
mobile processors (using yet another not officially documented register - but it
should be ok ). They have same CPUID as desktop but are in fact mobile ;)
Everyone, please try the patch with core2 and core notebooks/desktops, I do not
have any chance to test it.
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
This patch adds detection of AE18 Errata of Core processor and warns
users that the absolute readings might be wrong for Core2 users.
Thanks,
Rudolf
[-- Attachment #2: disable-coretemp-on-buggy-cpus.patch --]
[-- Type: text/x-patch, Size: 1922 bytes --]
Index: linux-2.6.21/drivers/hwmon/coretemp.c
===================================================================
--- linux-2.6.21.orig/drivers/hwmon/coretemp.c 2007-05-09 10:39:04.672435313 +0200
+++ linux-2.6.21/drivers/hwmon/coretemp.c 2007-05-11 00:35:07.082920759 +0200
@@ -176,6 +176,22 @@
goto exit_free;
}
+ /* Check if we have problem with errata AE18 of Core processors:
+ Readings might stop update when processor visited too deep sleep,
+ fixed for stepping D0 (6EC).
+ */
+
+ if ((c->x86_model == 0xe) && (c->x86_mask < 0xc)) {
+ /* check for microcode update */
+ rdmsr_on_cpu(data->id, MSR_IA32_UCODE_REV, &eax, &edx);
+ if (edx < 0x39) {
+ dev_err(&pdev->dev,
+ "Errata AE18 not fixed, update BIOS or "
+ "microcode of the CPU!\n");
+ goto exit_free;
+ }
+ }
+
/* Some processors have Tjmax 85 following magic should detect it
Intel won't disclose the information without signed NDA, but
individuals cannot sign it. Catch(ed) 22.
@@ -193,6 +209,19 @@
}
}
+ /* Intel says that above should not work for desktop Core2 processors,
+ but it seems to work. There is no other way how get the absolute
+ readings. Warn the user about this. First check if are desktop,
+ bit 50 of MSR_IA32_PLATFORM_ID should be 0.
+ */
+
+ rdmsr_safe_on_cpu(data->id, MSR_IA32_PLATFORM_ID, &eax, &edx);
+
+ if ((c->x86_model == 0xf) && (!(edx & 0x00040000))) {
+ dev_warn(&pdev->dev, "Using undocumented features, absolute "
+ "temperature might be wrong!\n");
+ }
+
platform_set_drvdata(pdev, data);
if ((err = sysfs_create_group(&pdev->dev.kobj, &coretemp_group)))
@@ -328,9 +357,6 @@
int i, err = -ENODEV;
struct pdev_entry *p, *n;
- printk(KERN_NOTICE DRVNAME ": This driver uses undocumented features "
- "of Core CPU. Temperature might be wrong!\n");
-
/* quick check if we run Intel */
if (cpu_data[0].x86_vendor != X86_VENDOR_INTEL)
goto exit;
[-- Attachment #3: Type: text/plain, Size: 153 bytes --]
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2007-05-10 22:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-29 13:56 [lm-sensors] [PATCH] coretemp add more safety checks Rudolf Marek
2007-05-08 9:35 ` Jean Delvare
2007-05-10 22:39 ` Rudolf Marek [this message]
2007-05-13 11:51 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46439F0E.2080709@assembler.cz \
--to=r.marek@assembler.cz \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.