Project

General

Profile

Actions

Bug #14991

open

Large AMD microcode does not load at boot

Added by Andy Fiddaman 7 days ago. Updated 4 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
kernel
Start date:
Due date:
% Done:

0%

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

Description

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
[0]> ::bp workaround_errata
[0]> :c
kmdb: stop at workaround_errata
kmdb: target stopped at:
workaround_errata:      pushq  %rbp
[0]> 8b::rdmsr
a001173

Related issues

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

Actions
Actions #1

Updated by Andy Fiddaman 7 days ago

Actions #2

Updated by Electric Monk 4 days ago

  • Gerrit CR set to 2385
Actions

Also available in: Atom PDF