# Amd Zen µcode not loading ?

## Moonboots

With frequent motherboard bios updates for the Asus 350M-A , i have relied on those for any potential ucode updates.

But with "Spectre" bug i decided to update via the kernel following the instructions on  https://wiki.gentoo.org/wiki/AMD_microcode by adding amd-ucode/microcode_amd.bin amd-ucode/microcode_amd_fam17h.bin to the end of list of amdgpu firmware entries. But on rebooting and regarding dmesg i don't see any update and the patch_level is as before ?

My cpu is a Ryzen 1700  and https://wiki.gentoo.org/wiki/Project:Security/Vulnerabilities/Meltdown_and_Spectre mentions "A CPU microcode update was added which will disables branch prediction on AMD family 17h processors (800F12 only)"    

I haven't been able to find what 800F12 corresponds to ?

Any help would br gratefully received   :Smile: 

----------

## NeddySeagoon

Moonboots,

You also need 

```
CONFIG_MICROCODE_AMD=y
```

in your kernel.

Checx the build date/time of your running kernel as shown by 

```
uname -a
```

just in case you are not running the kernel you think you are.

When all is well, dmesg will show 

```
[    2.529716] microcode: microcode updated early to new patch_level=0x010000dc
```

or whatever the version is for Ryzen.

That's from my Phenom II.

----------

## Moonboots

NeddySeagoon

Thank you , but  CONFIG_MICROCODE_AMD=y is already in my kernel  by selecting "AMD microcode patch loading support"  from https://wiki.gentoo.org/wiki/AMD_microcode

I'm booting from efi stub kernel  without Initramfs , if that is potentially a problem ?

----------

## NeddySeagoon

Moonboots,

I have my microcode built into the kernel as that wiki page suggests.

I have an initrd too for raid and LVM but its strictly user space tools from 2009.

In short its not a problem.

Did you check that you are running the kernel you think you are?

```
uname -a

Linux NeddySeagoon_Static 4.15.0-rc4 #5 SMP PREEMPT Sat Jan 6 13:25:26 GMT 2018 x86_64 AMD Phenom(tm) II X6 1090T Processor AuthenticAMD GNU/Linux
```

Sat Jan 6 13:25:26 GMT 2018 is the build time of my running kernel.

----------

## marcuse

This doesn't work for me too, but as metioned here https://wiki.gentoo.org/wiki/Project:Security/Vulnerabilities/Meltdown_and_Spectre#sys-kernel.2Fgentoo-sources, the actual firmware is only for:  *Quote:*   

> AMD family 17h processors (800F12 only)

  These are the Zen server EPYC processors, so for the desktop Ryzens we have to wait it seems.

----------

## thumper

I had the same apparent failed results.

But then I saw this:

https://www.phoronix.com/scan.php?page=news_item&px=AMD-Branch-Prediction-Still

So now I'm not sure what to expect. 

George

----------

## Naib

AMD have stated they do not rely on a bios update to deal with spectre mitigation. I'll find the link

https://lkml.org/lkml/2018/1/5/383

https://lkml.org/lkml/2018/1/5/405

----------

## Moonboots

Thanks everyone

Yes Neddy i was running the expected kernel.  :Smile: 

@marcuse @thumper  Hopefully there will be more information on this µcode update in the coming days.

@Naib   There is a gatewaytime-out on both links at the moment, so i'll try later on.

----------

## Moonboots

Looks like we may see a microcode update for Ryzen soon ?

https://www.amd.com/en/corporate/speculative-execution

----------

