From ArchWiki
Revision as of 09:30, 24 October 2014 by Progandy (talk | contribs) (→‎Updating microcode: moved linux 3.17-2 warning below Intel heading)
Jump to navigation Jump to search

zh-CN:Microcode Processor microcode is akin to processor firmware. The kernel is able to update the processor's firmware without the need to update it via a BIOS update.

The microcode data file contains the latest microcode definitions for all Intel processors. Intel releases microcode updates to correct processor behavior as documented in the respective processor specification updates. While the regular approach to getting this microcode update is via a BIOS upgrade, Intel realizes that this can be an administrative hassle. The Linux operating system and VMware ESX products have a mechanism to update the microcode after booting. For example, this file will be used by the operating system mechanism if the file is placed in the /etc/firmware directory of the Linux system. ~Intel
Note: Arch Linux does not use /etc/firmware to process the update, instead firmware binaries are made available in /usr/lib/firmware/*., except the Intel microcode, which is in /boot/intel-ucode.img

Updating microcode

For Intel processors, install intel-ucode.

For AMD processors the microcode updates are available in linux-firmware, which is installed as part of the base system.

  • Microcode updates via software are not persistent. In other words, one needs to apply them at each boot.

Enabling Intel Microcode Updates

Warning: With linux 3.17-2 and linux-lts 3.14.21-2 and newer versions, Intel microcode updates are not triggered automatically any more.

For recent kernels, you will need intel-ucode version 20140913 or newer.

After that, the updates must be enabled by adding /boot/intel-ucode.img as the first initrd to your bootloader, in addition to the normal initrd file.

EFI boot stub / EFI handover

If you are booting using the EFI boot stub or with EFI handover, simply append two initrd= options:

initrd=/intel-ucode.img initrd=/initramfs-linux.img


With Gummiboot, you can use the initrd option twice in /boot/loader/entries/*.conf:

title   Arch Linux
linux   /vmlinuz-linux
initrd  /intel-ucode.img
initrd  /initramfs-linux.img
options ...


For rEFInd, edit boot options in /boot/refind_linux.conf as per EFI boot stub above, example:

"Boot with standard options" "ro root=UUID=(...) quiet initrd=/intel-ucode.img initrd=/initramfs-linux.img"

If you use manual stanzas in /boot/refind.conf to define the kernels to boot then simply add initrd=/intel-ucode.img or /boot/intel-ucode.img as required to the options line, and not in the main part of the stanza.


Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Instructions for grub are missing. (Discuss in Talk:Microcode#)

For the time being, you can manually either add /intel-ucode.img in your grub.cfg as follows:

	echo	'Loading initial ramdisk ...'
	initrd	/intel-ucode.img /initramfs-linux.img

save, and next time that you will boot your system, microcode should automatically be updated.

Note: This file will automatically be overriden by grub-mkconfig during certain updates negating your changes.

Remember that the path to /intel-ucode.img is relative to the boot partition, just as that of initramfs. This means that if you have a dedicated /boot partition you should use /intel-ucode.img; else use /boot/intel-ucode.img. There is an open Bug Report (FS#42354) for proper support of microde updates in grub-mkconfig.


alternatively, to get a more enduring effect, edit the appropriate section in your /etc/grub.d/10_linux as follows:

Note: Modifying this file can cause future upstream package versions not to be installed, see Pacnew and Pacsave files.
   if test -n "${initrd}" ; then
+    if test -f "${dirname}/intel-ucode.img"; then
+        ucode="${rel_dirname}/intel-ucode.img "
+    else
+        ucode=
+    fi
     # TRANSLATORS: ramdisk isn't identifier. Should be translated.
     message="$(gettext_printf "Loading initial ramdisk ...")"
     sed "s/^/$submenu_indentation/" << EOF
 	echo	'$(echo "$message" | grub_quote)'
-	initrd	${rel_dirname}/${initrd}
+	initrd	${ucode}${rel_dirname}/${initrd}

and then recreate your grub config:

# grub-mkconfig -o /boot/grub/grub.cfg

that's it, microcode should be updated on the next boot.


Multiple initrd's can be separated by commas in the config file /boot/syslinux/syslinux.cfg.

LABEL arch
    MENU LABEL Arch Linux
    LINUX ../vmlinuz-linux
    INITRD ../intel-ucode.img,../initramfs-linux.img
    APPEND ...

Enabling AMD Microcode Updates

On AMD systems, microcode updates are automatically applied at boot time so no further action is needed.

Verifying that microcode gets updated on boot

You can check if microcode is successfully updated on boot using the command dmesg | grep microcode.

On Intel systems you should see something similar to the following, indicating that microcode is updated early:

[    0.000000] CPU0 microcode updated early to revision 0x218, date = 2009-04-10
[    0.588776] microcode: CPU0 sig=0x106c2, pf=0x4, revision=0x218
[    0.588799] microcode: CPU1 sig=0x106c2, pf=0x4, revision=0x218
[    0.588977] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba

On AMD systems microcode is updated a bit later in the boot process, so the output would look something like this:

[    0.807879] microcode: CPU0: patch_level=0x01000098
[    0.807888] microcode: CPU1: patch_level=0x01000098
[    0.807983] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[   16.150642] microcode: CPU0: new patch_level=0x010000c7
[   16.150682] microcode: CPU1: new patch_level=0x010000c7

Which CPUs accept microcode updates


According to AMD's Operating System Research Center, these AMD processor families support microcode updates:

  • 10h (Barcelona)
  • 11h (Turion X2 Ultra/Llano)
  • 12h (Fusion), 14h (Bobcat)
  • 15h (Bulldozer)

Intel CPUs

According to Intel's download center, the following CPUs support microcode updates:

  • Intel® Atom™ Processor
  • Intel® Atom™ processor for Entry Level Desktop PCs
  • Intel® Celeron® Desktop Processor
  • Intel® Core™ Duo Processor
  • Intel® Core™ i3 Desktop Processor
  • Intel® Core™ i3 Mobile Processor
  • Intel® Core™ i5 Desktop Processor
  • Intel® Core™ i5 Mobile Processor
  • Intel® Core™ i7 Desktop Processor
  • Intel® Core™ i7 Mobile Processor
  • Intel® Core™ i7 Mobile Processor Extreme Edition
  • Intel® Core™ i7 Processor Extreme Edition
  • Intel® Core™ Solo processor
  • Intel® Core™2 Duo Desktop Processor
  • Intel® Core™2 Duo Mobile Processor
  • Intel® Core™2 Extreme Mobile Processor
  • Intel® Core™2 Extreme Processor
  • Intel® Core™2 Quad Mobile Processor
  • Intel® Core™2 Quad Processor
  • Intel® Core™2 Solo Processor
  • Intel® Pentium® 4 Processor Extreme Edition
  • Intel® Pentium® 4 Processors
  • Intel® Pentium® D Processor
  • Intel® Pentium® M Processor
  • Intel® Pentium® Processor Extreme Edition
  • Intel® Pentium® Processor for Desktop
  • Intel® Pentium® Processor for Mobile
  • Intel® Setup and Configuration Software (Intel® SCS)
  • Intel® vPro™ technology
  • Intel® Xeon® Processor
  • Intel® Xeon® Processor 3000 Sequence
  • Intel® Xeon® Processor 5000 Sequence
  • Intel® Xeon® Processor 6000 Sequence
  • Intel® Xeon® Processor 7000 Sequence
  • Intel® Xeon® processor E3-1200 Product Family
  • Intel® Xeon® processor E5-1600 Product Family
  • Intel® Xeon® processor E5-2400 Product Family
  • Intel® Xeon® processor E5-2600 Product Family
  • Intel® Xeon® processor E5-4600 Product Family
  • Intel® Xeon® processor E7-2800 Product Family
  • Intel® Xeon® processor E7-4800 Product Family
  • Intel® Xeon® processor E7-8800 Product Family
  • Intel® Z2460 Smartphone
  • Mobile Intel® Celeron® Processors
  • Mobile Intel® Pentium® 4 Processors - M

Detecting available microcode update

It is possible to find out if the intel-ucode.img contains a microcode image for your cpu with iucode-toolAUR.

  • Install intel-ucode (changing initrd is not required for detection)
  • Install iucode-toolAUR from AUR.
  • # modprobe cpuid
  • # bsdtar -Oxf /boot/intel-ucode.img | iucode_tool -tb -lS -
    (Extract microcode image and search it for your cpuid.)
  • If an update is available, it should show up below selected microcodes.