Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] AMD microcode not loaded
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Sat Jan 02, 2016 11:43 pm    Post subject: [Solved] AMD microcode not loaded Reply with quote

I followed the steps in this article exactly. However, my system is still not using the correct microcode:

Code:

$ dmesg | grep microcode
[    0.660850] microcode: CPU0: patch_level=0x01000095
[    0.660947] microcode: CPU1: patch_level=0x01000095
[    0.661097] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba


Full dmesg here.

My kernel configuration:

Code:

Processor type and features  --->
    <*> CPU microcode loading support
    [ ]   Intel microcode loading support
    [*]   AMD microcode loading support

Device Drivers  --->
    Generic Driver Options
        -*- Userspace firmware loading support
        (amd-ucode/microcode_amd.bin amd-ucode/microcode_amd_fam15h.bin) External firmware blobs to build into the kernel binary
        (/lib/firmware) Firmware blobs root directory


After make && make modules_install && make_install && reboot, I confirmed that I am running the correct kernel version:

Code:

$ uname -v
#6 SMP Sat Jan 2 15:07:23 MST 2016

$ ls -l /usr/src/linux/arch/x86/boot/bzImage
-rw-r--r-- 1 root root 549880 Jan  2 15:07 /usr/src/linux/arch/x86/boot/bzImage


The firmware blobs are where they ought to be:

Code:

$ ls /lib/firmware/amd-ucode/
microcode_amd.bin  microcode_amd.bin.asc  microcode_amd_fam15h.bin  microcode_amd_fam15h.bin.asc  microcode_amd_fam16h.bin  microcode_amd_fam16h.bin.asc


The package I installed to get the firmware is linux-firmware.

Edit: apparently I should be using microcode_amd_fam16h.bin instead since my CPU family is 16. (See output of lspcu here.) But even after changing the name of the firmware blob in kernel config and then rebuilding, resintalling, and rebooting it isn't updating the microcode.

Edit 2: I installed the latest BIOS for my mobo (ASUS M4A78 Pro AM2+ 780G) on the off chance it contained the latest microcode. It's still using the same one according to dmesg.


Last edited by Astronome on Tue Feb 02, 2016 4:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
Keruskerfuerst
Advocate
Advocate


Joined: 01 Feb 2006
Posts: 2288
Location: near Augsburg, Germany

PostPosted: Sun Jan 10, 2016 4:33 pm    Post subject: Reply with quote

The microcode of the CPU is updated when the Bios is updated.

If you want this, then ....
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43221
Location: 56N 3W

PostPosted: Sun Jan 10, 2016 7:16 pm    Post subject: Reply with quote

Keruskerfuerst,

It can also be updated during the boot process.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Mon Jan 11, 2016 5:39 pm    Post subject: Reply with quote

Keruskerfuerst wrote:
The microcode of the CPU is updated when the Bios is updated.


Yes, I know, which is why I tried updating the BIOS.

It would be really helpful if I knew what the patch level should be in dmesg, or if 0x01000095 is correct. Anyone know of a good list? AMD's own microcode homepage is really light on info.
Back to top
View user's profile Send private message
Keruskerfuerst
Advocate
Advocate


Joined: 01 Feb 2006
Posts: 2288
Location: near Augsburg, Germany

PostPosted: Tue Jan 12, 2016 8:15 am    Post subject: Reply with quote

What Bios version is included in microcode firmware file?
Back to top
View user's profile Send private message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Wed Jan 13, 2016 3:20 am    Post subject: Reply with quote

Keruskerfuerst wrote:
What Bios version is included in microcode firmware file?


I'm not sure how to find this out. I thought maybe by looking in the archive at /usr/portage/distfiles/linux-firmware-20150812.tar.xz, but that only contains the binary files.

I also looked in the repository for linux-firmware but it is the same story.

Any ideas?
Back to top
View user's profile Send private message
Keruskerfuerst
Advocate
Advocate


Joined: 01 Feb 2006
Posts: 2288
Location: near Augsburg, Germany

PostPosted: Wed Jan 13, 2016 5:47 pm    Post subject: Reply with quote

Usually the lastest microcode for the cpu is updated with the bios update.
Back to top
View user's profile Send private message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Tue Feb 02, 2016 4:44 pm    Post subject: Reply with quote

I figured out that the microcode is actually being loaded. After removing microcode support from the kernel, both as a module and built-in, there was nothing in dmesg about any microcode. (I was concerned that it was using an older one by default.) I added it back in as a module and the message reappeared:

Code:

$ dmesg | grep microcode
[    0.660850] microcode: CPU0: patch_level=0x01000095
[    0.660947] microcode: CPU1: patch_level=0x01000095
[    0.661097] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba


Then I added it using the firmware blobs built into the kernel and verified the message was still there. So I'm going to assume 0x01000095 is correct.
Back to top
View user's profile Send private message
g2g591
Apprentice
Apprentice


Joined: 17 Sep 2007
Posts: 185

PostPosted: Mon Feb 15, 2016 6:28 am    Post subject: Reply with quote

Astronome wrote:
I figured out that the microcode is actually being loaded. After removing microcode support from the kernel, both as a module and built-in, there was nothing in dmesg about any microcode. (I was concerned that it was using an older one by default.) I added it back in as a module and the message reappeared:

Code:

$ dmesg | grep microcode
[    0.660850] microcode: CPU0: patch_level=0x01000095
[    0.660947] microcode: CPU1: patch_level=0x01000095
[    0.661097] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba


Then I added it using the firmware blobs built into the kernel and verified the message was still there. So I'm going to assume 0x01000095 is correct.


are you SURE its actually updating the firmware? because that doesn't look like the example in that wiki article you mentioned, it just lists the current firmware version, and not that its actually updating it. I had something similar happening with Intel microcode updates where just having the microcode update code (the option to update it at all under processor type/features) enabled had it print out the version, but due to reasons(it didn't like the way I was trying to give it the microcode update, and intel seems to do it slightly differently than AMD so not terribly relevant, and I did get it eventually) it wasn't actually updating the microcode. The key part of the example I'm looking at are the two "[ 10.254972] microcode: CPU0: new patch_level=0x0500010d" lines . One thing you may want to try, just as a guess (since the wiki shows it being built in there) is to just build it in (the microcode update option under processor type/features), rather than building it as a module.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5768

PostPosted: Mon Feb 15, 2016 1:54 pm    Post subject: Reply with quote

Microcode updates at runtime aren't supported any more, you need to use the early-firmware mechanism if you want that.
Back to top
View user's profile Send private message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Mon Feb 15, 2016 5:10 pm    Post subject: Reply with quote

g2g591 wrote:

are you SURE its actually updating the firmware? because that doesn't look like the example in that wiki article you mentioned, it just lists the current firmware version, and not that its actually updating it.


Yeah, that's exactly my concern. I finally found the option for the microcode update in my BIOS, however, so I think that's probably sufficient. I may try disabling it in the BIOS just to verify the firmware is doing its job.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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