|
@@ -5,13 +5,14 @@
|
|
* 2006 Shaohua Li <shaohua.li@intel.com>
|
|
* 2006 Shaohua Li <shaohua.li@intel.com>
|
|
*
|
|
*
|
|
* This driver allows to upgrade microcode on Intel processors
|
|
* This driver allows to upgrade microcode on Intel processors
|
|
- * belonging to IA-32 family - PentiumPro, Pentium II,
|
|
|
|
|
|
+ * belonging to IA-32 family - PentiumPro, Pentium II,
|
|
* Pentium III, Xeon, Pentium 4, etc.
|
|
* Pentium III, Xeon, Pentium 4, etc.
|
|
*
|
|
*
|
|
- * Reference: Section 8.10 of Volume III, Intel Pentium 4 Manual,
|
|
|
|
- * Order Number 245472 or free download from:
|
|
|
|
- *
|
|
|
|
- * http://developer.intel.com/design/pentium4/manuals/245472.htm
|
|
|
|
|
|
+ * Reference: Section 8.11 of Volume 3a, IA-32 Intel? Architecture
|
|
|
|
+ * Software Developer's Manual
|
|
|
|
+ * Order Number 253668 or free download from:
|
|
|
|
+ *
|
|
|
|
+ * http://developer.intel.com/design/pentium4/manuals/253668.htm
|
|
*
|
|
*
|
|
* For more information, go to http://www.urbanmyth.org/microcode
|
|
* For more information, go to http://www.urbanmyth.org/microcode
|
|
*
|
|
*
|
|
@@ -58,12 +59,12 @@
|
|
* nature of implementation.
|
|
* nature of implementation.
|
|
* 1.11 22 Mar 2002 Tigran Aivazian <tigran@veritas.com>
|
|
* 1.11 22 Mar 2002 Tigran Aivazian <tigran@veritas.com>
|
|
* Fix the panic when writing zero-length microcode chunk.
|
|
* Fix the panic when writing zero-length microcode chunk.
|
|
- * 1.12 29 Sep 2003 Nitin Kamble <nitin.a.kamble@intel.com>,
|
|
|
|
|
|
+ * 1.12 29 Sep 2003 Nitin Kamble <nitin.a.kamble@intel.com>,
|
|
* Jun Nakajima <jun.nakajima@intel.com>
|
|
* Jun Nakajima <jun.nakajima@intel.com>
|
|
* Support for the microcode updates in the new format.
|
|
* Support for the microcode updates in the new format.
|
|
* 1.13 10 Oct 2003 Tigran Aivazian <tigran@veritas.com>
|
|
* 1.13 10 Oct 2003 Tigran Aivazian <tigran@veritas.com>
|
|
* Removed ->read() method and obsoleted MICROCODE_IOCFREE ioctl
|
|
* Removed ->read() method and obsoleted MICROCODE_IOCFREE ioctl
|
|
- * because we no longer hold a copy of applied microcode
|
|
|
|
|
|
+ * because we no longer hold a copy of applied microcode
|
|
* in kernel memory.
|
|
* in kernel memory.
|
|
* 1.14 25 Jun 2004 Tigran Aivazian <tigran@veritas.com>
|
|
* 1.14 25 Jun 2004 Tigran Aivazian <tigran@veritas.com>
|
|
* Fix sigmatch() macro to handle old CPUs with pf == 0.
|
|
* Fix sigmatch() macro to handle old CPUs with pf == 0.
|
|
@@ -320,11 +321,11 @@ static void apply_microcode(int cpu)
|
|
return;
|
|
return;
|
|
|
|
|
|
/* serialize access to the physical write to MSR 0x79 */
|
|
/* serialize access to the physical write to MSR 0x79 */
|
|
- spin_lock_irqsave(µcode_update_lock, flags);
|
|
|
|
|
|
+ spin_lock_irqsave(µcode_update_lock, flags);
|
|
|
|
|
|
/* write microcode via MSR 0x79 */
|
|
/* write microcode via MSR 0x79 */
|
|
wrmsr(MSR_IA32_UCODE_WRITE,
|
|
wrmsr(MSR_IA32_UCODE_WRITE,
|
|
- (unsigned long) uci->mc->bits,
|
|
|
|
|
|
+ (unsigned long) uci->mc->bits,
|
|
(unsigned long) uci->mc->bits >> 16 >> 16);
|
|
(unsigned long) uci->mc->bits >> 16 >> 16);
|
|
wrmsr(MSR_IA32_UCODE_REV, 0, 0);
|
|
wrmsr(MSR_IA32_UCODE_REV, 0, 0);
|
|
|
|
|
|
@@ -341,7 +342,7 @@ static void apply_microcode(int cpu)
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
printk(KERN_INFO "microcode: CPU%d updated from revision "
|
|
printk(KERN_INFO "microcode: CPU%d updated from revision "
|
|
- "0x%x to 0x%x, date = %08x \n",
|
|
|
|
|
|
+ "0x%x to 0x%x, date = %08x \n",
|
|
cpu_num, uci->rev, val[1], uci->mc->hdr.date);
|
|
cpu_num, uci->rev, val[1], uci->mc->hdr.date);
|
|
uci->rev = val[1];
|
|
uci->rev = val[1];
|
|
}
|
|
}
|
|
@@ -534,7 +535,7 @@ static int cpu_request_microcode(int cpu)
|
|
c->x86, c->x86_model, c->x86_mask);
|
|
c->x86, c->x86_model, c->x86_mask);
|
|
error = request_firmware(&firmware, name, µcode_pdev->dev);
|
|
error = request_firmware(&firmware, name, µcode_pdev->dev);
|
|
if (error) {
|
|
if (error) {
|
|
- pr_debug("microcode: ucode data file %s load failed\n", name);
|
|
|
|
|
|
+ pr_debug("microcode: data file %s load failed\n", name);
|
|
return error;
|
|
return error;
|
|
}
|
|
}
|
|
buf = firmware->data;
|
|
buf = firmware->data;
|
|
@@ -805,6 +806,9 @@ static int __init microcode_init (void)
|
|
{
|
|
{
|
|
int error;
|
|
int error;
|
|
|
|
|
|
|
|
+ printk(KERN_INFO
|
|
|
|
+ "IA-32 Microcode Update Driver: v" MICROCODE_VERSION " <tigran@aivazian.fsnet.co.uk>\n");
|
|
|
|
+
|
|
error = microcode_dev_init();
|
|
error = microcode_dev_init();
|
|
if (error)
|
|
if (error)
|
|
return error;
|
|
return error;
|
|
@@ -825,9 +829,6 @@ static int __init microcode_init (void)
|
|
}
|
|
}
|
|
|
|
|
|
register_hotcpu_notifier(&mc_cpu_notifier);
|
|
register_hotcpu_notifier(&mc_cpu_notifier);
|
|
-
|
|
|
|
- printk(KERN_INFO
|
|
|
|
- "IA-32 Microcode Update Driver: v" MICROCODE_VERSION " <tigran@aivazian.fsnet.co.uk>\n");
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|