Firmware updates for AMD CPUs

AMD has recently decided to add support for updating the firmware on its processors on amd64.org. The Linux instructions simply say that the “Microcode update for AMD processors uses the firmware loading infrastructure.” I wasn’t familiar with the firmware loading infrastructure, and it took some serious detective work to figure things out.

I did `aptitude install firmware-tools`

I then noticed (since firmware-tools does not appear to have any meaningful documentation) that /etc/firmware now exists. I then found
this message suggesting that the firmware should live in /etc/firmware, and this message suggesting a directory structure of amd-ucode/microcode_amd.bin. Well, that didn’t work. I received errors to the tune of:


microcode: CPU0: patch_level=0x1000065
platform microcode: firmware: requesting amd-ucode/microcode_amd.bin
microcode: failed to load file amd-ucode/microcode_amd.bin
microcode: CPU1: patch_level=0x1000065
platform microcode: firmware: requesting amd-ucode/microcode_amd.bin
microcode: failed to load file amd-ucode/microcode_amd.bin
microcode: CPU2: patch_level=0x1000065
platform microcode: firmware: requesting amd-ucode/microcode_amd.bin
microcode: failed to load file amd-ucode/microcode_amd.bin
microcode: CPU3: patch_level=0x1000065
platform microcode: firmware: requesting amd-ucode/microcode_amd.bin
microcode: failed to load file amd-ucode/microcode_amd.bin
Microcode Update Driver: v2.00 , Peter Oruba

I then ran a simple ‘locate firmware’ command and saw many instances in /lib/firmware. I moved amd-ucode/microcode_amd.bin into that directory, and received more meaningful feedback in `dmesg` (following rmmod microcode; modprobe microcode`):


microcode: CPU0: patch_level=0x1000065
platform microcode: firmware: requesting amd-ucode/microcode_amd.bin
microcode: size 1936, total_size 960
microcode: CPU0: patch mismatch (processor_rev_id: 1020, equiv_cpu_id: 1022)
microcode: size 968, total_size 960
microcode: CPU0: updated (new patch_level=0x1000083)
microcode: CPU1: patch_level=0x1000065
platform microcode: firmware: requesting amd-ucode/microcode_amd.bin
microcode: size 1936, total_size 960
microcode: CPU1: patch mismatch (processor_rev_id: 1020, equiv_cpu_id: 1022)
microcode: size 968, total_size 960
microcode: CPU1: updated (new patch_level=0x1000083)
microcode: CPU2: patch_level=0x1000065
platform microcode: firmware: requesting amd-ucode/microcode_amd.bin
microcode: size 1936, total_size 960
microcode: CPU2: patch mismatch (processor_rev_id: 1020, equiv_cpu_id: 1022)
microcode: size 968, total_size 960
microcode: CPU2: updated (new patch_level=0x1000083)
microcode: CPU3: patch_level=0x1000065
platform microcode: firmware: requesting amd-ucode/microcode_amd.bin
microcode: size 1936, total_size 960
microcode: CPU3: patch mismatch (processor_rev_id: 1020, equiv_cpu_id: 1022)
microcode: size 968, total_size 960
microcode: CPU3: updated (new patch_level=0x1000083)
Microcode Update Driver: v2.00 , Peter Oruba

It still doesn’t look perfect (i.e., it thinks the particular .bin file is not right for my CPU), but at least now I think I’m using the “firmware loading interface” successfully.

Many links to http://www.urbanmyth.org/microcode/ were also provided, but that site seems to be Intel-only.

UPDATE 2009/05/05:

It was working just fine. The microcode_amd.bin file contains more than one microcode patch, and it’s just an “eccentricity” of the microcode.ko module that it prints a warning about the mismatch.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s