You are not logged in.

#1 2011-10-29 03:39:54

dcbdbis
Member
From: Aurora, Colorado
Registered: 2004-09-10
Posts: 247

[SOLVED] AMD Microcode

Looks like the original post got lost in the BBS rebuild.

I am moving to an AMD platform and can't seem to find data on microcode for an AMD CPU. I see on the AMD site where microcode is available for a few CPU's. I do not see on the microcode_ctl site, for anything but Intel CPU's.

The wiki doesn't mention anything about AMD cpu's.

Can someone point me to an article to read, or a wiki on updating microcode on AMD's, or are AMD's just typically not updated like Intel's?

Thanks for your input,



Dave....

Last edited by dcbdbis (2011-11-05 17:36:33)

Offline

#2 2011-10-30 18:12:43

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] AMD Microcode

From my quick look into it a while ago, AMD does indeed provide microcode updates, but only for a restricted number of cpu families, I guess it's a case of if it isn't broken don't try to fix it. Don't forget google is your friend http://jonmccune.wordpress.com/2009/04/ … -amd-cpus/


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2011-11-05 17:36:14

dcbdbis
Member
From: Aurora, Colorado
Registered: 2004-09-10
Posts: 247

Re: [SOLVED] AMD Microcode

OK.....After following the above post, and also reading on the AMD site, and then going through other blogs, here is the answer:

Before you proceed, make sure that your AMD CPU supports microcode. Not all AMD proc's do. The link below will provide you the information you need to determine if yours does. To determine your model of CPU, do a:

lscpu

As of this writing, models 10, 11 and 14 support microcode.

The microcode itself is available directly from AMD's site. http://www.amd64.org/support/microcode.html As of 05-Nov-2011 this link was valid. As with all large companies, this link will likely change over time. Just Google search it.

Here is a cut-n-paste from AMD's install file:

  # cd /tmp
  # tar xf /path/to/amd-ucode-2011-01-11.tar
  # mkdir -p  /lib/firmware/amd-ucode
  # mv amd-ucode-2011-01-11/microcode_amd.bin /lib/firmware/amd-ucode
  # modprobe -r microcode
  # modprobe microcode

This led me down the path to discover that microcode, the daemon that you use for intel procs in the daemons array of the rc.conf, is a very different entity than microcode the kernel module. Although they share the same name and spelling.

So I performed the typical extraction of the tarball, created the directory as stated, and then copied the microcode into that directory. The last step was to add microcode as the first module in my rc.conf. Personally, I installed it ahead of fuse, and vboxdrv.

Rebooted and reviewed the dmesg.log.

Bingo! There were the log entries where the CPU's microcode had indeed been updated....

I had previously installed onto my system the linux-firmware package. And there is a bunch of firmware in the /lib/firmware tree. I am assuming that other bits of firmware and microcode get pushed into installed devices as well, based upon what I read in dmesg.log.

I can confirm that if you do not have microcode in the modules list, your firmware/microcodes do not get pushed. I tested it on several reboots and read the dmesg logs after each reboot. I also played the game of putting microcode in the daemons array instead of the modules section of the rc.conf. The firmware files did not get pushed upon reboot. Proving to myself that the two microcode's are indeed separate entities.

This series of tests was performed on a fresh x86_64 netinstall < 24 hours old.

If you choose to implement this on your AMD system, just make sure you don't get confused between microcode the daemon, and microcode the kernel module. These are two different entities entirely, and they are meant for two very different purposes.



Hope this helps someone else!


Sincerely and respectfully,


Dave

Last edited by dcbdbis (2011-11-05 17:47:57)

Offline

#4 2011-11-06 12:43:47

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] AMD Microcode

You should install it from a package, check here: https://aur.archlinux.org/packages.php?ID=45587

When I replied to your first post I didn't remember to check the AUR, always check the AUR first because the probability of something being there is quite high tongue


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2011-11-06 18:48:48

dcbdbis
Member
From: Aurora, Colorado
Registered: 2004-09-10
Posts: 247

Re: [SOLVED] AMD Microcode

The AUR can be a dangerous place. Not all packages in the AUR are canonical. Some have issues. Others. lack functionality or vital information. Take the amd-ucode one.......

It does indeed install the correct microcode for the AMD, and does so in the right place, and then it tells you that the microcode will be installed at the next run of "microcode". However in a default Arch install, microcode is not called by any init script, nor is it in the rc.conf by default, nor is it called in the initramfs in the boot process. The AUR package gives you no indication that to run it automatically at boot, you need to add microcode to the modules list of your rc.conf. All it gives you is instructions on how to call it manually. Pretty much the same as the AMD instructions I posted.

After a user installes the amd-ucode AUR package, this leaves the user with a false sense that their microcode will be updated on the next boot, which in fact it does not. I tested this. A attest to this personally.  I removed my adds, and then installed the AUR package. A reboot and a subsequent review of the dmesg log showed the microcode did not get updated, nor was microcode the kernel module, left over in memory by issuing an "lsmod".

I removed the AUR package, then reapplied my fix above and it all worked as intended again. No harm done mind you. It's just that the AUR package doesn't go far enough.

For example, when you add the microcode_ctl package for an intel platform......the last thing you see on the screen is that you have to add microcode to your daemons array or the update will not be applied. It's also in the Arch wiki. The package told you what you needed to do in other words, and there is a wiki.

The amd-ucode package from the AUR does not give you this level of granular instructions, and there is no Arch wiki.


Now please don't take this as a flame. It is not intended that way. Not at all.......No one's upset. I'm just an old engineer who tends to be blunt sometimes with no ill intent whatsoever.


So.......the AUR package can be used quite successfully with a little more instructions. Or the method listed in my post could be used.

So the best thing to do is to document it!

I now ask,

How do I write a wiki? Whom do I submit it to for posting?

I would include both methods, with fleshed out instructions for the AUR package....and then let the user decide which method they will employ.

:-)



Sincerely and respectfully,


Dave

Offline

#6 2011-11-06 21:30:38

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] AMD Microcode

What you say is true, probably the creator thought that was obvious but having an install message warning the user to do so doesn't hurt. Make a suggestion in the comments for the maintainer to add an install message stating that microcode has to be manually added to the MODULES list in /etc/rc.conf as this is something that shouldn't be done automatically to avoid any problems (if something can fail it will fail), even official packages don't do it, but those do have install messages telling the user to do it manually.

Your method works just fine, however users should be encouraged to use the package manager to manage files added to the system so that there are no nasty surprises afterwards (and if removing the package all installed files and directories will be removed if possible). There should be no exceptions unless the devs say so, the best way to avoid problems is to _not_ do any manual modifications to the system (as in adding/removing files or creating (sym)links), otherwise in a later update the user can experience problems no one else is having and it will be very difficult to provide help in that case (and yes I know it very well, been there done that and no more thanks, I've learned the lesson).

As for the wiki, all you need to do is to create a wiki account (forum/bugtracker/aur/wiki accounts are separate) and add the information to the page concerning the microcode update [1]. You may have to tweak the existing text a little bit to take into account that both Intel and some AMD cpu's accept microcode updates and that the method differs for both.

[1] https://wiki.archlinux.org/index.php/Microcode


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2012-03-11 19:27:39

stiffy420
Member
Registered: 2009-12-11
Posts: 99

Re: [SOLVED] AMD Microcode

Im having trouble getting this to work with my AMD 15h CPU.

i get "ERROR: could not insert 'microcode': Invalid argument" when using modprobe microcode.

i used AMD's install file guidlines. what am i doing wrong?

Offline

#8 2012-03-11 19:44:50

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [SOLVED] AMD Microcode

Moderator:  @stiffy420:  I think your post is appropriate for this thread, and I almost left this alone.  The thread is, however, several months old and had been marked as solved by the original poster.

If the information in this thread did not solve the problem for you, it is likely the problem you are fighting is not the same as the original poster's.  To keep things from becoming confused, we recommend that, rather than extending an old thread, you should create a fresh thread stating your problem.  If you feel this thread is applicable to the new thread, reference is using url tags.

Thanks, and sorry for the mild inconvenience.
Closing this thread.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB