Re: Problem with late AMD microcode reload/feedback

From: RafaÅ MiÅecki
Date: Sun Dec 16 2018 - 03:11:11 EST


On 16.12.2018 01:05, Borislav Petkov wrote:
On Sun, Dec 16, 2018 at 12:46:05AM +0100, RafaÅ MiÅecki wrote:
[19.736770] microcode: [find_equiv_id] sig:8458000

That's your CPU's family/model/stepping: 0x0810f10

[19.736772] microcode: [find_equiv_id] equiv_table->installed_cpu:8392466
[19.736775] microcode: [find_equiv_id] equiv_table->installed_cpu:8392578

and those are present on the system. Best to look at them in hex, btw:

0x0800f12
0x0800f82

Which means, there's no microcode for your CPU so nothing gets updated.

Thanks! I had no idea microcode_amd_fam17h.bin is a container with few
microcodes. I thought there is a single microcode for a whole family
(e.g. 17h).

Using hex also makes more sense indeed!
[ 44.127941] microcode: verify_and_add_patch: Added patch_id: 0x08001227, proc_id: 0x8012
[ 44.127948] microcode: verify_and_add_patch: Added patch_id: 0x0800820b, proc_id: 0x8082
[ 44.127952] microcode: [find_equiv_id] sig:0x810f10
[ 44.127955] microcode: [find_equiv_id] equiv_table->installed_cpu:0x800f12
[ 44.127958] microcode: [find_equiv_id] equiv_table->installed_cpu:0x800f82

So for now I'm stuck with the default/BIOS-uploaded microcode:
[ 2.604680] microcode: CPU0: patch_level=0x0810100b
[ 2.605617] microcode: CPU1: patch_level=0x0810100b
[ 2.606583] microcode: CPU2: patch_level=0x0810100b
[ 2.607528] microcode: CPU3: patch_level=0x0810100b
[ 2.608408] microcode: CPU4: patch_level=0x0810100b
[ 2.609285] microcode: CPU5: patch_level=0x0810100b
[ 2.610270] microcode: CPU6: patch_level=0x0810100b
[ 2.611135] microcode: CPU7: patch_level=0x0810100b

I've one more hacking idea. My notebook has Ryzen 5 PRO 2500U CPU but I
also have access to another one with Ryzen 5 2500U running:
[ 2.780949] microcode: CPU0: patch_level=0x08101007

For my hack tests I'd like to replace my 0x0810100b with a 0x08101007.
Is that possible to extract/dump current microcode from the CPU and
package it as microcode_amd_fam17h.bin?

Are there any ready tools for that?