Bug 6175 - file /lib/firmware/amd-ucode/microcode_amd.bin not found
Summary: file /lib/firmware/amd-ucode/microcode_amd.bin not found
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA2-64-OK MGA2-32-OK
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2012-05-30 18:53 CEST by José Jorge
Modified: 2012-08-06 17:40 CEST (History)
8 users (show)

See Also:
Source RPM: microcode
CVE:
Status comment:


Attachments
microcode nonfree/updates_testing commands/results (not a K10 cpu) (3.24 KB, text/plain)
2012-05-31 01:52 CEST, Bit Twister
Details
set -x in /etc/rc.d/init.d/microcode_ctl results (5.32 KB, text/plain)
2012-05-31 03:26 CEST, Bit Twister
Details

Description José Jorge 2012-05-30 18:53:50 CEST
The file was in a subfolder amd-ucode-2012-01-17.

With microcode-0.20120313-1.1.mga2 it should be found by microcode service on AMD K10 cpu's.
Comment 1 José Jorge 2012-05-30 18:55:04 CEST
Please QA, test if you have an AMD K10.

"dmesg | grep microcode" should help

Status: NEW => ASSIGNED
Assignee: bugsquad => qa-bugs

Comment 2 Bit Twister 2012-05-31 01:52:37 CEST
Created attachment 2408 [details]
microcode nonfree/updates_testing commands/results (not a K10 cpu)
Comment 3 Bit Twister 2012-05-31 03:26:55 CEST
Created attachment 2409 [details]
set -x in /etc/rc.d/init.d/microcode_ctl results
Comment 4 Bit Twister 2012-05-31 13:22:22 CEST
Workaround solution is to disable the minor check.

# dif /etc/rc.d/init.d/microcode_ctl /etc/rc.d/init.d/microcode_ctl~
42c42
< #             if [ $minor -ge 29 ]; then 
---
>               if [ $minor -ge 29 ]; then 
49c49
< #             fi
---
>               fi



# systemctl start microcode_ctl.service

# systemctl status microcode_ctl.service
microcode_ctl.service - LSB: Update the Intel / AMD CPU microcode
 Loaded: loaded (/etc/rc.d/init.d/microcode_ctl)
 Active: active (exited) since Thu, 31 May 2012 06:16:02 -0500; 4min 18s ago
          CGroup: name=systemd:/system/microcode_ctl.service

May 31 06:16:02 wb.home.test microcode_ctl[21348]: Loading AMD microcode update module
May 31 06:16:02 wb.home.test microcode_ctl[21348]: [  OK  ]

CC: (none) => junk_no_spam

Comment 5 José Jorge 2012-06-01 19:19:05 CEST
(In reply to comment #2)
> Created attachment 2408 [details]
> microcode nonfree/updates_testing commands/results (not a K10 cpu)

This is another bug : #4327 . This bug report is only to check that microcode is loaded, that's why there is no point in testing it without a K10.
Comment 6 claire robinson 2012-06-07 12:06:35 CEST
No k10 here, this might need a mail to -discuss or -dev José

Is there no way to test it without the hardware?
Comment 7 José Jorge 2012-06-08 18:10:10 CEST
(In reply to comment #6)
> No k10 here, this might need a mail to -discuss or -dev José
Yes, feel free to do so : the patch is also applied in cauldron, so any cauldron user with a K10 has already tested it ;-)

> 
> Is there no way to test it without the hardware?

No.
Comment 8 claire robinson 2012-06-10 22:00:07 CEST
Confirmed the directory fix i586

$ urpmf --media Release microcode | grep amd-ucode

microcode:/lib/firmware/amd-ucode
microcode:/lib/firmware/amd-ucode/amd-ucode-2012-01-17
microcode:/lib/firmware/amd-ucode/amd-ucode-2012-01-17/INSTALL
microcode:/lib/firmware/amd-ucode/amd-ucode-2012-01-17/LICENSE
microcode:/lib/firmware/amd-ucode/amd-ucode-2012-01-17/README
microcode:/lib/firmware/amd-ucode/amd-ucode-2012-01-17/microcode_amd.bin
microcode:/lib/firmware/amd-ucode/amd-ucode-2012-01-17/microcode_amd.bin.README
microcode:/lib/firmware/amd-ucode/amd-ucode-2012-01-17/microcode_amd_fam15h.bin
microcode:/lib/firmware/amd-ucode/amd-ucode-2012-01-17/microcode_amd_fam15h.bin.README
microcode:/lib/firmware/amd-ucode/amd-ucode-2012-01-17/microcode_amd_solaris.bin
microcode:/lib/firmware/amd-ucode/amd-ucode-2012-01-17/microcode_amd_solaris.bin.README


$ urpmf --media Testing microcode | grep amd-ucode

microcode:/lib/firmware/amd-ucode
microcode:/lib/firmware/amd-ucode/INSTALL
microcode:/lib/firmware/amd-ucode/LICENSE
microcode:/lib/firmware/amd-ucode/README
microcode:/lib/firmware/amd-ucode/microcode_amd.bin
microcode:/lib/firmware/amd-ucode/microcode_amd.bin.README
microcode:/lib/firmware/amd-ucode/microcode_amd_fam15h.bin
microcode:/lib/firmware/amd-ucode/microcode_amd_fam15h.bin.README
microcode:/lib/firmware/amd-ucode/microcode_amd_solaris.bin
microcode:/lib/firmware/amd-ucode/microcode_amd_solaris.bin.README

It will still need the correct hardware to properly test
Comment 9 AL13N 2012-06-11 13:00:16 CEST
dmesg | grep microcode gives exactly nothing.

packages microcode_ctl is installed, but microcode itself isn't.

i suppose i need to install microcode and regen dracut? then reboot and see if it works?

the microcode_ctl service does fail according to systemctl though.

To Confirm: this is for mga2 right? not for cauldron?

CC: (none) => alien

Helge Hielscher 2012-06-11 13:20:28 CEST

CC: (none) => hhielscher

Comment 10 Bit Twister 2012-06-11 13:33:36 CEST
(In reply to comment #9)
> dmesg | grep microcode gives exactly nothing.

I have see microcode output in dmesg, after I removed the test for kernel version. See comment 4. 
Go ahead and click up a terminal, run
   tail -f /var/log/messages
then run 
   systemctl start  microcode_ctl.service
and you will get about the same info you would have seen in dmesg.

> packages microcode_ctl is installed, but microcode itself isn't.

I did install microcode hoping it was the problem. Even after installing
microcode and doing a systemctl start microcode.service, microcode_ctl was executed.

> i suppose i need to install microcode and regen dracut? then reboot and see if
> it works?

I would guess not.

> the microcode_ctl service does fail according to systemctl though.
>
> To Confirm: this is for mga2 right? not for cauldron?

Yep, it was always failing for mga2 on two of my newer systems. My old testbed hardware did not complain when microcode_ctl ran.
Comment 11 AL13N 2012-06-11 15:00:02 CEST
after installing microcode, and restarting microcode_ctl (which failed), i got:

[root@localhost ~]# dmesg | grep microcode
[1205139.797425] microcode: CPU0: patch_level=0x010000bf
[1205139.824905] microcode: failed to load file amd-ucode/microcode_amd.bin
[1205139.824917] microcode: CPU1: patch_level=0x010000bf
[1205139.825280] microcode: failed to load file amd-ucode/microcode_amd.bin
[1205139.825301] microcode: CPU2: patch_level=0x010000bf
[1205139.825685] microcode: failed to load file amd-ucode/microcode_amd.bin
[1205139.825714] microcode: CPU3: patch_level=0x010000bf
[1205139.825967] microcode: failed to load file amd-ucode/microcode_amd.bin
[1205139.825972] microcode: CPU4: patch_level=0x010000bf
[1205139.826261] microcode: failed to load file amd-ucode/microcode_amd.bin
[1205139.826271] microcode: CPU5: patch_level=0x010000bf
[1205139.826473] microcode: failed to load file amd-ucode/microcode_amd.bin
[root@localhost ~]# urpmf amd-ucode/microcode_amd.bin
[root@localhost ~]# urpmf /microcode_amd.bin
microcode:/lib/firmware/amd-ucode/amd-ucode-2012-01-17/microcode_amd.bin
microcode:/lib/firmware/amd-ucode/amd-ucode-2012-01-17/microcode_amd.bin.README


so the paths are indeed different here too...
Comment 12 AL13N 2012-06-11 15:08:39 CEST
after installing the update candidate, and restarting the microcode_ctl service:

[1205728.282937] microcode: CPU0: patch_level=0x010000bf
[1205728.283640] microcode: CPU0: new patch_level=0x010000dc
[1205728.283646] microcode: CPU1: patch_level=0x010000bf
[1205728.284100] microcode: CPU1: new patch_level=0x010000dc
[1205728.284106] microcode: CPU2: patch_level=0x010000bf
[1205728.284407] microcode: CPU2: new patch_level=0x010000dc
[1205728.284415] microcode: CPU3: patch_level=0x010000bf
[1205728.284680] microcode: CPU3: new patch_level=0x010000dc
[1205728.284691] microcode: CPU4: patch_level=0x010000bf
[1205728.284962] microcode: CPU4: new patch_level=0x010000dc
[1205728.284982] microcode: CPU5: patch_level=0x010000bf
[1205728.285250] microcode: CPU5: new patch_level=0x010000dc

so, i would say the update is valid for me on x86_64
Comment 13 Derek Jennings 2012-06-11 15:28:41 CEST
I have a K10
AMD Phenom(tm) II X4 B50 Processor

Confirmed that microcode does not load.

Installed microcode-0.20120313-1.1.mga2.nonfree  fron non-free/updates/testing

Confirmed that microcode does load correctly
# dmesg | grep microcode
[288700.877796] microcode: CPU0: patch_level=0x010000b6
[288700.879834] microcode: CPU0: new patch_level=0x010000c8
[288700.879853] microcode: CPU1: patch_level=0x010000b6
[288700.880927] microcode: CPU1: new patch_level=0x010000c8
[288700.880955] microcode: CPU2: patch_level=0x010000b6
[288700.881961] microcode: CPU2: new patch_level=0x010000c8
[288700.881988] microcode: CPU3: patch_level=0x010000b6
[288700.882984] microcode: CPU3: new patch_level=0x010000c8
[288700.883312] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[288700.913809] microcode: Microcode Update Driver: v2.00 removed.

However status returned by systemctl status microcode_ctl.service is incorrect

# systemctl status microcode_ctl.service
microcode_ctl.service - LSB: Update the Intel / AMD CPU microcode
          Loaded: loaded (/etc/rc.d/init.d/microcode_ctl)
          Active: failed (Result: exit-code) since Mon, 11 Jun 2012 14:11:57 +0100; 51s ago
         Process: 6472 ExecStart=/etc/rc.d/init.d/microcode_ctl start (code=exited, status=22)
          CGroup: name=systemd:/system/microcode_ctl.service

Jun 11 14:11:57 Derek.localdomain microcode_ctl[6472]: [FAILED]

CC: (none) => derekjenn

Comment 14 claire robinson 2012-06-11 15:50:58 CEST
Thanks Derek, are you using i586 or x86_64?
Comment 15 Derek Jennings 2012-06-11 16:00:48 CEST
x86_64
Comment 16 AL13N 2012-06-11 19:48:12 CEST
i confirm that the exit code of the service is wrong (not a major issues, but someone should fix nonetheless), if there's ever dependencies on it.
Comment 17 Derek Jennings 2012-06-11 21:29:21 CEST
boot.log reports that microcode_ctl has failed so if we do not fix it users are going to keep on asking why they have a failure in their log.

The problem appears to be in /etc/rc.d/init.d/microcode_ctl
It tests to see if the kernel minor release is greater than 29 before applying the microcode (obviously assuming the kernel is a 2.6 kernel)

If I comment out the if statement it all works OK.

case "$1" in
  start|reload|restart|force-reload)
        # Intel 686 and above, AMD family 16 and above
        vendor=`grep "^vendor_id" /proc/cpuinfo | head -n1 | awk -F ": " '{ print $2 }'`
        family=`grep "^cpu family" /proc/cpuinfo | head -n1 | awk -F ": " '{ print $2 }'`

        if [ "$vendor" = "GenuineIntel" ] && [ $family -ge 6 ]; then
                gprintf "Applying Intel CPU microcode update: "
        elif [ "$vendor" = "AuthenticAMD" ] && [ $family -ge 16 ]; then
                minor=`uname -r |  cut -d . -f 3 | cut -d - -f 1`
#               if [ $minor -ge 29 ]; then
                        gprintf "Loading AMD microcode update module\n"
                        /sbin/modprobe microcode
                        action "" /bin/true
                        touch /var/lock/subsys/microcode_ctl
                        /sbin/rmmod microcode
                        exit 0
#               fi
        else

So do we release this upgrade to the microcode package and make a new bug for microcode_ctl, or do we fix them both at once?
Comment 18 José Jorge 2012-06-11 21:49:34 CEST
Please read all the comments, or at least number 5 : bug #4327 already exists for the service return code, this bug is only about the firmware files path.
Comment 19 AL13N 2012-06-11 23:39:34 CEST
no offense, but even though it's mentioned, it seems there's more talk of intel microcode there...

since mga3 will have systemd only, this only needs fixing in mga2, imho

also the check should be more complete, just to avoid destroying CPU's.

in any case, i've taken the liberty of making a commit to both cauldron and mga2 to fix this issue.

if someone thinks this should get updated in mga2 or cauldron, they can bump release/subrel and submit and validate.
Comment 20 claire robinson 2012-06-12 09:53:26 CEST
If the fix looks OK José do you want to submit it? 

I'm sure AL13N wouldn't mind retesting the new package and we could close both bugs with a working setup.
Comment 21 Simon Putt 2012-06-19 14:19:29 CEST
The fix is working on my Phenom II x6 1090T says updated all cores to newer firmware, but as above get the fail in my boot.log.

CC: (none) => lemonzest

Comment 22 José Jorge 2012-06-19 21:50:45 CEST
(In reply to comment #20)
> If the fix looks OK José do you want to submit it? 
> 
Ok so package microcode_ctl submitted : microcode_ctl-1.17-13.1.mga2 . When all will be validated, please push both microcode_ctl and microcode packages.
Comment 23 Derek Jennings 2012-06-19 23:27:10 CEST
Tested on OK x86_64 AMD Phenom.
Boot log is correct.
Comment 24 claire robinson 2012-07-10 15:26:59 CEST
AL13N would you mind checking this fixes the problems you had previously please, this can then be validated.

Thanks!
Comment 25 Samuel Verschelde 2012-07-31 21:41:03 CEST
ping AL13N, this update is waiting for your test, if you can. Otherwise just tell and we'll find another way :)

Whiteboard: (none) => MGA2-64-OK
CC: (none) => stormi

Comment 26 AL13N 2012-07-31 22:54:15 CEST
ah crap, forgot /o\

problem is that i almost never reboot.

but i remember that manual changes did fix it for me...
Comment 27 Samuel Verschelde 2012-08-04 01:15:34 CEST
(In reply to comment #26)
> ah crap, forgot /o\
> 
> problem is that i almost never reboot.
> 
> but i remember that manual changes did fix it for me...

Does it mean that you can't test? If so, I think we'll validate the update as is.
Comment 28 AL13N 2012-08-04 09:43:19 CEST
i can't really test soon-ish (first, i'm not at home now) and secondly, i usually never reboot. so it'll be at least 1 or 2 months before i can test.

thirdly, i have tried the same fix manually and that worked forme, so i assume this will go well.

i agree with validation
Comment 29 Samuel Verschelde 2012-08-04 09:53:24 CEST
Update validated. No linking required.

SRPMS:
- microcode_ctl-1.17-13.1.mga2
- microcode-0.20120313-1.1.mga2.nonfree

Advisory coming in next comment.

CC: (none) => sysadmin-bugs
Keywords: (none) => validated_update

Comment 30 Samuel Verschelde 2012-08-04 10:09:58 CEST
un-validating until we get an advisory. AL13N or José, could you provide one? I'm not able to do it for this update.

Keywords: validated_update => (none)

Samuel Verschelde 2012-08-04 10:37:28 CEST

Whiteboard: MGA2-64-OK => MGA2-64-OK MGA2-32-OK

Samuel Verschelde 2012-08-04 10:52:28 CEST

Whiteboard: MGA2-64-OK MGA2-32-OK => MGA2-64-OK MGA2-32-OK feedback

Comment 31 Simon Putt 2012-08-04 15:15:21 CEST
Been using this since the update first went into testing on mga2 x86_64, results pretty much the same as above, now working fine :) (I have a Phenom II X6 1090T (K10.5))
Comment 32 AL13N 2012-08-05 13:09:00 CEST
possible advisory:

Fix microcode startup script to handle 3.x kernels and add missing AMD CPU firmware.
Comment 33 Samuel Verschelde 2012-08-05 14:06:11 CEST
Update validated. No linking required.

SRPMS:
- microcode_ctl-1.17-13.1.mga2
- microcode-0.20120313-1.1.mga2.nonfree

--- Advisory ---
The microcode startup script was fixed so that it would handle 3.x kernels and a missing AMD CPU firmware was added.

Keywords: (none) => validated_update
Whiteboard: MGA2-64-OK MGA2-32-OK feedback => MGA2-64-OK MGA2-32-OK

Comment 34 Thomas Backlund 2012-08-06 17:40:03 CEST
Update pushed:
https://wiki.mageia.org/en/Support/Advisories/MGAA-2012-0154

Status: ASSIGNED => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.