logo
Published on KernelTrap (http://kerneltrap.org)

Linux: Updating Microcode On Intel Processors

By Jeremy
Created Mar 19 2004 - 08:24

It was recently asked on the lkml [1] what value there is in upgrading the microcode on an Intel processor. Tigran Aivazian, author of the IA32 microcode driver

and Microcode Update Utility for Linux [2] explained:

"The answer to your question is that some Intel CPUs (just like any other hardware or software) contain bugs and, fortunately, their architecture is flexible enough to provide a way to fix those bugs by means of loading the microcode update on the fly, i.e. while the OS is running with no need to reboot (in fact, rebooting or otherwise resetting the CPU causes the update to be lost and requires to run the update again)."

The brief discussion went on to look at which processors support this functionality, and why you might or might not want to perform the update. On the whole, it seems there's little risk and often chance to gain. Unfortunately, a list of specific changes is not publicly available. In any case, the update is volatile, so if it introduces any problems a simple reboot will revert back to the original microcode.


From: Justin Piszcz [email blocked]
To:  linux-kernel
Subject: Linux Kernel Microcode Question
Date: Thu, 18 Mar 2004 16:40:49 +0000

The URL: http://www.urbanmyth.org/microcode/ [3]

The microcode_ctl utility is a companion to the IA32 microcode driver 
written by Tigran Aivazian [email blocked]. The utility has two uses:

    * it decodes and sends new microcode to the kernel driver to be uploaded 
to Intel IA32 processors. (Pentium Pro, PII, PIII, Pentium 4, Celeron, Xeon 
etc - all P6 and above, which does NOT include pentium classics)
    * it signals the kernel driver to release any buffers it may hold

The microcode update is volatile and needs to be uploaded on each system 
boot i.e. it doesn't reflash your cpu permanently, reboot and it reverts 
back to the old microcode.

My question is, what are the advantages vs disadvantages in updating your 
CPU's microcode?

Is it worth it?

Does it matter what type of Intel CPU you have?

Do some CPU's benefit more than others for microcode updates?

I know RedHat distributions usually do this by default, but others do not.

Can anyone explain reasons to or not to update the CPU microcode?


From: Dave Jones [4] [email blocked] Subject: Re: Linux Kernel Microcode Question Date: Thu, 18 Mar 2004 16:59:52 +0000 On Thu, Mar 18, 2004 at 04:40:49PM +0000, Justin Piszcz wrote: > My question is, what are the advantages vs disadvantages in updating your > CPU's microcode? It'll fix known problems in the microcode thats in ROM on your CPU. > Is it worth it? In most cases, yes. It's zero cost. You don't waste RAM, as the microcode gets loaded into small RAM areas on the CPU that are otherwise unused. > Does it matter what type of Intel CPU you have? yes. You need at least a Pentium Pro. Also Pentium 4 needs a newer format microcode, which isn't available publically anywhere yet afaik. > Do some CPU's benefit more than others for microcode updates? Some CPUs have more bugs that need fixing than others 8) Additionally some CPUs may not have a newer microcode available than the one that it shipped with in ROM > Can anyone explain reasons to or not to update the CPU microcode? In some cases, your BIOS is doing this transparently already. I've seen instances where moving a CPU between two motherboards has meant that microcode_ctl has done an upgrade on one, and done nothing on the other as its already up to date. If you're already up-to-date, theres no reason to run it. Dave
From: "David Schwartz" [email blocked] Subject: RE: Linux Kernel Microcode Question Date: Thu, 18 Mar 2004 09:13:37 -0800 > > Is it worth it? > In most cases, yes. It's zero cost. You don't waste RAM, as the > microcode gets loaded into small RAM areas on the CPU that are > otherwise unused. It is at least theoeretically possible that a microcode update might cause an operation that's normally done very quickly (in dedicated hardware) to be done by a slower path (microcode operations) to fix a bug in the dedicated hardware that is very obscure and very unlikely to ever bother you. However, I have never heard of even a single confirmed instance where this happened. DS
From: Tigran Aivazian [email blocked] Subject: Re: Linux Kernel Microcode Question Date: Thu, 18 Mar 2004 22:20:07 +0000 (GMT) Hi Justin, The answer to your question is that some Intel CPUs (just like any other hardware or software) contain bugs and, fortunately, their architecture is flexible enough to provide a way to fix those bugs by means of loading the microcode update on the fly, i.e. while the OS is running with no need to reboot (in fact, rebooting or otherwise resetting the CPU causes the update to be lost and requires to run the update again). This is the advantage. There are no disadvantages. After the microcode update has been loaded into the CPUs, the microcode driver can be removed to save a tiny amount of memory that it takes: # rmmod microcode Yes, it does matter which Intel CPUs you have. The driver selects the appropriate chunk of microcode for every CPU present on the system and loads it accordingly. You may even have mixed CPUs (i.e. of different kind) in an SMP system and this is handled automatically. Kind regards Tigran



Related Links:


Source URL:
http://kerneltrap.org/node/2678