Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 624846 - sys-firmware/intel-microcode: point to some instructions to update microcodes
Summary: sys-firmware/intel-microcode: point to some instructions to update microcodes
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-13 08:00 UTC by Pacho Ramos
Modified: 2019-04-11 15:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2017-07-13 08:00:01 UTC
Hello,

In the past updating microcode was as easy as compiling the CONFIG_MICROCODE as a module and not integrated and, then, it was automatically updated. Now, it seems it can only be compiled into the kernel and, then, it is not updated. 

Probably this was an upstream change to force people to update the microcode earlier as explained in:
https://bugs.gentoo.org/show_bug.cgi?id=528712#c41

There are shown some instructions to rely on an initrd (default off currently in the ebuild) to do that job. In my case I would prefer to try to get the microcode loaded directly by the kernel to not need to start using initrd only for this :/

But there are multiple places with slightly different instructions:
https://wiki.gentoo.org/wiki/Intel_microcode -> Is this some kind of "official" documentation? Because it seems to be a bit messy mixing the old methods with the new ones (many of that methods like simply having CONFIG_MICROCODE as a module look to not work now).
https://www.kernel.org/doc/Documentation/x86/early-microcode.txt -> Here are the official instructions (but I miss how to get the microcode file I need to load)
http://www.linuxfromscratch.org/blfs/view/svn/postlfs/firmware.html -> In this case I also miss how they are converting the cpu_family-model-stepping to the hexadecimal value need for early loading it :/

Could maybe this be clarified a bit? In summary, the harder part for me is how to identify the firmware you need to load and, later, suggest to load it either with the initrd or compiling it directly in the kernel

Thanks a lot :)
Comment 1 Maxim Britov 2017-07-13 15:59:12 UTC
Today met this problem, found this issue and your old bug 479854

From microcode-20170707.tgz:releasenote
"intel-ucode dirctory contains binary microcode files named in family-model-stepping pattern."

For my i5-5300U it looks simple:

cpu family	: 6
model		: 61
stepping	: 4

61==3d

file is 06-3d-04

And it works with
$ fgrep EXTRA_FIRMWARE /usr/src/linux/.config
CONFIG_EXTRA_FIRMWARE="intel-ucode/06-3d-04"
CONFIG_EXTRA_FIRMWARE_DIR="/lib64/firmware"

Hm... if two cpu have different stepping, extra_firmware should contain both firmware? I believe.
Comment 2 Pacho Ramos gentoo-dev 2017-07-15 08:48:19 UTC
It worked nice for me, thanks ;)
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2018-08-08 19:15:44 UTC
We have created https://wiki.gentoo.org/wiki/Microcode as new official document. Still not perfect but better then the previous Wiki.

I think we are done here. If not, please re-open and tell us what you are missing/expect us to do! :-)

Thanks.
Comment 4 Pacho Ramos gentoo-dev 2018-08-09 14:08:30 UTC
I would try to import:
https://wiki.gentoo.org/wiki/Intel_microcode#New_method_without_initram-fs.2Fdisk

Into https://wiki.gentoo.org/wiki/Microcode , maybe under the "Manual way" :/

Thanks a lot for your attention :)
Comment 5 Thomas Deutschmann (RETIRED) gentoo-dev 2018-08-09 17:09:13 UTC
This will be challenging: The idea of the new wiki article was to combine AMD/Intel articles into one article. The more I think about it, the more I start to doubt if this was a good idea. So many differences between AMD and Intel:

- How to create CPIO which can be used by bootloader?

- Grub integration

- How to identify the file containing the required microcode so user can embed only this file into the kernel...
Comment 6 Pacho Ramos gentoo-dev 2018-08-13 15:32:56 UTC
In my case I simply use the last method putting the firmware into the kernel:
1. I get the firmware ID with iucode_tool -S -l /lib/firmware/intel-ucode/*
2. I compile it in the kernel as https://wiki.gentoo.org/wiki/Intel_microcode#Kernel_3

I guess this cannot be done with AMD firmwares? I cannot try as my last AMD machine died some months ago :(
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2018-08-14 19:36:01 UTC
That's the problem: `iucode_tool --scan-system` doesn't work for AMD users and don't understand any AMD firmware. So all I know about AMD users is that they need to follow steps from https://wiki.gentoo.org/wiki/AMD_microcode
Comment 8 Pacho Ramos gentoo-dev 2018-09-14 22:05:20 UTC
Yes, probably the solution is to have intel-firmware ebuilds pointing to the page adapted to intel firmwares and the amd firmwares package pointing to the page for them :/
Comment 9 Pacho Ramos gentoo-dev 2019-04-11 15:38:31 UTC
(In reply to Pacho Ramos from comment #8)
> Yes, probably the solution is to have intel-firmware ebuilds pointing to the
> page adapted to intel firmwares and the amd firmwares package pointing to
> the page for them :/

What about that? I think pointing intel users to the intel dedicated page and AMD to AMD page will be the best option for all

Thanks