Bug #14991


Large AMD microcode does not load at boot

Added by Andy Fiddaman over 1 year ago. Updated over 1 year ago.

Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:
External Bug:


I have been doing some testing of AMD CPU microcode loading on a newer AMD processor and found that it is not possible to get the microcode to load during boot, although it can be loaded later via the ucode driver.

Here's what happens during boot:

fffffffffbe95690 ucode_load_amd+7(fffffffffbe26340, fffffffffbe26330, fffffffffbe5a000)
fffffffffbe956c0 ucode_check+0xdd(fffffffffbe5a000)
fffffffffbe95730 mlsetup+0x5b8(fffffffffbe95748)
fffffffffbe95740 _locore_start+0x83()

[0]> ucode_amd::print struct ucode_ops write_msr
write_msr = 0xc0010020
[0]> fffffffffbe26340::print ucode_file_t amd
amd = 0x15c0b000

[0]> c0010020::wrmsr 15c0b000
kmdb: wrmsr failed: Error 13

The issue us that the data structure allocated to hold the microcode (ucode_file_amd_t) is too small for the modern files.

[0]> ::sizeof ucode_file_amd_t
sizeof (ucode_file_amd_t) = 0x1000

This processor signature is:

[0]> cpuid_info0::print cpi_std[1].cp_eax
cpi_std[1].cp_eax = 0xa00f11

Which maps to:

% amdeqdump usr/src/data/ucode/amd/equivalence-table | grep a00f11
Signature=0x00a00f11 Family=0x19 Model=0x01 Stepping=0x01 -> A011

and the A011 file is larger than 4KiB:

-rw-r--r--   1 af       other       5568 Sep 18 11:34 A011-00

After increasing the size of this structure, the microcode loads successfully:

[0]> 8b::rdmsr             <- This is Core::X86::Msr::PATCH_LEVEL
[0]> ::bp workaround_errata
[0]> :c
kmdb: stop at workaround_errata
kmdb: target stopped at:
workaround_errata:      pushq  %rbp
[0]> 8b::rdmsr

Related issues

Related to illumos gate - Feature #14848: Update AMD microcode to 202204ClosedAndy Fiddaman

Actions #1

Updated by Andy Fiddaman over 1 year ago

Actions #2

Updated by Electric Monk over 1 year ago

  • Gerrit CR set to 2385
Actions #3

Updated by Andy Fiddaman over 1 year ago

I've tested that AMD microcode update works on a number of machines, including the following. Only the first was successfully loading microcode before this change.

  • x86 (AuthenticAMD 830F10 family 23 model 49 step 0 clock 3000 MHz)
    AMD EPYC 7302 16-Core Processor [ Socket: SP3 ]
  • x86 (AuthenticAMD A00F11 family 25 model 1 step 1 clock 2650 MHz)
    AMD EPYC 7413 24-Core Processor
  • x86 (AuthenticAMD A00F11 family 25 model 1 step 1 clock 2000 MHz)
    AMD EPYC 7713P 64-Core Processor [ Socket: SP3 ]
Actions #4

Updated by Electric Monk over 1 year ago

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

git commit dd03b475cb030673a110ddade24162f09801d116

commit  dd03b475cb030673a110ddade24162f09801d116
Author: Andy Fiddaman <>
Date:   2022-10-06T11:44:57.000Z

    14991 Large AMD microcode does not load at boot
    14994 Panic on microcode update with UFS boot archive
    14995 misleading messages on microcode update failure
    14996 Restructure ucode data Makefiles
    15003 Corrupt AMD microcode equivalence-table not properly handled
    Reviewed by: Keith M Wesolowski <>
    Reviewed by: Marco van Wieringen <>
    Approved by: Dan McDonald <>


Also available in: Atom PDF