Project

General

Profile

Actions

Feature #14848

closed

Update AMD microcode to 202204

Added by Andy Fiddaman 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

The AMD CPU microcode in gate dates from 2012, the latest publicly available microcode from AMD is dated April 2022, we should update the microcode in gate.

AMD now distribute several microcode files, grouped by processor family:

amd.bin
amd_fam15h.bin
amd_fam16h.bin
amd_fam17h.bin
amd_fam19h.bin

and each of these has its own equivalence table. We will likely need to merge these into a single table for the kernel to use.


Related issues

Related to illumos gate - Bug #14991: Large AMD microcode does not load at bootClosedAndy Fiddaman

Actions
Actions #1

Updated by Andy Fiddaman 5 months ago

  • Description updated (diff)
Actions #2

Updated by Andy Fiddaman 5 months ago

I've imported the latest AMD processor ucode and compared it to what we currently have in gate. Here are the differences:

 Equivalence table:
     00100F22 Family=10 Model=02 Stepping=02 -> 1022
     00100F23 Family=10 Model=02 Stepping=03 -> 1022
     00100F2A Family=10 Model=02 Stepping=0a -> 1020
     00100F42 Family=10 Model=04 Stepping=02 -> 1041
     00100F43 Family=10 Model=04 Stepping=03 -> 1043
     00100F52 Family=10 Model=05 Stepping=02 -> 1041
     00100F53 Family=10 Model=05 Stepping=03 -> 1043
     00100F62 Family=10 Model=06 Stepping=02 -> 1062
     00100F63 Family=10 Model=06 Stepping=03 -> 1043
     00100F80 Family=10 Model=08 Stepping=00 -> 1080
     00100F81 Family=10 Model=08 Stepping=01 -> 1081
     00100F91 Family=10 Model=09 Stepping=01 -> 1081
     00100FA0 Family=10 Model=0a Stepping=00 -> 10A0
+    00200F31 Family=11 Model=03 Stepping=01 -> 2031
     00300F10 Family=12 Model=01 Stepping=00 -> 3010
     00500F10 Family=14 Model=01 Stepping=00 -> 5010
     00500F20 Family=14 Model=02 Stepping=00 -> 5020
     00600F12 Family=15 Model=01 Stepping=02 -> 6012
+    00600F20 Family=15 Model=02 Stepping=00 -> 6020
+    00610F01 Family=15 Model=10 Stepping=01 -> 6101
+    00700F01 Family=16 Model=00 Stepping=01 -> 7001
+    00800F12 Family=17 Model=01 Stepping=02 -> 8012
+    00800F82 Family=17 Model=08 Stepping=02 -> 8082
+    00830F10 Family=17 Model=31 Stepping=00 -> 8310
+    00A00F10 Family=19 Model=01 Stepping=00 -> A010
+    00A00F11 Family=19 Model=01 Stepping=01 -> A011
+    00A00F12 Family=19 Model=01 Stepping=02 -> A012
 Microcode patches:
     1020 -> Patch=01000084 Date=05012008 Bytes=960
     1022 -> Patch=01000083 Date=04302008 Bytes=960
     1041 -> Patch=010000DB Date=10242011 Bytes=960
     1043 -> Patch=010000C8 Date=03112010 Bytes=960
     1062 -> Patch=010000C7 Date=03112010 Bytes=960
     1080 -> Patch=010000DA Date=10242011 Bytes=960
     1081 -> Patch=010000D9 Date=10122011 Bytes=960
     10A0 -> Patch=010000DC Date=10242011 Bytes=960
+    2031 -> Patch=02000032 Date=03062008 Bytes=512
     3010 -> Patch=03000027 Date=13092011 Bytes=960
-    5010 -> Patch=05000028 Date=11242010 Bytes=1824
+    5010 -> Patch=05000029 Date=01212013 Bytes=1568
-    5020 -> Patch=0500010D Date=10112011 Bytes=1568
+    5020 -> Patch=05000119 Date=01182013 Bytes=1568
-    6012 -> Patch=06000624 Date=10212011 Bytes=2592
+    6012 -> Patch=0600063E Date=02072018 Bytes=2592
+    6020 -> Patch=06000852 Date=02062018 Bytes=2592
+    6101 -> Patch=06001119 Date=07132012 Bytes=2592
+    7001 -> Patch=0700010F Date=02192014 Bytes=3458
+    8012 -> Patch=0800126E Date=11112021 Bytes=3200
+    8082 -> Patch=0800820D Date=04162019 Bytes=3200
+    8310 -> Patch=08301055 Date=02152022 Bytes=3200
+    A010 -> Patch=0A001058 Date=02102022 Bytes=5568
+    A011 -> Patch=0A001173 Date=01312022 Bytes=5568
+    A012 -> Patch=0A001229 Date=02102022 Bytes=5568
Actions #3

Updated by Electric Monk 5 months ago

  • Gerrit CR set to 2261
Actions #4

Updated by Andy Fiddaman 5 months ago

Testing

So far I have tested this change on a single AMD machine to which I have access.

Prior to installing the updated microcode package, all CPUs reported the same microcode version, which is older than the latest:

% cpuid | head
CPU 0:
Maximum basic CPUID leaf: 0x00000010

CPU vendor string: 'AuthenticAMD'

Signature:  0x00830f10
  Family:   0x17 (23)
  Model:    0x31 (49)
  Stepping: 0x00 (0)

# ucodeadm -v
0       0x830104d
...
31      0x830104d

I then installed the updated microcode package, relaxing the incorporation to allow that:

% pfexec pkg change-facet version-lock.system/microcode/amd=false
% pfexec pkg apply-hot-fix --be-name=ucodetest /tmp/amd-ucode.p5p
% pfexec init 6

and following the reboot, the newer microcode was shown against all processors:

# ucodeadm -v
CPU     Microcode Version
0       0x8301055
..
31      0x8301055

I also wrote a quick program (https://github.com/citrus-it/amdeqdump) to dump out the contents of the merged equivalence table to check it looked sound.

build% cargo run ~/omniosorg/bloody/illumos/usr/src/data/ucode/amd/equivalence-table
    Finished dev [unoptimized + debuginfo] target(s) in 0.06s
     Running `target/debug/amdeqdump /data/omnios-build/omniosorg/bloody/illumos/usr/src/data/ucode/amd/equivalence-table`
Signature=0x00100f80 Family=0x10 Model=0x08 Stepping=0x00 -> 1080
Signature=0x00100f81 Family=0x10 Model=0x08 Stepping=0x01 -> 1081
Signature=0x00100f62 Family=0x10 Model=0x06 Stepping=0x02 -> 1062
Signature=0x00100f23 Family=0x10 Model=0x02 Stepping=0x03 -> 1022
Signature=0x00100f43 Family=0x10 Model=0x04 Stepping=0x03 -> 1043
Signature=0x00100f91 Family=0x10 Model=0x09 Stepping=0x01 -> 1081
Signature=0x00100f2a Family=0x10 Model=0x02 Stepping=0x0a -> 1020
Signature=0x00100f63 Family=0x10 Model=0x06 Stepping=0x03 -> 1043
Signature=0x00100f42 Family=0x10 Model=0x04 Stepping=0x02 -> 1041
Signature=0x00300f10 Family=0x12 Model=0x01 Stepping=0x00 -> 3010
Signature=0x00200f31 Family=0x11 Model=0x03 Stepping=0x01 -> 2031
Signature=0x00100f52 Family=0x10 Model=0x05 Stepping=0x02 -> 1041
Signature=0x00100fa0 Family=0x10 Model=0x0a Stepping=0x00 -> 10A0
Signature=0x00100f53 Family=0x10 Model=0x05 Stepping=0x03 -> 1043
Signature=0x00100f22 Family=0x10 Model=0x02 Stepping=0x02 -> 1022
Signature=0x00500f10 Family=0x14 Model=0x01 Stepping=0x00 -> 5010
Signature=0x00500f20 Family=0x14 Model=0x02 Stepping=0x00 -> 5020
Signature=0x00600f20 Family=0x15 Model=0x02 Stepping=0x00 -> 6020
Signature=0x00610f01 Family=0x15 Model=0x10 Stepping=0x01 -> 6101
Signature=0x00600f12 Family=0x15 Model=0x01 Stepping=0x02 -> 6012
Signature=0x00700f01 Family=0x16 Model=0x00 Stepping=0x01 -> 7001
Signature=0x00800f82 Family=0x17 Model=0x08 Stepping=0x02 -> 8082
Signature=0x00800f12 Family=0x17 Model=0x01 Stepping=0x02 -> 8012
Signature=0x00830f10 Family=0x17 Model=0x31 Stepping=0x00 -> 8310
Signature=0x00a00f10 Family=0x19 Model=0x01 Stepping=0x00 -> A010
Signature=0x00a00f11 Family=0x19 Model=0x01 Stepping=0x01 -> A011
Signature=0x00a00f12 Family=0x19 Model=0x01 Stepping=0x02 -> A012

and in doing all of this, I've been exercising the new ucodeadm -l in order to see what's inside the firmware files.

Actions #5

Updated by Andy Fiddaman 4 months ago

I also received reports from two people in the community who have tried this update on servers with the same processor signature as my test box. They were previously on 0x8301034 and 0x830101c respectively and confirmed that the microcode was reported as 0x8301055 after applying the change.

I also had confirmation from somebody with an AMD CPU for which no ucode update was available (0x00870f10) that no problems were encountered after applying this change.

Actions #6

Updated by Electric Monk 4 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit be672c8e21cc446e1091014ae0ad206f6b8c1d55

commit  be672c8e21cc446e1091014ae0ad206f6b8c1d55
Author: Andy Fiddaman <illumos@fiddaman.net>
Date:   2022-08-04T13:49:42.000Z

    14848 Update AMD microcode to 202204
    Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

Actions #7

Updated by Andy Fiddaman 3 months ago

  • Related to Bug #14991: Large AMD microcode does not load at boot added
Actions

Also available in: Atom PDF