[patch-2.4.0-test1-ac11] small update to microcode driver.

From: Tigran Aivazian (tigran@veritas.com)
Date: Fri Jun 09 2000 - 08:17:28 EST


Hi Alan,

This is a tidy-up change that makes the driver more informative about the
reasons no microcode was actually updated (wrong family or no matching
chunk found).

Btw, the whole thing is ready for people to use in a manner better than
the usual DIY which was the case until now - I will send the appropriate
[OT] announcement on linux-kernel later on today.

Regards,
Tigran

diff -urN -X dontdiff linux/Documentation/Configure.help work/Documentation/Configure.help
--- linux/Documentation/Configure.help Fri Jun 9 11:52:51 2000
+++ work/Documentation/Configure.help Fri Jun 9 14:10:37 2000
@@ -12680,7 +12680,7 @@
 
   For latest news and information on obtaining all the required
   ingredients for this driver, check:
- http://www.ocston.org/~tigran/patches/microcode .
+ http://www.urbanmyth.org/microcode/
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
diff -urN -X dontdiff linux/arch/i386/kernel/microcode.c work/arch/i386/kernel/microcode.c
--- linux/arch/i386/kernel/microcode.c Fri Jun 9 13:50:02 2000
+++ work/arch/i386/kernel/microcode.c Fri Jun 9 14:02:17 2000
@@ -28,6 +28,8 @@
  * 1.04 06 June 2000, Simon Trimmer <simon@veritas.com>
  * Added misc device support (now uses both devfs and misc).
  * Added MICROCODE_IOCFREE ioctl to clear memory.
+ * 1.05 09 June 2000, Simon Trimmer <simon@veritas.com>
+ * Messages for error cases (non intel & no suitable microcode).
  */
 
 #include <linux/init.h>
@@ -43,7 +45,7 @@
 #include <asm/uaccess.h>
 #include <asm/processor.h>
 
-#define MICROCODE_VERSION "1.04"
+#define MICROCODE_VERSION "1.05"
 
 MODULE_DESCRIPTION("Intel CPU (P6) microcode update driver");
 MODULE_AUTHOR("Tigran Aivazian <tigran@veritas.com>");
@@ -183,12 +185,14 @@
         struct cpuinfo_x86 *c = cpu_data + cpu_num;
         struct update_req *req = (struct update_req *)arg + cpu_num;
         unsigned int pf = 0, val[2], rev, sig;
- int i;
+ int i,found=0;
 
         req->err = 1; /* be pessimistic */
 
- if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6)
+ if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6){
+ printk(KERN_ERR "microcode: CPU%d not an Intel P6\n", cpu_num );
                 return;
+ }
 
         sig = c->x86_mask + (c->x86_model<<4) + (c->x86<<8);
 
@@ -202,6 +206,8 @@
                 if (microcode[i].sig == sig && microcode[i].pf == pf &&
                     microcode[i].ldrver == 1 && microcode[i].hdrver == 1) {
 
+ found=1;
+
                         rdmsr(0x8B, val[0], rev);
                         if (microcode[i].rev <= rev) {
                                 printk(KERN_ERR
@@ -232,6 +238,9 @@
                         }
                         break;
                 }
+
+ if(!found)
+ printk(KERN_ERR "microcode: found no data for CPU%d (sig=%x, pflags=%d)\n", cpu_num, sig, pf);
 }
 
 static ssize_t microcode_read(struct file *file, char *buf, size_t len, loff_t *ppos)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:18 EST