lkml.org 
[lkml]   [2000]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch-2.4.0-test8-pre6] bugfix in microcode driver
Hi Linus,

This patch (courtesy of Eric W. Biederman <ebiederman@lnxi.com>) 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 <tigran@veritas.com>
+ * 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 <ebiederman@lnxi.com> 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 <tigran@veritas.com>");
@@ -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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.034 / U:1.240 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site