Microcode updates for CPUs and other devices

Many recent devices can be updated “in the field” with firmware or microcode updates, including such as CPUs, GPUs, wireless devices, USB devices, and others. Indeed, some USB devices are dumb and unprogrammed and go through a boot-up sequence whereby their firmware must be squirted to them over the USB to get them to do anything useful.

Which comes to CPU microcode updates:

Such updates are (recently) supported by PC BIOS/EFI and automatically load up any appropriate microcode patches to the CPU upon power-up.

The Linux kernel also supports loading microcode patches to a CPU during boot-up which allows you to apply patches that are possibly more recent than those made available by the motherboard vendor’s BIOS/EFI.

For Gentoo, a succinct summary is given by “AMD microcode” and “Intel microcode“. That should all be taken care of ‘automagically’ by the Gentoo genkernel and by the various other major distros.

However, uncertainly, there are these notes:

The CPU microcode updates are a Good Idea. Perhaps the safest bet at the moment is to get whatever latest CPU microcode updates are available by updating your BIOS/EFI from your motherboard vendor. (You might benefit from other fixes to the motherboard also.)

All a continuous game of vendors getting their hardware out into the field before finalizing their software?…

1 comment to Microcode updates for CPUs and other devices

  • Martin L

    Looks like this has been fixed for Gentoo updating AMD CPU microcode.

    Various bug reports have been cleared for downloading the microcode, the licensing, and to incorporate what was in the separate “amd-ucode-2012.09.10” to instead become part of the more general and understandable “sys-kernel/linux-firmware”.

    All very nicely done! See the now old closed bugs for:

    Bug 455208 – Remove sys-firmware/amd-ucode (WAS: sys-firmware/amd-ucode-2012.09.10 – ebuild SRC_URI no longer available)
    Bug 475380 – sys-firmware/amd-ucode – https://amd64.org/ is down
    Bug 485376 – =sys-kernel/linux-firmware-20130728 please stabilize

    Note that you also need to have “CONFIG_MICROCODE=y” (or “=m”) and “CONFIG_MICROCODE_AMD=y” compiled into any custom kernels to take advantage of this for the later CPUs from AMD that support microcode loading.

    For the time being, support for Intel CPU microcode loading looks to remain in the separate “sys-apps/microcode-ctl” and “sys-apps/microcode-data” packages.

    Nicely done for the AMD CPU updates.

    Further details for what to see/expect:


    # emerge -pvDu amd-ucode

    These are the packages that would be merged, in order:

    Calculating dependencies... done!

    [ebuild N ] sys-firmware/amd-ucode-2012.09.10 70 kB
    [blocks B ] sys-firmware/amd-ucode ("sys-firmware/amd-ucode" is blocking sys-kernel/linux-firmware-20130728)

    Total: 1 package (1 new), Size of downloads: 70 kB
    Conflict: 1 block (1 unsatisfied)

    * Error: The above package list contains packages which cannot be
    * installed at the same time on the same system.

    (sys-firmware/amd-ucode-2012.09.10::gentoo, ebuild scheduled for merge) pulled in by
    amd-ucode

    (sys-kernel/linux-firmware-20130728::gentoo, installed) pulled in by
    sys-kernel/linux-firmware required by @selected

    For more information about Blocked Packages, please refer to the following
    section of the Gentoo Linux x86 Handbook (architecture is irrelevant):

    https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1#blocked

     

    The above is now expected due to the ucode data being included in “sys-kernel/linux-firmware”. Hence, “sys-firmware/amd-ucode” should no longer be attempted.

    “/etc/portage/savedconfig/sys-kernel/linux-firmware-20130728” lists:


    [...]
    amd-ucode/microcode_amd.bin
    amd-ucode/microcode_amd.bin.asc
    amd-ucode/microcode_amd_fam15h.bin
    amd-ucode/microcode_amd_fam15h.bin.asc
    [...]

     

    Use:

    emerge -vD sys-kernel/linux-firmware

    to ensure you have it (along with the firmware for various other commonly used devices).

     

    Now, during boot for a certain dual-core AMD system of mine, I see in the boot log:

    … kernel: microcode: CPU0: patch_level=0x05000101
    … kernel: microcode: CPU0: new patch_level=0x05000119
    … kernel: microcode: CPU1: patch_level=0x05000101
    … kernel: microcode: CPU1: new patch_level=0x05000119
    … kernel: microcode: Microcode Update Driver: v2.00 tigran -at- aivazian fsnet co uk, Peter Oruba

    Good work from the Gentoo maintainers!

Leave a Reply