Difference between revisions of "Microcode"

From ArchWiki
Jump to: navigation, search
m (Updating microcode)
(Added a Warning to the LILO configuration, informing about the necessity to repeat some steps after a kernel update.)
 
(132 intermediate revisions by 60 users not shown)
Line 1: Line 1:
 
[[Category:CPU]]
 
[[Category:CPU]]
==What is a Microcode update==
+
[[de:Microcode]]
 +
[[es:Microcode]]
 +
[[ja:マイクロコード]]
 +
[[ru:Microcode]]
 +
[[zh-CN:Microcode]]
 +
Processor manufacturers release stability and security updates to the processor [[Wikipedia:Microcode|microcode]]. While microcode can be updated through the BIOS, the Linux kernel is also able to apply these updates during boot. These updates provide bug fixes that can be critical to the stability of your system. Without these updates, you may experience spurious crashes or unexpected system halts that can be difficult to track down.
  
[[Wikipedia: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.
+
Users of CPUs belonging to the Intel Haswell and Broadwell processor families in particular must install these microcode updates to ensure system stability. But all Intel users should install the updates as a matter of course.
  
The blobs can be downloaded from [http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=22508&keyword=Microcode&lang=eng Intel's website]. 20130222 is their latest release.
+
== Installation ==
  
"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."
+
For AMD processors the microcode updates are available in {{Pkg|linux-firmware}}, which is installed as part of the base system. No further action is needed.
  
{{Note|Arch Linux does not use /etc/firmware to process the update.}}
+
For Intel processors, [[install]] the {{Pkg|intel-ucode}} package, and continue reading.
  
==Updating microcode==
+
== Enabling Intel microcode updates ==
  
Install either {{Pkg|intel-ucode}} OR {{Pkg|amd-ucode}}, depending on your processor vendor, and specify it to load unconditionally at boot in {{ic|/etc/modules-load.d/}}. See [[Kernel Modules#Loading]]
+
Microcode must be loaded by the bootloader. Because of the wide variability in users' early-boot configuration, Intel microcode updates may not be triggered automatically by Arch's default configuration. Many AUR kernels have followed the path of the official Arch kernels in this regard.
  
Reboot your machine and then execute:
+
These updates must be enabled by adding {{ic|/boot/intel-ucode.img}} as the '''first initrd in the bootloader config file'''. This is in addition to the normal initrd file. See below for instructions for common bootloaders.
  
# dmesg | grep microcode
+
=== GRUB ===
  
The output of this command should indicate the current version of your processor's microcode and whether any additional update was applied to it.
+
==== Automatic method ====
  
{{Note|Microcode updates via software are not persistent. In other words, one needs to apply them at each boot which is why it is specified in {{ic|/etc/modules-load.d/}}.}}
+
''grub-mkconfig'' will automatically detect the microcode update and configure [[GRUB]] appropriately. After installing the {{Pkg|intel-ucode}} package, users are directed to regenerate the GRUB config to activate loading the microcode update by running:
 +
  # grub-mkconfig -o /boot/grub/grub.cfg
  
{{Note|With udev/systemd-tools 185-1 & kernel 3.4.2 microcode was loaded automatically on my AMD opteron system and i didn't have to add it manually to MODULES array.}}
+
==== Manual method ====
  
 +
Alternatively, users that manage their GRUB config file manually can add {{ic|/intel-ucode.img}} or {{ic|/boot/intel-ucode.img}} to {{ic|grub.cfg}} as follows:
  
{{Note|If you were a previous user of the {{ic|microcode_ctl}} package, remove {{ic|microcode}} from the DAEMONS array in {{ic|/etc/rc.conf}}. {{ic|microcode_ctl}} is no longer in Arch's repositories.}}
+
[...]
 +
    echo 'Loading initial ramdisk ...'
 +
    initrd /intel-ucode.img /initramfs-linux.img
 +
[...]
  
==How to tell if a microcode update is needed==
+
Repeat it for each menu entry.
  
The best way to tell is to download and install the appropriate microcode update. First load the microcode module using modprobe.
+
{{Warning|This file will automatically be overwritten by {{ic|/usr/bin/grub-mkconfig}} during certain updates negating the changes. It is strongly recommended to use the configuration directory in {{ic|/etc/grub.d/}} to manage your GRUB configuration needs.}}
{{bc|
+
 
# modprobe microcode
+
=== systemd-boot ===
 +
 
 +
Use the {{ic|initrd}} option twice in {{ic|/boot/loader/entries/''entry''.conf}}:
 +
 
 +
title  Arch Linux
 +
linux  /vmlinuz-linux
 +
initrd  /intel-ucode.img
 +
initrd  /initramfs-linux.img
 +
options ...
 +
 
 +
If you do not mount the ESP to {{ic|/boot}}, copy {{ic|/boot/intel-ucode.img}} to your [[EFI System Partition]].
 +
 
 +
=== EFI boot stub / EFI handover ===
 +
 
 +
Append two {{ic|1=initrd=}} options:
 +
 
 +
{{bc|1=initrd=/intel-ucode.img initrd=/initramfs-linux.img}}
 +
 
 +
{{Accuracy|What does this do, why isn't the above enough and why/how is it specific to this particular section?}}
 +
 
 +
For kernels that have been generated as a single file containing all initrd, cmdline and kernel, first generate the initrd to integrate by creating a new one as follows:
 +
 
 +
{{bc|1=cat /boot/intel-ucode.img /boot/initramfs-linux.img > my_new_initrd
 +
objcopy ... --add-section .initrd=my_new_initrd
 
}}
 
}}
Then inspect dmesg, if it reports that an update was applied, the microcode in the BIOS of your motherboard predates the one in either {{Pkg|intel-ucode}} or {{Pkg|amd-ucode}}.  Users should therefore use the microcode update!
 
  
Examples, note that in each case, the BIOS on the motherboard is the latest version from each respective vendor:
+
=== rEFInd ===
 +
 
 +
Edit boot options in {{ic|/boot/refind_linux.conf}} as per EFI boot stub above, example:
 +
 
 +
"Boot with standard options" "ro root=UUID=(...) quiet initrd=/boot/intel-ucode.img initrd=/boot/initramfs-linux.img"
 +
 
 +
Users employing [[rEFInd#Manual_boot_stanzas|manual stanzas]] in {{ic|''esp''/EFI/refind/refind.conf}} to define the kernels should simply add {{ic|1=initrd=/intel-ucode.img}} or {{ic|/boot/intel-ucode.img}} as required to the options line, and not in the main part of the stanza.
 +
 
 +
=== Syslinux ===
 +
 
 +
{{Note|There must be no spaces between the {{ic|intel-ucode}} and {{ic|initramfs-linux}} initrd files. The period signs also do not signify any shorthand or missing code; the {{ic|INITRD}} line must be exactly as illustrated below.}}
 +
 
 +
Multiple initrd's can be separated by commas in {{ic|/boot/syslinux/syslinux.cfg}}:
 +
 
 +
LABEL arch
 +
    MENU LABEL Arch Linux
 +
    LINUX ../vmlinuz-linux
 +
    INITRD ../intel-ucode.img,../initramfs-linux.img
 +
    APPEND ''<your kernel parameters>''
 +
 
 +
=== LILO ===
 +
 
 +
LILO and potentially other old bootloaders do not support multiple initrd images. In that case, {{ic|intel-ucode}} and {{ic|initramfs-linux}} will have to be merged into one image.
 +
{{Warning|The merged image must be recreated after each kernel update!}}
 +
{{Note|The additional image, in this case {{ic|intel-ucode}} must not be compressed. Otherwise, the kernel might complain that it can only find garbage in the uncompressed image and fail to boot.}}
 +
{{ic|intel-ucode.img}} should be a cpio archive, as in this case. It is advised to check whether the archive is compressed after each microcode update, as there is no guarantee that the image will stay non-compressed in the future.
 +
In order to check whether {{ic|intel-ucode}} is compressed, you can use the {{ic|file}} command:
 +
$ file /boot/intel-ucode.img
 +
/boot/intel-ucode.img: ASCII cpio archive (SVR4 with no CRC)
 +
{{Note|The order is important. The original image {{ic|initramfs-linux}} must be concatenated '''on top''' of the {{ic|intel-ucode}} image.}}
 +
To merge both images into one image named {{ic|initramfs-merged.img}}, the following command can be used:
 +
 +
# cat /boot/intel-ucode.img /boot/initramfs-linux.img > /boot/initramfs-merged.img
 +
 
 +
Now, edit {{ic|/etc/lilo.conf}} to load the new image.
 +
 
 +
[...]
 +
    initrd=/boot/initramfs-merged.img
 +
[...]
 +
 
 +
And run {{ic|lilo}} as root:
 +
 +
# lilo
 +
 
 +
== Verifying that microcode got updated on boot ==
 +
 
 +
Use {{ic|/usr/bin/dmesg}} to see if the microcode has been updated:
 +
 
 +
$ dmesg | grep microcode
 +
 
 +
On Intel systems one should see something similar to the following, indicating that microcode is updated early:
 +
 
 +
[    0.000000] CPU0 microcode updated early to revision 0x1b, date = 2014-05-29
 +
[    0.221951] CPU1 microcode updated early to revision 0x1b, date = 2014-05-29
 +
[    0.242064] CPU2 microcode updated early to revision 0x1b, date = 2014-05-29
 +
[    0.262349] CPU3 microcode updated early to revision 0x1b, date = 2014-05-29
 +
[    0.507267] microcode: CPU0 sig=0x306a9, pf=0x2, revision=0x1b
 +
[    0.507272] microcode: CPU1 sig=0x306a9, pf=0x2, revision=0x1b
 +
[    0.507276] microcode: CPU2 sig=0x306a9, pf=0x2, revision=0x1b
 +
[    0.507281] microcode: CPU3 sig=0x306a9, pf=0x2, revision=0x1b
 +
[    0.507286] microcode: CPU4 sig=0x306a9, pf=0x2, revision=0x1b
 +
[    0.507292] microcode: CPU5 sig=0x306a9, pf=0x2, revision=0x1b
 +
[    0.507296] microcode: CPU6 sig=0x306a9, pf=0x2, revision=0x1b
 +
[    0.507300] microcode: CPU7 sig=0x306a9, pf=0x2, revision=0x1b
 +
[    0.507335] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
 +
 
 +
It is entirely possible, particularly with newer hardware, that there is no microcode update for the CPU. In that case, the output may look like this:
 +
 
 +
[    0.292893] microcode: CPU0 sig=0x306c3, pf=0x2, revision=0x1c
 +
[    0.292899] microcode: CPU1 sig=0x306c3, pf=0x2, revision=0x1c
 +
[    0.292906] microcode: CPU2 sig=0x306c3, pf=0x2, revision=0x1c
 +
[    0.292912] microcode: CPU3 sig=0x306c3, pf=0x2, revision=0x1c
 +
[    0.292956] 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
 +
 
 +
{{Note|The date displayed does not correspond to the version of the {{Pkg|intel-ucode}} package installed. It does show the last time Intel updated the microcode that corresponds to the specific hardware being updated.}}
  
Intel X3360:
+
== Which CPUs accept microcode updates ==
  
{{bc|1=microcode: CPU0 sig=0x10677, pf=0x10, revision=0x705
+
Users may consult either Intel or AMD at the following links to see if a particular model is supported:
microcode: CPU1 sig=0x10677, pf=0x10, revision=0x705
+
microcode: CPU2 sig=0x10677, pf=0x10, revision=0x705
+
microcode: CPU3 sig=0x10677, pf=0x10, revision=0x705
+
microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
+
microcode: CPU0 updated to revision 0x70a, date = 2010-09-29
+
microcode: CPU1 updated to revision 0x70a, date = 2010-09-29
+
microcode: CPU2 updated to revision 0x70a, date = 2010-09-29
+
microcode: CPU3 updated to revision 0x70a, date = 2010-09-29}}
+
  
Intel E5200:
+
* [http://www.amd64.org/microcode.html AMD's Operating System Research Center].
{{bc|1=microcode: CPU0 sig=0x1067a, pf=0x1, revision=0xa07
+
* [https://downloadcenter.intel.com/download/24661 Intel's download center].
microcode: CPU1 sig=0x1067a, pf=0x1, revision=0xa07
+
microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
+
microcode: CPU0 updated to revision 0xa0b, date = 2010-09-28
+
microcode: CPU1 updated to revision 0xa0b, date = 2010-09-28}}
+
  
Intel Atom 330:
+
=== Detecting available microcode update ===
{{bc|1=microcode: CPU0 sig=0x106c2, pf=0x8, revision=0x20d
+
microcode: CPU1 sig=0x106c2, pf=0x8, revision=0x20d
+
microcode: CPU2 sig=0x106c2, pf=0x8, revision=0x20d
+
microcode: CPU3 sig=0x106c2, pf=0x8, revision=0x20d
+
microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
+
microcode: CPU0 updated to revision 0x219, date = 2009-04-10
+
microcode: CPU1 updated to revision 0x219, date = 2009-04-10
+
microcode: CPU2 updated to revision 0x219, date = 2009-04-10
+
microcode: CPU3 updated to revision 0x219, date = 2009-04-10}}
+
  
It is believed that the date returned corresponds to the date that Intel implemented a microcode update. This date does not correspond to the version of the the microcode database included in the package!
+
It is possible to find out if the {{ic|intel-ucode.img}} contains a microcode image for the running CPU with {{AUR|iucode-tool}}.
  
==Which CPUs accept microcode updates==
+
* Install {{Pkg|intel-ucode}} (changing initrd is not required for detection)
 +
* Install {{AUR|iucode-tool}} from the [[AUR]]
 +
* {{ic|# modprobe cpuid}}
 +
* {{ic|<nowiki># bsdtar -Oxf /boot/intel-ucode.img | iucode_tool -tb -lS - </nowiki>}}
 +
:(extract microcode image and search it for your cpuid)
 +
* If an update is available, it should show up below ''selected microcodes''
 +
* The microcode might already be in your vendor bios and not show up loading in dmesg. Compare to the current microcode running {{ic|grep microcode /proc/cpuinfo}}
  
===AMD CPUs===
+
== Enabling Intel early microcode loading in custom kernels ==
  
According to [http://www.amd64.org/support/microcode.html AMD's Operating System Research Center], these CPUs support microcode updates:
+
In order for early loading to work in custom kernels, "CPU microcode loading support" needs to be compiled into the kernel, NOT compiled as a module. This will enable the "Early load microcode" prompt which should be set to "Y".
*AMD processor families 10h, 11h, 12h, 14h, and 15h
+
  
===Intel CPUs===
+
CONFIG_MICROCODE=y
 +
CONFIG_MICROCODE_INTEL=y
 +
CONFIG_MICROCODE_INTEL_EARLY=y
 +
CONFIG_MICROCODE_EARLY=y
  
According to [http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=21925&keyword=%22microcode%22&lang=eng Intel's download center], the following CPUs support microcode updates:
+
== See also ==
  
*Intel® Atom™ Processor
+
* [https://flossexperiences.wordpress.com/2013/11/17/updating-microcodes/ Updating microcodes]
*Intel® Atom™ processor for Entry Level Desktop PCs
+
* [http://inertiawar.com/microcode/ Notes on Intel Microcode updates]
*Intel® Celeron® Desktop Processor
+
* [https://www.kernel.org/doc/Documentation/x86/early-microcode.txt Kernel early microcode]
*Intel® Core™ Duo Processor
+
* [http://www.anandtech.com/show/8376/intel-disables-tsx-instructions-erratum-found-in-haswell-haswelleep-broadwelly Erratum found in Haswell/Broadwell]
*Intel® Core™ i3 Desktop Processor
+
* [https://gitlab.com/iucode-tool/iucode-tool Technical details]
*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
+

Latest revision as of 11:07, 18 August 2016

Processor manufacturers release stability and security updates to the processor microcode. While microcode can be updated through the BIOS, the Linux kernel is also able to apply these updates during boot. These updates provide bug fixes that can be critical to the stability of your system. Without these updates, you may experience spurious crashes or unexpected system halts that can be difficult to track down.

Users of CPUs belonging to the Intel Haswell and Broadwell processor families in particular must install these microcode updates to ensure system stability. But all Intel users should install the updates as a matter of course.

Installation

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

For Intel processors, install the intel-ucode package, and continue reading.

Enabling Intel microcode updates

Microcode must be loaded by the bootloader. Because of the wide variability in users' early-boot configuration, Intel microcode updates may not be triggered automatically by Arch's default configuration. Many AUR kernels have followed the path of the official Arch kernels in this regard.

These updates must be enabled by adding /boot/intel-ucode.img as the first initrd in the bootloader config file. This is in addition to the normal initrd file. See below for instructions for common bootloaders.

GRUB

Automatic method

grub-mkconfig will automatically detect the microcode update and configure GRUB appropriately. After installing the intel-ucode package, users are directed to regenerate the GRUB config to activate loading the microcode update by running:

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

Manual method

Alternatively, users that manage their GRUB config file manually can add /intel-ucode.img or /boot/intel-ucode.img to grub.cfg as follows:

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

Repeat it for each menu entry.

Warning: This file will automatically be overwritten by /usr/bin/grub-mkconfig during certain updates negating the changes. It is strongly recommended to use the configuration directory in /etc/grub.d/ to manage your GRUB configuration needs.

systemd-boot

Use the initrd option twice in /boot/loader/entries/entry.conf:

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

If you do not mount the ESP to /boot, copy /boot/intel-ucode.img to your EFI System Partition.

EFI boot stub / EFI handover

Append two initrd= options:

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

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: What does this do, why isn't the above enough and why/how is it specific to this particular section? (Discuss in Talk:Microcode#)

For kernels that have been generated as a single file containing all initrd, cmdline and kernel, first generate the initrd to integrate by creating a new one as follows:

cat /boot/intel-ucode.img /boot/initramfs-linux.img > my_new_initrd
objcopy ... --add-section .initrd=my_new_initrd

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=/boot/intel-ucode.img initrd=/boot/initramfs-linux.img"

Users employing manual stanzas in esp/EFI/refind/refind.conf to define the kernels should 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.

Syslinux

Note: There must be no spaces between the intel-ucode and initramfs-linux initrd files. The period signs also do not signify any shorthand or missing code; the INITRD line must be exactly as illustrated below.

Multiple initrd's can be separated by commas in /boot/syslinux/syslinux.cfg:

LABEL arch
    MENU LABEL Arch Linux
    LINUX ../vmlinuz-linux
    INITRD ../intel-ucode.img,../initramfs-linux.img
    APPEND <your kernel parameters>

LILO

LILO and potentially other old bootloaders do not support multiple initrd images. In that case, intel-ucode and initramfs-linux will have to be merged into one image.

Warning: The merged image must be recreated after each kernel update!
Note: The additional image, in this case intel-ucode must not be compressed. Otherwise, the kernel might complain that it can only find garbage in the uncompressed image and fail to boot.

intel-ucode.img should be a cpio archive, as in this case. It is advised to check whether the archive is compressed after each microcode update, as there is no guarantee that the image will stay non-compressed in the future. In order to check whether intel-ucode is compressed, you can use the file command:

$ file /boot/intel-ucode.img 
/boot/intel-ucode.img: ASCII cpio archive (SVR4 with no CRC)
Note: The order is important. The original image initramfs-linux must be concatenated on top of the intel-ucode image.

To merge both images into one image named initramfs-merged.img, the following command can be used:

# cat /boot/intel-ucode.img /boot/initramfs-linux.img > /boot/initramfs-merged.img

Now, edit /etc/lilo.conf to load the new image.

[...]
   initrd=/boot/initramfs-merged.img
[...]

And run lilo as root:

# lilo

Verifying that microcode got updated on boot

Use /usr/bin/dmesg to see if the microcode has been updated:

$ dmesg | grep microcode

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

[    0.000000] CPU0 microcode updated early to revision 0x1b, date = 2014-05-29
[    0.221951] CPU1 microcode updated early to revision 0x1b, date = 2014-05-29
[    0.242064] CPU2 microcode updated early to revision 0x1b, date = 2014-05-29
[    0.262349] CPU3 microcode updated early to revision 0x1b, date = 2014-05-29
[    0.507267] microcode: CPU0 sig=0x306a9, pf=0x2, revision=0x1b
[    0.507272] microcode: CPU1 sig=0x306a9, pf=0x2, revision=0x1b
[    0.507276] microcode: CPU2 sig=0x306a9, pf=0x2, revision=0x1b
[    0.507281] microcode: CPU3 sig=0x306a9, pf=0x2, revision=0x1b
[    0.507286] microcode: CPU4 sig=0x306a9, pf=0x2, revision=0x1b
[    0.507292] microcode: CPU5 sig=0x306a9, pf=0x2, revision=0x1b
[    0.507296] microcode: CPU6 sig=0x306a9, pf=0x2, revision=0x1b
[    0.507300] microcode: CPU7 sig=0x306a9, pf=0x2, revision=0x1b
[    0.507335] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba

It is entirely possible, particularly with newer hardware, that there is no microcode update for the CPU. In that case, the output may look like this:

[    0.292893] microcode: CPU0 sig=0x306c3, pf=0x2, revision=0x1c
[    0.292899] microcode: CPU1 sig=0x306c3, pf=0x2, revision=0x1c
[    0.292906] microcode: CPU2 sig=0x306c3, pf=0x2, revision=0x1c
[    0.292912] microcode: CPU3 sig=0x306c3, pf=0x2, revision=0x1c
[    0.292956] 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
Note: The date displayed does not correspond to the version of the intel-ucode package installed. It does show the last time Intel updated the microcode that corresponds to the specific hardware being updated.

Which CPUs accept microcode updates

Users may consult either Intel or AMD at the following links to see if a particular model is supported:

Detecting available microcode update

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

  • Install intel-ucode (changing initrd is not required for detection)
  • Install iucode-toolAUR from the 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
  • The microcode might already be in your vendor bios and not show up loading in dmesg. Compare to the current microcode running grep microcode /proc/cpuinfo

Enabling Intel early microcode loading in custom kernels

In order for early loading to work in custom kernels, "CPU microcode loading support" needs to be compiled into the kernel, NOT compiled as a module. This will enable the "Early load microcode" prompt which should be set to "Y".

CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL=y
CONFIG_MICROCODE_INTEL_EARLY=y
CONFIG_MICROCODE_EARLY=y

See also