AMD microcode

This article Article description::describes updating the [[microcode for AMD processors.]]

Emerge
Microcode updates for AMD processors are provided by package. Install the package via:

Configuration (initramfs)
There are multiple ways to update the microcode.

Initramfs
You can load the microcode with the initrd. This way the firmware blobs are not inside the kernel, which will instead look for them in the loaded initramfs.

linux-firmware method
The easiest method is to just enable the USE flag for  to get  and re-generate your initramfs.

Manual initramfs
First create the specified directory and into it. It doesn't have to be in but the  part is necessary.

Then we concatenate all the AMD firmware files into a single file. As before the path and filename of the output file must not be altered.

Then we will create a cpio archive in using  from :

GRUB2 configuration
Since the image file is one of the recognized ones by GRUB2 we just need to regenerate the grub config.

It should show that it found the file.

Kernel (Initrd)
In order to use any initrd, double check this kernel option is enabled (usually is):

Built-in firmware
This way the firmware files will be built directly into the kernel.

Kernel (built-in)
In order to load the CPU microcode the following kernel options should be enabled:

Firmware blob files selection
You can either include all the available AMD firmware files in the kernel or select just the specific one for your CPU.

All firmware files
Another option is to simply build all the firmware blobs into the kernel. This can be achieved by the following kernel optionsː

Specific firmware only
This way you only include the firmware suitable to your current CPU family. The CPU family identification can be obtained from :

In this example the CPU belongs to the AMD CPU family 22.

The following table helps to identify the right firmware blob file for given CPU family identificator:

The previously identified CPU specific firmware blob file (in this example CPU family 22) needs to be built into the kernelː

Rebuild the kernel
Rebuild and install the kernel as usual.

Verification
After the next reboot with the new kernel, you should see a similar output:

The first line contains the  log message in case a microcode update was performed during the boot.