Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1043273: amd64-microcode: AMD SEV firmware files not loaded on matching systems

229 views
Skip to first unread message

Marko Karppinen

unread,
Aug 8, 2023, 6:40:04 AM8/8/23
to
Package: amd64-microcode
Version: 3.20230719.1~deb12u1
Severity: normal
X-Debbugs-Cc: ma...@karppinen.fi

Dear Maintainer,

For a few years now I've noticed errors like this in dmesg output:

> ccp 0000:43:00.1: firmware: failed to load amd/amd_sev_fam17h_model31h.sbin (-2)
> firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
> ccp 0000:43:00.1: firmware: failed to load amd/amd_sev_fam17h_model31h.sbin (-2)

Today I finally decided to look into this. It looks like amd64-microcode installs
the appropriate firmware for my system in /lib/firmware/amd/amd_sev_fam17h_model3xh.sbin
but the system does not understand it applies.

The linux-firmware.git commit message[1] says:

> SEV firmware files are to be placed in the "amd" directory and names
> should follow the pattern: amd_sev_fam<FAMILY>h_model<MODEL>h.sbin
>
> where FAMILY is the two-digit hexadecimal value of the target processor
> family (e.g. 17)
>
> where MODEL is the two-digit hexadecimal value of the target processor
> model (e.g. 01) or where the least significant nibble of the two-digit
> hexadecimal value can be an 'x' to indicate a range of models
> (e.g. 0x for 00 to of).

Armed with this information, I symlinked amd_sev_fam17h_model31h.sbin to
amd_sev_fam17h_model3xh.sbin and it now loads up fine:

> ccp 0000:43:00.1: firmware: direct-loading firmware amd/amd_sev_fam17h_model31h.sbin
> ccp 0000:43:00.1: SEV API:0.24 build:16

As a fix for this issue, would it make sense for amd64-microcode to include
symlinks for all of the possible model numbers (0-f for each 'x' in the file name)?

Thank you!
Marko

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=9ee52be785cf91fc6a3c6aa27d484873f8270b72

-- System Information:
Debian Release: 12.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-10-amd64 (SMP w/64 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

amd64-microcode depends on no packages.

Versions of packages amd64-microcode recommends:
ii initramfs-tools 0.142

amd64-microcode suggests no packages.

-- no debconf information

Diederik de Haas

unread,
Sep 11, 2023, 7:30:04 PM9/11/23
to
On Tue, 8 Aug 2023 13:41:56 +0300 Marko Karppinen <ma...@karppinen.fi> wrote:
> It seems nothing will make you understand an issue faster than filing your
> first ever Debian bug about it :)
>
> I noticed just now that the firmware loading *will* fall back to the correct
> file, it just happens after it has emitted the error lines:
>
> > [ 4.069026] ccp 0000:4a:00.1: firmware: failed to load amd/amd_sev_fam17h_model31h.sbin (-2)
> > [ 4.069293] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
> > [ 4.069597] ccp 0000:4a:00.1: firmware: failed to load amd/amd_sev_fam17h_model31h.sbin (-2)
> > [ 4.070002] ccp 0000:4a:00.1: firmware: direct-loading firmware amd/amd_sev_fam17h_model3xh.sbin
> > [ 4.102461] ccp 0000:4a:00.1: SEV API:0.24 build:16
>
> This is made somewhat more difficult to notice by the error lines being
> highlighted and the lines indicating success not. So while my proposed
> symlinks do eliminate the error output in red, they wouldn’t affect actual
> functionality.
>
> I think this issue can be closed.

AFAICT this is actually https://bugs.debian.org/1040738, which makes it a
kernel bug. As the maintainer has reassigned/merged #1051635 into this one
and thus to the amd64-microcode package, I'll leave reassigning it to src:linux
over to (one of) the maintainer(s).
signature.asc
0 new messages