Hi Linus,

This patch (courtesy of Eric W. Biederman <[EMAIL PROTECTED]>) allows
the microcode driver to make the correct decision about patch revision
even if there were no update done by the BIOS at all.

Regards,
Tigran

--- linux/arch/i386/kernel/microcode.c  Thu Aug 24 08:08:43 2000
+++ work/arch/i386/kernel/microcode.c   Thu Sep  7 15:59:57 2000
@@ -37,6 +37,13 @@
  *             Removed ->release(). Removed exclusive open and status bitmap.
  *             Added microcode_rwsem to serialize read()/write()/ioctl().
  *             Removed global kernel lock usage.
+ *     1.07    07 Sep 2000, Tigran Aivazian <[EMAIL PROTECTED]>
+ *             Write 0 to 0x8B msr and then cpuid before reading revision,
+ *             so that it works even if there were no update done by the
+ *             BIOS. Otherwise, reading from 0x8B gives junk (which happened
+ *             to be 0 on my machine which is why it worked even when I
+ *             disabled update by the BIOS)
+ *             Thanks to Eric W. Biederman <[EMAIL PROTECTED]> for the fix.
  */
 
 #include <linux/init.h>
@@ -51,7 +58,7 @@
 #include <asm/uaccess.h>
 #include <asm/processor.h>
 
-#define MICROCODE_VERSION      "1.06"
+#define MICROCODE_VERSION      "1.07"
 
 MODULE_DESCRIPTION("Intel CPU (P6) microcode update driver");
 MODULE_AUTHOR("Tigran Aivazian <[EMAIL PROTECTED]>");
@@ -188,7 +195,8 @@
                    microcode[i].ldrver == 1 && microcode[i].hdrver == 1) {
 
                        found=1;
-
+                       wrmsr(0x8B, 0, 0);
+                       __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");
                        rdmsr(0x8B, val[0], rev);
                        if (microcode[i].rev <= rev) {
                                printk(KERN_ERR 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to