Re: kernel/microcode.c error from new 64bit code

From: H. Peter Anvin
Date: Sun Feb 22 2004 - 15:42:34 EST


It turns out wrmsr64() and rdmsr64() is already in the code, except they're called wrmsrl() and rdmsrl().

So I'd suggest the following:

Index: microcode.c
===================================================================
RCS file: /home/hpa/kernel/bkcvs/linux-2.5/arch/i386/kernel/microcode.c,v
retrieving revision 1.27
diff -u -r1.27 microcode.c
--- microcode.c 19 Feb 2004 04:48:45 -0000 1.27
+++ microcode.c 22 Feb 2004 20:40:30 -0000
@@ -371,9 +371,8 @@
spin_lock_irqsave(&microcode_update_lock, flags);

/* write microcode via MSR 0x79 */
- wrmsr(MSR_IA32_UCODE_WRITE,
- (unsigned long) uci->mc->bits,
- (unsigned long) uci->mc->bits >> 16 >> 16);
+ /* Note: unsigned long is 32 bits on i386, 64 bits on x86-64 */
+ wrmsrl(MSR_IA32_UCODE_WRITE, (unsigned long) uci->mc->bits);
wrmsr(MSR_IA32_UCODE_REV, 0, 0);

__asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");

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