Revision: 5569
Author: pebender
Date: Mon Sep 28 17:58:54 2009
Log: - Added CPU temp monitoring for the Intel Atom CPU.


http://code.google.com/p/minimyth/source/detail?r=5569

Added:
   
/trunk/gar-minimyth/script/kernel-2.6.30/linux/files/linux-2.6.30.8-intel_atom.patch
   
/trunk/gar-minimyth/script/kernel-2.6.31/linux/files/linux-2.6.31.1-intel_atom.patch
Modified:
  /trunk/gar-minimyth/html/minimyth/document-changelog.txt
  /trunk/gar-minimyth/script/kernel-2.6.30/linux/Makefile
  /trunk/gar-minimyth/script/kernel-2.6.30/linux/checksums
  /trunk/gar-minimyth/script/kernel-2.6.31/linux/Makefile
  /trunk/gar-minimyth/script/kernel-2.6.31/linux/checksums
   
/trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/hardware.d/cpu2kernel.map

=======================================
--- /dev/null
+++  
/trunk/gar-minimyth/script/kernel-2.6.30/linux/files/linux-2.6.30.8-intel_atom.patch
     
Mon Sep 28 17:58:54 2009
@@ -0,0 +1,116 @@
+diff -Naur linux-2.6.30.8-old/Documentation/hwmon/coretemp  
linux-2.6.30.8-new/Documentation/hwmon/coretemp
+--- linux-2.6.30.8-old/Documentation/hwmon/coretemp    2009-09-24  
08:28:02.000000000 -0700
++++ linux-2.6.30.8-new/Documentation/hwmon/coretemp    2009-09-28  
17:24:38.000000000 -0700
+@@ -4,7 +4,7 @@
+ Supported chips:
+   * All Intel Core family
+     Prefix: 'coretemp'
+-    CPUID: family 0x6, models 0xe, 0xf, 0x16, 0x17
++    CPUID: family 0x6, models 0xe, 0xf, 0x16, 0x17, 0x1c (Atom)
+     Datasheet: Intel 64 and IA-32 Architectures Software Developer's  
Manual
+                Volume 3A: System Programming Guide
+                http://softwarecommunity.intel.com/Wiki/Mobility/720.htm
+diff -Naur linux-2.6.30.8-old/drivers/hwmon/coretemp.c  
linux-2.6.30.8-new/drivers/hwmon/coretemp.c
+--- linux-2.6.30.8-old/drivers/hwmon/coretemp.c        2009-09-24  
08:28:02.000000000 -0700
++++ linux-2.6.30.8-new/drivers/hwmon/coretemp.c        2009-09-28  
17:28:10.000000000 -0700
+@@ -157,17 +157,24 @@
+       /* The 100C is default for both mobile and non mobile CPUs */
+
+       int tjmax = 100000;
+-      int ismobile = 1;
++      int usemsr_ee = 1;
+       int err;
+       u32 eax, edx;
+
+       /* Early chips have no MSR for TjMax */
+
+       if ((c->x86_model == 0xf) && (c->x86_mask < 4)) {
+-              ismobile = 0;
++              usemsr_ee = 0;
+       }
+
+-      if ((c->x86_model > 0xe) && (ismobile)) {
++      /* Atoms seems to have TjMax at 90C */
++
++      if (c->x86_model == 0x1c) {
++              usemsr_ee = 0;
++              tjmax = 90000;
++      }
++
++      if ((c->x86_model > 0xe) && (usemsr_ee)) {
+
+               /* Now we can detect the mobile CPU using Intel provided table
+                  http://softwarecommunity.intel.com/Wiki/Mobility/720.htm
+@@ -179,13 +186,13 @@
+                       dev_warn(dev,
+                                "Unable to access MSR 0x17, assuming desktop"
+                                " CPU\n");
+-                      ismobile = 0;
++                      usemsr_ee = 0;
+               } else if (!(eax & 0x10000000)) {
+-                      ismobile = 0;
++                      usemsr_ee = 0;
+               }
+       }
+
+-      if (ismobile) {
++      if (usemsr_ee) {
+
+               err = rdmsr_safe_on_cpu(id, 0xee, &eax, &edx);
+               if (err) {
+@@ -195,7 +202,9 @@
+               } else if (eax & 0x40000000) {
+                       tjmax = 85000;
+               }
+-      } else {
++      /* if we dont use msr EE it means we are desktop CPU (with exeception
++         of Atom) */
++      } else if (tjmax == 100000) {
+               dev_warn(dev, "Using relative temperature scale!\n");
+       }
+
+@@ -248,9 +257,9 @@
+       platform_set_drvdata(pdev, data);
+
+       /* read the still undocumented IA32_TEMPERATURE_TARGET it exists
+-         on older CPUs but not in this register */
++         on older CPUs but not in this register, Atoms don't have it either */
+
+-      if (c->x86_model > 0xe) {
++      if ((c->x86_model > 0xe) && (c->x86_model != 0x1c)) {
+               err = rdmsr_safe_on_cpu(data->id, 0x1a2, &eax, &edx);
+               if (err) {
+                       dev_warn(&pdev->dev, "Unable to read"
+@@ -413,11 +422,11 @@
+       for_each_online_cpu(i) {
+               struct cpuinfo_x86 *c = &cpu_data(i);
+
+-              /* check if family 6, models 0xe, 0xf, 0x16, 0x17, 0x1A */
++              /* check if family 6, models 0xe, 0xf, 0x16, 0x17, 0x1A, 0x1c */
+               if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
+                   !((c->x86_model == 0xe) || (c->x86_model == 0xf) ||
+                       (c->x86_model == 0x16) || (c->x86_model == 0x17) ||
+-                      (c->x86_model == 0x1A))) {
++                      (c->x86_model == 0x1A) || (c->x86_model == 0x1c))) {
+
+                       /* supported CPU not found, but report the unknown
+                          family 6 CPU */
+diff -Naur linux-2.6.30.8-old/drivers/hwmon/Kconfig  
linux-2.6.30.8-new/drivers/hwmon/Kconfig
+--- linux-2.6.30.8-old/drivers/hwmon/Kconfig   2009-09-24 08:28:02.000000000  
-0700
++++ linux-2.6.30.8-new/drivers/hwmon/Kconfig   2009-09-28 17:24:38.000000000  
-0700
+@@ -402,12 +402,12 @@
+         will be called gl520sm.
+
+ config SENSORS_CORETEMP
+-      tristate "Intel Core (2) Duo/Solo temperature sensor"
++      tristate "Intel Core/Core2/Atom temperature sensor"
+       depends on X86 && EXPERIMENTAL
+       help
+         If you say yes here you get support for the temperature
+-        sensor inside your CPU. Supported all are all known variants
+-        of Intel Core family.
++        sensor inside your CPU. Most of the family 6 CPUs
++        are supported. Check documentation/driver for details.
+
+ config SENSORS_IBMAEM
+       tristate "IBM Active Energy Manager temperature/power sensors and  
control"
=======================================
--- /dev/null
+++  
/trunk/gar-minimyth/script/kernel-2.6.31/linux/files/linux-2.6.31.1-intel_atom.patch
     
Mon Sep 28 17:58:54 2009
@@ -0,0 +1,116 @@
+diff -Naur linux-2.6.31.1-old/Documentation/hwmon/coretemp  
linux-2.6.31.1-new/Documentation/hwmon/coretemp
+--- linux-2.6.31.1-old/Documentation/hwmon/coretemp    2009-09-24  
08:45:25.000000000 -0700
++++ linux-2.6.31.1-new/Documentation/hwmon/coretemp    2009-09-28  
17:32:46.000000000 -0700
+@@ -4,7 +4,7 @@
+ Supported chips:
+   * All Intel Core family
+     Prefix: 'coretemp'
+-    CPUID: family 0x6, models 0xe, 0xf, 0x16, 0x17
++    CPUID: family 0x6, models 0xe, 0xf, 0x16, 0x17, 0x1c (Atom)
+     Datasheet: Intel 64 and IA-32 Architectures Software Developer's  
Manual
+                Volume 3A: System Programming Guide
+                http://softwarecommunity.intel.com/Wiki/Mobility/720.htm
+diff -Naur linux-2.6.31.1-old/drivers/hwmon/coretemp.c  
linux-2.6.31.1-new/drivers/hwmon/coretemp.c
+--- linux-2.6.31.1-old/drivers/hwmon/coretemp.c        2009-09-24  
08:45:25.000000000 -0700
++++ linux-2.6.31.1-new/drivers/hwmon/coretemp.c        2009-09-28  
17:32:46.000000000 -0700
+@@ -157,17 +157,24 @@
+       /* The 100C is default for both mobile and non mobile CPUs */
+
+       int tjmax = 100000;
+-      int ismobile = 1;
++      int usemsr_ee = 1;
+       int err;
+       u32 eax, edx;
+
+       /* Early chips have no MSR for TjMax */
+
+       if ((c->x86_model == 0xf) && (c->x86_mask < 4)) {
+-              ismobile = 0;
++              usemsr_ee = 0;
+       }
+
+-      if ((c->x86_model > 0xe) && (ismobile)) {
++      /* Atoms seems to have TjMax at 90C */
++
++      if (c->x86_model == 0x1c) {
++              usemsr_ee = 0;
++              tjmax = 90000;
++      }
++
++      if ((c->x86_model > 0xe) && (usemsr_ee)) {
+
+               /* Now we can detect the mobile CPU using Intel provided table
+                  http://softwarecommunity.intel.com/Wiki/Mobility/720.htm
+@@ -179,13 +186,13 @@
+                       dev_warn(dev,
+                                "Unable to access MSR 0x17, assuming desktop"
+                                " CPU\n");
+-                      ismobile = 0;
++                      usemsr_ee = 0;
+               } else if (!(eax & 0x10000000)) {
+-                      ismobile = 0;
++                      usemsr_ee = 0;
+               }
+       }
+
+-      if (ismobile) {
++      if (usemsr_ee) {
+
+               err = rdmsr_safe_on_cpu(id, 0xee, &eax, &edx);
+               if (err) {
+@@ -195,7 +202,9 @@
+               } else if (eax & 0x40000000) {
+                       tjmax = 85000;
+               }
+-      } else {
++      /* if we dont use msr EE it means we are desktop CPU (with exeception
++         of Atom) */
++      } else if (tjmax == 100000) {
+               dev_warn(dev, "Using relative temperature scale!\n");
+       }
+
+@@ -248,9 +257,9 @@
+       platform_set_drvdata(pdev, data);
+
+       /* read the still undocumented IA32_TEMPERATURE_TARGET it exists
+-         on older CPUs but not in this register */
++         on older CPUs but not in this register, Atoms don't have it either */
+
+-      if (c->x86_model > 0xe) {
++      if ((c->x86_model > 0xe) && (c->x86_model != 0x1c)) {
+               err = rdmsr_safe_on_cpu(data->id, 0x1a2, &eax, &edx);
+               if (err) {
+                       dev_warn(&pdev->dev, "Unable to read"
+@@ -413,11 +422,11 @@
+       for_each_online_cpu(i) {
+               struct cpuinfo_x86 *c = &cpu_data(i);
+
+-              /* check if family 6, models 0xe, 0xf, 0x16, 0x17, 0x1A */
++              /* check if family 6, models 0xe, 0xf, 0x16, 0x17, 0x1A, 0x1c */
+               if ((c->cpuid_level < 0) || (c->x86 != 0x6) ||
+                   !((c->x86_model == 0xe) || (c->x86_model == 0xf) ||
+                       (c->x86_model == 0x16) || (c->x86_model == 0x17) ||
+-                      (c->x86_model == 0x1A))) {
++                      (c->x86_model == 0x1A) || (c->x86_model == 0x1c))) {
+
+                       /* supported CPU not found, but report the unknown
+                          family 6 CPU */
+diff -Naur linux-2.6.31.1-old/drivers/hwmon/Kconfig  
linux-2.6.31.1-new/drivers/hwmon/Kconfig
+--- linux-2.6.31.1-old/drivers/hwmon/Kconfig   2009-09-24 08:45:25.000000000  
-0700
++++ linux-2.6.31.1-new/drivers/hwmon/Kconfig   2009-09-28 17:32:46.000000000  
-0700
+@@ -402,12 +402,12 @@
+         will be called gl520sm.
+
+ config SENSORS_CORETEMP
+-      tristate "Intel Core (2) Duo/Solo temperature sensor"
++      tristate "Intel Core/Core2/Atom temperature sensor"
+       depends on X86 && EXPERIMENTAL
+       help
+         If you say yes here you get support for the temperature
+-        sensor inside your CPU. Supported all are all known variants
+-        of Intel Core family.
++        sensor inside your CPU. Most of the family 6 CPUs
++        are supported. Check documentation/driver for details.
+
+ config SENSORS_IBMAEM
+       tristate "IBM Active Energy Manager temperature/power sensors and  
control"
=======================================
--- /trunk/gar-minimyth/html/minimyth/document-changelog.txt    Mon Sep 28  
14:10:22 2009
+++ /trunk/gar-minimyth/html/minimyth/document-changelog.txt    Mon Sep 28  
17:58:54 2009
@@ -18,7 +18,8 @@
      - Removed auto-detection of sensor chip on ASUS motherboards as ASUS
        motherboard sensor information is handled by the asus_atk0110.ko
        in most cases.
-    - Added autodetection of geode video.
+    - Added autodetection of AMD Geode video.
+    - Added autodetection of Intel Atom CPU.

  Improved MythTV
      - Added LATM AAC support (0.21).
@@ -70,6 +71,8 @@
      - Added some configuration options that udev may want.
      - Updated unionfs patch to 2.5.3.
      - Patched 2.6.30 to fix the via drm vblank bug, which was fixed in  
2.6.31.
+    - Patched 2.6.30 and 2.6.30 to add support for the Intel Atom CPU to  
the
+      coretemp.ko kernel module.

  Fixed bugs
      - Patched MythStream in MythTV trunk so that it uses QX11Info::display
=======================================
--- /trunk/gar-minimyth/script/kernel-2.6.30/linux/Makefile     Wed Sep 23  
21:25:15 2009
+++ /trunk/gar-minimyth/script/kernel-2.6.30/linux/Makefile     Mon Sep 28  
17:58:54 2009
@@ -8,6 +8,7 @@
  PATCHFILES  = $(DISTNAME).patch.gar
  PATCHFILES += $(DISTNAME)-perl.patch.gar
  PATCHFILES += $(DISTNAME)-via_vblank.patch
+PATCHFILES += $(DISTNAME)-intel_atom.patch
  PATCHFILES += $(DISTNAME)-bttv_lirc.patch
  PATCHFILES += $(DISTNAME)-unionfs_2.5.3.patch
  PATCHFILES += $(DISTNAME)-disable_dma_for_cfa.patch
=======================================
--- /trunk/gar-minimyth/script/kernel-2.6.30/linux/checksums    Mon Sep 28  
09:06:55 2009
+++ /trunk/gar-minimyth/script/kernel-2.6.30/linux/checksums    Mon Sep 28  
17:58:54 2009
@@ -2,6 +2,7 @@
  f21caa1b09fe03eba5a787cebf06674a  download/linux-2.6.30.8.patch.gar
  1edc672b24eee4e42350deeb1b66d69e  download/linux-2.6.30.8-perl.patch.gar
  1fafe5d882f0a7e32054f48f1c545096  download/linux-2.6.30.8-via_vblank.patch
+934942d9b5d6ee22dd534d3d9a8e1ac1  download/linux-2.6.30.8-intel_atom.patch
  ba48f83f704930d557630ba100b35870  download/linux-2.6.30.8-bttv_lirc.patch
  fcd30a4fe640906b8cba2789d290fc35   
download/linux-2.6.30.8-unionfs_2.5.3.patch
  d286a8e924682f0272fe1dcf4a60f7f0   
download/linux-2.6.30.8-disable_dma_for_cfa.patch
=======================================
--- /trunk/gar-minimyth/script/kernel-2.6.31/linux/Makefile     Wed Sep 23  
21:25:15 2009
+++ /trunk/gar-minimyth/script/kernel-2.6.31/linux/Makefile     Mon Sep 28  
17:58:54 2009
@@ -7,6 +7,7 @@
  DISTFILES = $(DISTNAME).tar.bz2 $(CONFIGFILE)
  PATCHFILES  = $(DISTNAME).patch.gar
  PATCHFILES += $(DISTNAME)-perl.patch.gar
+PATCHFILES += $(DISTNAME)-intel_atom.patch
  PATCHFILES += $(DISTNAME)-bttv_lirc.patch
  PATCHFILES += $(DISTNAME)-unionfs_2.5.3.patch
  PATCHFILES += $(DISTNAME)-disable_dma_for_cfa.patch
=======================================
--- /trunk/gar-minimyth/script/kernel-2.6.31/linux/checksums    Mon Sep 28  
09:06:55 2009
+++ /trunk/gar-minimyth/script/kernel-2.6.31/linux/checksums    Mon Sep 28  
17:58:54 2009
@@ -1,6 +1,7 @@
  8077cd7f7c1cdeb6aef3872441ae5294  download/linux-2.6.31.1.tar.bz2
  51e58e3aabafc4b26ce278c4e0bc35e2  download/linux-2.6.31.1.patch.gar
  7e25efbc18edd02adcc163f0ee550d36  download/linux-2.6.31.1-perl.patch.gar
+30777bb4f39a5b009e728d2b41f18e06  download/linux-2.6.31.1-intel_atom.patch
  3f307dd5344789bf449b2f208fe60fa4  download/linux-2.6.31.1-bttv_lirc.patch
  5d7aebc42710a9e337486bd85a52937b   
download/linux-2.6.31.1-unionfs_2.5.3.patch
  967037322c0c31a55f689f147a5714fe   
download/linux-2.6.31.1-disable_dma_for_cfa.patch
=======================================
---  
/trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/hardware.d/cpu2kernel.map
       
Mon Jan 12 17:32:10 2009
+++  
/trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/hardware.d/cpu2kernel.map
       
Mon Sep 28 17:58:54 2009
@@ -9,5 +9,6 @@
    GenuineIntel , 6           , 22     , coretemp
    GenuineIntel , 6           , 23     , coretemp
    GenuineIntel , 6           , 26     , coretemp
+  GenuineIntel , 6           , 28     , coretemp
  # VIA
  # CentaurHauls ,             ,        ,

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to