Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is microcode being applied?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Hammett
Apprentice
Apprentice


Joined: 26 Jan 2005
Posts: 223
Location: Barcelona, Catalonia

PostPosted: Tue Mar 26, 2024 12:51 pm    Post subject: Is microcode being applied? Reply with quote

Hi all,

I am having serious doubts I am applying correctly the AMD microcode for my Ryzen 3600.
I have followed the instructions on https://wiki.gentoo.org/wiki/AMD_microcode, although the screenshots are a bit different from the current kernel (6.8.1)

I have decided to load the microcode into the kernel, and not use an initramfs. This (if I understood correctly) should build the microcode right into the kernel and I do not need anything else.
Code:
-*-Firmware loading facility
(amd-ucode/microcode_amd_fam17h.bin) Build named firmware blobs into the kernel binary
(/lib/firmware) Firmware blobs root directory
[] Enable the firmware sysfs fallback mechanism
[] Enable compressed firmware support
[] Enable users to initiate firmware updates using sysfs


However, when I compile and boot the kernel, I don't see the "microcode: updated early" message in dmesg. In fact I see two kind of messages, depending on the kernel:

Kernel 6.6.2:
Code:
[hammett][/home/hammett] dmesg | grep micro
[Tue Mar 26 10:48:34 2024] Zenbleed: please update your microcode for the most optimal fix
[Tue Mar 26 10:48:34 2024] Speculative Return Stack Overflow: IBPB-extending microcode not applied!
[Tue Mar 26 10:48:35 2024] microcode: CPU0: patch_level=0x08701021
[Tue Mar 26 10:48:35 2024] microcode: CPU1: patch_level=0x08701021
[Tue Mar 26 10:48:35 2024] microcode: CPU2: patch_level=0x08701021
[Tue Mar 26 10:48:35 2024] microcode: CPU5: patch_level=0x08701021
[Tue Mar 26 10:48:35 2024] microcode: CPU3: patch_level=0x08701021
[Tue Mar 26 10:48:35 2024] microcode: CPU6: patch_level=0x08701021
[Tue Mar 26 10:48:35 2024] microcode: CPU7: patch_level=0x08701021
[Tue Mar 26 10:48:35 2024] microcode: CPU4: patch_level=0x08701021
[Tue Mar 26 10:48:35 2024] microcode: CPU8: patch_level=0x08701021
[Tue Mar 26 10:48:35 2024] microcode: CPU9: patch_level=0x08701021
[Tue Mar 26 10:48:35 2024] microcode: CPU10: patch_level=0x08701021
[Tue Mar 26 10:48:35 2024] microcode: CPU11: patch_level=0x08701021
[Tue Mar 26 10:48:35 2024] microcode: Microcode Update Driver: v2.2.


Kernel 6.8.1:
Code:
[hammett][/home/hammett] dmesg | grep micro
[Tue Mar 26 10:45:45 2024] Zenbleed: please update your microcode for the most optimal fix
[Tue Mar 26 10:45:45 2024] microcode: Current revision: 0x08701021


I am not seeing any firmware files being applied:
Code:
[hammett][/home/hammett]$ dmesg | grep -i firmware
[Tue Mar 26 13:29:42 2024] Spectre V2 : Enabling Speculation Barrier for firmware calls
[Tue Mar 26 13:29:42 2024] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[Tue Mar 26 13:29:43 2024] acpi PNP0A08:00: [Firmware Info]: ECAM [mem 0xf0000000-0xf7ffffff] for domain 0000 [bus 00-7f] only partially covers this bridge


Moreover, it seems that patch 0x08701021 is not the most recent one either according to the readme of the AMD Microcode
Code:
Microcode patches in microcode_amd_fam17h.bin:
  Family=0x17 Model=0x08 Stepping=0x02: Patch=0x0800820d Length=3200 bytes
  Family=0x17 Model=0x31 Stepping=0x00: Patch=0x0830107b Length=3200 bytes
  Family=0x17 Model=0xa0 Stepping=0x00: Patch=0x08a00008 Length=3200 bytes
  Family=0x17 Model=0x01 Stepping=0x02: Patch=0x0800126e Length=3200 bytes


So, is there anything wrong? I would like to avoid using an initramfs if possible, and according to the wiki, this should be possible.

Also to understand if the different dmesg output between kernels means that they just changed the log output, or it is definitely not applied in kernel 6.8.1 (which would be another issue, since is compiled with make olddefconfig from 6.6.2)
_________________
I don't fear the people. I fear the demon inside them.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4157
Location: Bavaria

PostPosted: Tue Mar 26, 2024 1:00 pm    Post subject: Re: Is microcode being applied? Reply with quote

Hammett wrote:
However, when I compile and boot the kernel, I don't see the "microcode: updated early" message in dmesg.

It's okay; this has been removed (for both: your AMD system and my Intel system).

Hammett wrote:
[...] In fact I see two kind of messages, depending on the kernel:

Yes, this has changed between 6.6 and 6.8, and your settings in 6.8 should be okay when you did a "make oldconfig" or "make olddefconfig" !
(you dont see the microcode loading when you grep for firmware)
This line (in 6.8 ) says it is all fine:
Code:
[Tue Mar 26 10:45:45 2024] microcode: Current revision: 0x08701021



(P.S.: Do you have sys-kernel/linux-firmware from 20240312 ?)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Hammett
Apprentice
Apprentice


Joined: 26 Jan 2005
Posts: 223
Location: Barcelona, Catalonia

PostPosted: Tue Mar 26, 2024 1:59 pm    Post subject: Re: Is microcode being applied? Reply with quote

pietinger wrote:
(P.S.: Do you have sys-kernel/linux-firmware from 20240312 ?)


Yes, I do have sys-kernel/linux-firmware from 20240312 installed

Thanks for the reply! Good to know everything is in order.
The only missing piece of the puzzle, is why I do get applied a patch different from the ones available in the bin microcode file.... :roll:

Kind regards
_________________
I don't fear the people. I fear the demon inside them.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2963
Location: Edge of marsh USA

PostPosted: Sat Mar 30, 2024 2:33 am    Post subject: Reply with quote

With gentoo-sources-6.8.1
Code:
$ dmesg | grep microc
[Thu Mar 28 09:22:49 2024] microcode: Current revision: 0x0000002f
[Thu Mar 28 09:22:49 2024] microcode: Updated early from: 0x00000023

ADDED: This is on an Intel i7
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2963
Location: Edge of marsh USA

PostPosted: Sun Mar 31, 2024 4:06 am    Post subject: Reply with quote

This is on an AMD Phenom and Kernel gentoo-sources-6.1.74:
Code:
$ dmesg | grep -i microc
[Tue Mar 26 13:23:04 2024] [drm] Loading RS780 Microcode
[Tue Mar 26 13:23:05 2024] microcode: CPU0: patch_level=0x01000095
[Tue Mar 26 13:23:05 2024] microcode: CPU1: patch_level=0x01000095
[Tue Mar 26 13:23:05 2024] microcode: CPU2: patch_level=0x01000095
[Tue Mar 26 13:23:05 2024] microcode: Microcode Update Driver: v2.2.

_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum