Commit 6a3e473e authored by Linus Torvalds's avatar Linus Torvalds

Fix up the microcode update on regular 32-bit x86. Our wrmsr()

is a bit unforgiving and really doesn't like 64-bit values.

We should possibly make wrmsr() automatically truncate the
arguments, but regardless we should just fix microcode.c.
parent acc8a334
......@@ -371,8 +371,9 @@ static void do_update_one (void * unused)
spin_lock_irqsave(&microcode_update_lock, flags);
/* write microcode via MSR 0x79 */
wrmsr(MSR_IA32_UCODE_WRITE, (u64)(uci->mc->bits),
(u64)(uci->mc->bits) >> 32);
wrmsr(MSR_IA32_UCODE_WRITE,
(unsigned long) uci->mc->bits,
(unsigned long) uci->mc->bits >> 16 >> 16);
wrmsr(MSR_IA32_UCODE_REV, 0, 0);
__asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment