Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] Where is CONFIG_MICROCODE gone in kernel 4.4.6-gentoo?

163 views
Skip to first unread message

Mick

unread,
Apr 30, 2016, 4:10:02 AM4/30/16
to
I seem to have mislaid my microcode somewhere, in the latest stable gentoo
kernel:

# grep -i MICROCODE .config
#

As a result I get this during boot:

# /etc/init.d/microcode_ctl start
* Updating microcode ...
microcode_ctl: cannot open /dev/cpu/microcode for writing errno=2 (No such
file or directory)
* Failed to update microcode via '/dev/cpu/microcode'
[ !! ]
* ERROR: microcode_ctl failed to start


The previous kernel contained this:

# grep -i MICROCODE /boot/config-4.1.15-r1-gentoo
CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL=y
# CONFIG_MICROCODE_AMD is not set
CONFIG_MICROCODE_OLD_INTERFACE=y


Is there something else I ought to switch on first?

--
Regards,
Mick
signature.asc

Neil Bothwick

unread,
Apr 30, 2016, 4:30:04 AM4/30/16
to
On Sat, 30 Apr 2016 09:07:29 +0100, Mick wrote:

> I seem to have mislaid my microcode somewhere, in the latest stable
> gentoo kernel:
>
> # grep -i MICROCODE .config
> #

Grepping .config is unreliable, and always has been. You should use the
search option in make menuconfig. If th eoption you want does not show up
in .config, you are probably missing one of the options it depends on.
The search results show what they are and whether they are set. I get this

Symbol: MICROCODE [=y]
Type : boolean
Prompt: CPU microcode loading support
Location:
(1) -> Processor type and features
Defined at arch/x86/Kconfig:1159
Depends on: CPU_SUP_AMD [=y] || CPU_SUP_INTEL [=y]
Selects: FW_LOADER [=y]


--
Neil Bothwick

WinErr 002: No Error - Yet

Mick

unread,
Apr 30, 2016, 5:30:03 AM4/30/16
to
On Saturday 30 Apr 2016 09:29:08 Neil Bothwick wrote:
> On Sat, 30 Apr 2016 09:07:29 +0100, Mick wrote:
> > I seem to have mislaid my microcode somewhere, in the latest stable
> > gentoo kernel:
> >
> > # grep -i MICROCODE .config
> > #
>
> Grepping .config is unreliable, and always has been. You should use the
> search option in make menuconfig. If th eoption you want does not show up
> in .config, you are probably missing one of the options it depends on.

Thanks Neil, I use both, especially if grepping does not reveal what I am
looking for.

> The search results show what they are and whether they are set. I get this
>
> Symbol: MICROCODE [=y]
> Type : boolean
> Prompt: CPU microcode loading support
> Location:
> (1) -> Processor type and features
> Defined at arch/x86/Kconfig:1159
> Depends on: CPU_SUP_AMD [=y] || CPU_SUP_INTEL [=y]
> Selects: FW_LOADER [=y]

Yes, I got (almost) the same and it shows that MICROCODE is a top level
module, but I can't see it when I walk through the 'Processor type and
features' contents. Fine, my eyesight is not what it used to be, but it can't
be this bad! :p

Symbol: MICROCODE [=n]
Type : boolean
Prompt: CPU microcode loading support
Location:
(1) -> Processor type and features
Defined at arch/x86/Kconfig:1125
Depends on: (CPU_SUP_AMD [=y] || CPU_SUP_INTEL [=y]) && BLK_DEV_INITRD
Selects: FW_LOADER [=y]

I built this 4.4.6 kernel with oldconfig, so it *should* retain previously
selected modules, like MICROCODE. Either way, why would it not show in
menuconfig, if a search says it is?

--
Regards,
Mick
signature.asc

Neil Bothwick

unread,
Apr 30, 2016, 5:40:02 AM4/30/16
to
On Sat, 30 Apr 2016 10:24:43 +0100, Mick wrote:

> Yes, I got (almost) the same and it shows that MICROCODE is a top level
> module, but I can't see it when I walk through the 'Processor type and
> features' contents. Fine, my eyesight is not what it used to be, but
> it can't be this bad! :p
>
> Symbol: MICROCODE [=n]
> Type : boolean
> Prompt: CPU microcode loading support
> Location:
> (1) -> Processor type and features
^
> Defined at arch/x86/Kconfig:1125
> Depends on: (CPU_SUP_AMD [=y] || CPU_SUP_INTEL [=y]) &&
> BLK_DEV_INITRD Selects: FW_LOADER [=y]
>
> I built this 4.4.6 kernel with oldconfig, so it *should* retain
> previously selected modules, like MICROCODE. Either way, why would it
> not show in menuconfig, if a search says it is?

What happens when you press 1?


--
Neil Bothwick

DOS never says "EXCELLENT command or filename"...

Mick

unread,
Apr 30, 2016, 6:10:03 AM4/30/16
to
It takes me to level 0 of menuconfig, with "Processor type and features --->"
highlighted. Ditto when I press 3, which is Intel Microcode module. :-/

--
Regards,
Mick
signature.asc

Peter Humphrey

unread,
Apr 30, 2016, 7:10:03 AM4/30/16
to
It seems to require BLK_DEV_INITRD if my logic is still up to scratch. What
happens if you set this; does MICROCODE appear then?

This is odd, because I see this, searching from the /usr/src/ directory:

peak src # grep MICROCODE linux-4.4.6-gentoo/.config
#

peak src # grep MICROCODE linux-4.4.7-gentoo/.config
CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL=y
# CONFIG_MICROCODE_AMD is not set
CONFIG_MICROCODE_OLD_INTERFACE=y

peak src # grep MICROCODE linux-4.5.0-gentoo-r1/.config
#

peak src # grep MICROCODE linux-4.5.1-gentoo/.config
CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL=y
# CONFIG_MICROCODE_AMD is not set
CONFIG_MICROCODE_OLD_INTERFACE=y

So the rules seem to change with succeeding versions of the kernel. Not sure
what to suggest here.

(I've been playing with lots of versions of kernel, boinc, virtualbox and
others recently, which is why I still have those kernel sources installed.
I've compiled and booted all of them at various times.)

--
Rgds
Peter

Mick

unread,
Apr 30, 2016, 8:10:04 AM4/30/16
to
Yes! What the ... ? O_O

< > Dell i8k legacy laptop support
[*] CPU microcode loading support (NEW)
[*] Intel microcode loading support (NEW)
[ ] AMD microcode loading support (NEW)


It appears and as you can see old settings still stand. This is really odd.
I don't have INITRD set on most/all of my PCs, but on other PCs with the same
kernel I can see MICROCODE. This disappearance act happens on a no-multilib
system. Could this have anything to do with it?

I will compile a couple more of my systems this weekend to see what gives. I
can't recall ever coming across this problem in the past.

--
Regards,
Mick
signature.asc

Alec Ten Harmsel

unread,
Apr 30, 2016, 9:00:04 AM4/30/16
to
On Sat, Apr 30, 2016 at 09:29:08AM +0100, Neil Bothwick wrote:
> On Sat, 30 Apr 2016 09:07:29 +0100, Mick wrote:
>
> > I seem to have mislaid my microcode somewhere, in the latest stable
> > gentoo kernel:
> >
> > # grep -i MICROCODE .config
> > #
>
> Grepping .config is unreliable, and always has been.

I usually use something like:

grep MICROCODE $(find . -name Kconfig)

Alec

Mick

unread,
Apr 30, 2016, 10:00:03 AM4/30/16
to
# grep -i MICROCODE /boot/config-4.4.6-gentoo
#
# grep -i MICROCODE .config
#
# grep MICROCODE $(find . -name Kconfig)
./arch/x86/Kconfig:config MICROCODE
./arch/x86/Kconfig:config MICROCODE_INTEL
./arch/x86/Kconfig: depends on MICROCODE
./arch/x86/Kconfig: default MICROCODE
./arch/x86/Kconfig:config MICROCODE_AMD
./arch/x86/Kconfig: depends on MICROCODE
./arch/x86/Kconfig:config MICROCODE_OLD_INTERFACE
./arch/x86/Kconfig: depends on MICROCODE
#

Now you see it ... now you don't! I am getting really confused. :-/

Why on this PC the MICROCODE options become available only when I enable
INITRD, but on other PCs such a problem does not exist?

--
Regards,
Mick
signature.asc

Jonathan Callen

unread,
Apr 30, 2016, 10:10:03 AM4/30/16
to
The proper way to load microcode into the kernel is now to have it be
part of an initramfs (the initramfs doesn't (I think) have to actually
do anything, just have the microcode firmware in the appropriate
location). This is because some things in userspace (like glibc itself)
only check once for certain CPU features at startup, and newer microcode
will actually disable some of those features on some CPUs (because they
are completely broken anyway). This means that loading the microcode
before any userspace programs run will ensure that applications like
/sbin/init won't crash just because a feature they thought they could
use suddenly disappeared.

--
Jonathan Callen

signature.asc

Mick

unread,
Apr 30, 2016, 10:40:03 AM4/30/16
to
Thanks Jonathan for your explanation. I noticed another machine that loaded
the MICROCODE as expected, had initrd enabled in the kernel although not used
for anything else. I will enable it on this PC too and get on with the next
job.
--
Regards,
Mick
signature.asc

Peter Humphrey

unread,
Apr 30, 2016, 11:10:04 AM4/30/16
to
On Saturday 30 Apr 2016 10:05:40 Jonathan Callen wrote:

> The proper way to load microcode into the kernel is now to have it be
> part of an initramfs (the initramfs doesn't (I think) have to actually
> do anything, just have the microcode firmware in the appropriate
> location). This is because some things in userspace (like glibc itself)
> only check once for certain CPU features at startup, and newer microcode
> will actually disable some of those features on some CPUs (because they
> are completely broken anyway). This means that loading the microcode
> before any userspace programs run will ensure that applications like
> /sbin/init won't crash just because a feature they thought they could
> use suddenly disappeared.

Still, it would be better if all kernel versions behaved the same way in
this respect.

--
Rgds
Peter

Neil Bothwick

unread,
Apr 30, 2016, 1:00:03 PM4/30/16
to
Not if the newer way is better, which appears to be the case here.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Peter Humphrey

unread,
May 1, 2016, 3:50:04 AM5/1/16
to
My results show the behaviour alternating between versions, not simply
progressing from the old to the new. You'd be right of course in the latter
case.

--
Rgds
Peter
0 new messages