You are not logged in.
Hello, everyone. This is my first post.
I've been using UKIs to load Arch Linux for a while. Since sbupdate is no longer maintained, I've switched to mkinitcpio UKI generation and sbctl signing. That's when I noticed that, apparently, the microcode in my AMD Ryzen 9 5950X is not being loaded (or is non-existent), since the patch_level is reported as 0x00000000:
$ journalctl -k --grep=microcode
ago 26 08:49:50 archlinux kernel: Speculative Return Stack Overflow: IBPB-extending microcode not applied!
ago 26 08:49:50 archlinux kernel: Speculative Return Stack Overflow: Mitigation: safe RET, no microcode
ago 26 08:49:50 archlinux kernel: microcode: CPU1: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU0: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU2: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU4: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU5: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU6: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU3: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU7: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU8: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU9: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU10: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU11: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU12: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU13: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU14: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU15: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU16: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU18: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU17: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU21: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU20: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU23: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU22: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU24: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU25: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU26: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU27: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU28: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU19: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU29: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU30: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: CPU31: patch_level=0x00000000
ago 26 08:49:50 archlinux kernel: microcode: Microcode Update Driver: v2.2.
Is it because something went wrong when loading the microcode, or because there are not updates for my CPU model?
Pertinent info:
$ journalctl -b | grep smpboot
ago 26 08:49:50 archlinux kernel: smpboot: Allowing 32 CPUs, 0 hotplug CPUs
ago 26 08:49:50 archlinux kernel: smpboot: CPU0: AMD Ryzen 9 5950X 16-Core Processor (family: 0x19, model: 0x21, stepping: 0x2)
ago 26 08:49:50 archlinux kernel: smpboot: Max logical packages: 1
ago 26 08:49:50 archlinux kernel: smpboot: Total of 32 processors activated (217189.50 BogoMIPS)
Thanks for any help.
Offline
Did you include the microcode image in your UKI?
Offline
Did you include the microcode image in your UKI?
Thanks for replying. Yes, I did, within the mkinitcpio preset:
$ cat /etc/mkinitcpio.d/linux.preset
# mkinitcpio preset file for the 'linux' package
#ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"
ALL_microcode=(/boot/*-ucode.img)
PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
default_uki="/efi/EFI/Arch/arch-linux.efi"
default_options="--splash /usr/share/systemd/bootctl/splash-arch.bmp"
#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
#fallback_uki="/efi/EFI/Linux/arch-linux-fallback.efi"
fallback_options="-S autodetect"
$ ls /boot/*-ucode.img
.rw-r--r-- 82k root 9 ago 22:33 /boot/amd-ucode.img
The mkinitcpio generation process lists the microcode as being included:
# mkinitcpio --preset linux
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux -U /efi/EFI/Arch/arch-linux.efi -g /boot/initramfs-linux.img --splash /usr/share/systemd/bootctl/splash-arch.bmp --mic
rocode /boot/amd-ucode.img
==> Starting build: '6.4.12-arch1-1'
-> Running build hook: [base]
-> Running build hook: [systemd]
-> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
-> Running build hook: [autodetect]
-> Running build hook: [sd-vconsole]
-> Running build hook: [numlock]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [sd-encrypt]
-> Running build hook: [btrfs]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
==> Image generation successful
==> Creating unified kernel image: '/efi/EFI/Arch/arch-linux.efi'
-> Using UEFI stub: '/usr/lib/systemd/boot/efi/linuxx64.efi.stub'
-> Using os-release file: '/etc/os-release'
-> Using cmdline file: '/etc/kernel/cmdline'
-> Using splash image: '/usr/share/systemd/bootctl/splash-arch.bmp'
-> Using kernel image: '/boot/vmlinuz-linux'
-> Using microcode image: '/boot/amd-ucode.img'
==> Unified kernel image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect --microcode /boot/amd-ucode.img
==> Starting build: '6.4.12-arch1-1'
-> Running build hook: [base]
-> Running build hook: [systemd]
-> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
-> Running build hook: [sd-vconsole]
-> Running build hook: [numlock]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'wd719x'
-> Running build hook: [sd-encrypt]
-> Running build hook: [btrfs]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-fallback.img'
==> Image generation successful
Regards.
Offline
Did you have a different patch level at some time in the past, i.e. before you changed your UKI setup? Try "journalctl --grep=microcode", i.e. omit the "-k" flag, which implies "-b", i.e. only the current boot.
Offline
Did you have a different patch level at some time in the past, i.e. before you changed your UKI setup? Try "journalctl --grep=microcode", i.e. omit the "-k" flag, which implies "-b", i.e. only the current boot.
My logs rotated a couple of weeks ago, so first one is from 12th August. Patch level is the same:
ago 12 19:33:01 archlinux kernel: Speculative Return Stack Overflow: IBPB-extending microcode not applied!
ago 12 19:33:01 archlinux kernel: Speculative Return Stack Overflow: Mitigation: safe RET, no microcode
ago 12 19:33:01 archlinux kernel: microcode: CPU0: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU1: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU3: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU4: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU2: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU5: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU6: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU7: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU8: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU9: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU10: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU11: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU12: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU13: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU14: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU15: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU16: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU17: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU19: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU20: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU22: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU21: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU23: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU24: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU25: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU26: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU18: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU27: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU28: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU29: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU30: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: CPU31: patch_level=0x00000000
ago 12 19:33:01 archlinux kernel: microcode: Microcode Update Driver: v2.2.
Thanks again.
Offline
So presumably there's no microcode for your CPU? Did you check whether your CPU family and model (per eg lscpu) do appear in the list of microcode patches (see https://git.kernel.org/pub/scm/linux/ke … ode/README, though I don't know whether that list is up to date, but it does refer to a script which lets you extract the list from the raw microcode binaries).
Offline
I have the 5950X and this is what I see booting normally:
% dmesg|grep micro
[ +0.000003] Speculative Return Stack Overflow: IBPB-extending microcode not applied!
[ +0.000001] Speculative Return Stack Overflow: Mitigation: safe RET, no microcode
[ +0.002345] microcode: CPU7: patch_level=0x0a201025
[ +0.000001] microcode: CPU9: patch_level=0x0a201025
...
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
ago 26 08:49:50 archlinux kernel: smpboot: CPU0: AMD Ryzen 9 5950X 16-Core Processor (family: 0x19, model: 0x21, stepping: 0x2)
@graysky is the 5950X you have also stepping 2?
Offline
So presumably there's no microcode for your CPU? Did you check whether your CPU family and model (per eg lscpu) do appear in the list of microcode patches (see https://git.kernel.org/pub/scm/linux/ke … ode/README, though I don't know whether that list is up to date, but it does refer to a script which lets you extract the list from the raw microcode binaries).
I've used the linked script. Apparently, there's not microcode for my CPU:
$ python amd_ucode_info.py /lib/firmware/amd-ucode/microcode_amd_fam19h.bin
Microcode patches in /lib/firmware/amd-ucode/microcode_amd_fam19h.bin:
Family=0x19 Model=0x11 Stepping=0x01: Patch=0x0a10113e Length=5568 bytes
Family=0x19 Model=0x11 Stepping=0x02: Patch=0x0a10123e Length=5568 bytes
Family=0x19 Model=0xa0 Stepping=0x02: Patch=0x0aa00212 Length=5568 bytes
Family=0x19 Model=0x01 Stepping=0x01: Patch=0x0a0011d1 Length=5568 bytes
Family=0x19 Model=0x01 Stepping=0x00: Patch=0x0a001079 Length=5568 bytes
Family=0x19 Model=0x01 Stepping=0x02: Patch=0x0a001234 Length=5568 bytes
Family=0x19 Model=0xa0 Stepping=0x01: Patch=0x0aa00116 Length=5568 bytes
ago 26 08:49:50 archlinux kernel: smpboot: CPU0: AMD Ryzen 9 5950X 16-Core Processor (family: 0x19, model: 0x21, stepping: 0x2)
Thanks again.
Offline
No, didn't pay attention to stepping, for the record:
[ +0.108754] smpboot: CPU0: AMD Ryzen 9 5950X 16-Core Processor (family: 0x19, model: 0x21, stepping: 0x0)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
No, didn't pay attention to stepping, for the record:
[ +0.108754] smpboot: CPU0: AMD Ryzen 9 5950X 16-Core Processor (family: 0x19, model: 0x21, stepping: 0x0)
Are you using amd-ucode? Thanks
Offline
So if i have
$ journalctl -k --grep=microcode
Aug 30 17:54:09 45u5 kernel: Zenbleed: please update your microcode for the most optimal fix
Aug 30 17:54:09 45u5 kernel: microcode: CPU2: patch_level=0x08600106
... [ all cpu patch levels are the same ]
Aug 30 17:54:09 45u5 kernel: microcode: CPU14: patch_level=0x08600106
Aug 30 17:54:09 45u5 kernel: microcode: Microcode Update Driver: v2.2.
$ journalctl -b | grep smpboot
CPU0: AMD Ryzen 7 4800H with Radeon Graphics (family: 0x17, model: 0x60, stepping: 0x1)
And this specific model is not present on https://git.kernel.org/pub/scm/linux/ke … ode/README or in the ./amd_ucode_info.py script's output
do you know how could i update my µcode in such situation ?
im using UKI + sbctl too but that seams irrelevant in this situation
Last edited by krzysztof1222 (2023-09-03 15:45:47)
Offline
@krzysztof1222 see https://bbs.archlinux.org/viewtopic.php … 5#p2116955
Offline
Are you using amd-ucode? Thanks
Yes.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
@krzysztof1222 see https://bbs.archlinux.org/viewtopic.php … 5#p2116955
This fixed my issue. Had to update motherboard BIOS:
[ 0.298489] Speculative Return Stack Overflow: IBPB-extending microcode not applied!
[ 0.298490] Speculative Return Stack Overflow: Mitigation: safe RET, no microcode
[ 0.716383] microcode: CPU0: patch_level=0x0a20120a
[ 0.716384] microcode: CPU1: patch_level=0x0a20120a
[ 0.716385] microcode: CPU3: patch_level=0x0a20120a
[ 0.716386] microcode: CPU4: patch_level=0x0a20120a
[ 0.716387] microcode: CPU5: patch_level=0x0a20120a
[ 0.716387] microcode: CPU6: patch_level=0x0a20120a
[ 0.716388] microcode: CPU7: patch_level=0x0a20120a
[ 0.716390] microcode: CPU8: patch_level=0x0a20120a
[ 0.716390] microcode: CPU9: patch_level=0x0a20120a
[ 0.716391] microcode: CPU10: patch_level=0x0a20120a
[ 0.716392] microcode: CPU11: patch_level=0x0a20120a
[ 0.716393] microcode: CPU12: patch_level=0x0a20120a
[ 0.716394] microcode: CPU13: patch_level=0x0a20120a
[ 0.716395] microcode: CPU14: patch_level=0x0a20120a
[ 0.716396] microcode: CPU15: patch_level=0x0a20120a
[ 0.716396] microcode: CPU16: patch_level=0x0a20120a
[ 0.716397] microcode: CPU17: patch_level=0x0a20120a
[ 0.716398] microcode: CPU19: patch_level=0x0a20120a
[ 0.716398] microcode: CPU18: patch_level=0x0a20120a
[ 0.716399] microcode: CPU20: patch_level=0x0a20120a
[ 0.716400] microcode: CPU21: patch_level=0x0a20120a
[ 0.716401] microcode: CPU22: patch_level=0x0a20120a
[ 0.716402] microcode: CPU23: patch_level=0x0a20120a
[ 0.716404] microcode: CPU24: patch_level=0x0a20120a
[ 0.716404] microcode: CPU25: patch_level=0x0a20120a
[ 0.716405] microcode: CPU26: patch_level=0x0a20120a
[ 0.716407] microcode: CPU27: patch_level=0x0a20120a
[ 0.716408] microcode: CPU2: patch_level=0x0a20120a
[ 0.716408] microcode: CPU28: patch_level=0x0a20120a
[ 0.716409] microcode: CPU29: patch_level=0x0a20120a
[ 0.716410] microcode: CPU31: patch_level=0x0a20120a
[ 0.716409] microcode: CPU30: patch_level=0x0a20120a
[ 0.716448] microcode: Microcode Update Driver: v2.2.
Thanks, everyone.
Offline
This is how I updated the Inception firmware on my 5950X: https://bbs.archlinux.org/viewtopic.php … 7#p2121607
Excuse my poor English.
Offline