Ryan Hill (psykil) wrote,

quick tip - microcode updating

Update: the microcode-ctl ebuild now installs the latest microcode directly from Intel's site, so it's no longer necessary to fetch it yourself.

Normally, a processor firmware update comes in the form of a BIOS upgrade. These can be a bit of a pain and often rely on your BIOS/chipset vendor putting out an update specific to your hardware. Intel processors, however, have the ability to update their microcode from userspace after boot time. This update is volatile - it has to be done every time the machine is rebooted - but this can be trivially automated.

Microcode updating in Linux is handled by the microcode-ctl utility. But before installing it let's make sure that the kernel supports microcode updates. This is controlled by CONFIG_MICROCODE, which you can find at
  Processor type and features  --->
    /dev/cpu/microcode - Intel IA32 CPU microcode support
(despite the name, it does work on both x86 and x86_64)

You can build it right into the kernel or as a kernel module. The advantage of using a module is that it's loaded to do the update and then unloaded automatically afterward.

Rebuild, reboot, etc. if you need to.

Next emerge sys-apps/microcode-ctl. This installs both the utility and a copy of the microcode data. However, Intel began making updates available for the general public through their Download Center recently, and rather than duplicate the effort the author of microcode-ctl has decided to not update the data file included in the package anymore. So we'll have to get the latest version from Intel.

Go to http://downloadcenter.intel.com/default.aspx and select Processors from the menu on the left. Pick your processor (actually they all point to the same file so it doesn't matter which you pick) and select Linux as the operating system. Click the download link for Linux Processor Microcode Data File. You should end up with something like microcode-20080401.dat.
# mv microcode-20080401.dat /etc/microcode.dat
Now you're set. Run
# /etc/init.d/microcode_ctl start
to update the processor firmware. You should see something like this in dmesg:
IA-32 Microcode Update Driver: v1.14a <tigran@aivazian.fsnet.co.uk>
Finally, make the update happen automatically on every boot by running
# rc-update add microcode_ctl default

Further reading:
Tags: gentoo
  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded