Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 237994

Summary: add support for microcode loading with linux-2.6.27+
Product: Gentoo Linux Reporter: Vasilij K. Savin <v.savin>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: enhancement CC: axiator, jekarlson, mgorny, sven.koehler
Priority: Normal    
Version: 2008.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Vasilij K. Savin 2008-09-18 08:22:15 UTC
syslog:
kernel: IA-32 Microcode Update Driver: v1.14a <tigran@aivazian.fsnet.co.uk>
firmware.sh[11461]: Cannot find  firmware file 'intel-ucode/0f-02-09'

installed packages
[I--] [ ~] sys-apps/microcode-ctl-1.17-r1 (0)
[I--] [ ~] sys-apps/microcode-data-20080910 (0)

The problem is the same for my notebook:
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 8
model name	: Pentium III (Coppermine)
stepping	: 6
cpu MHz		: 547.621
cache size	: 256 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips	: 1095.79
clflush size	: 32

 and desktop:
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping        : 9
cpu MHz         : 2793.096
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtpr
bogomips        : 5588.32
clflush size    : 64

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping        : 9
cpu MHz         : 2793.096
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtpr
bogomips        : 5585.23
clflush size    : 64
Comment 1 Wormo (RETIRED) gentoo-dev 2008-09-19 05:46:12 UTC
This log message refers to a newer udev+kernel method of loading the firmware, so the error does not matter at all while you are still using the old method with microcode_ctl.

Here is a Linux Kernel Mailing List thread that discusses both methods of loading the firmware:
http://thread.gmane.org/gmane.linux.kernel/701675/focus=701711
Comment 2 Wormo (RETIRED) gentoo-dev 2008-09-19 19:12:10 UTC
Ok to close this, or are you having problems with microcode_ctl loading?
Comment 3 Vasilij K. Savin 2008-09-21 18:28:41 UTC
(In reply to comment #2)
> Ok to close this, or are you having problems with microcode_ctl loading?
> 

Yes, I do ;)
I registered the bug since the ebuild do not works...
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-22 01:02:03 UTC
Please post your `emerge --info' too.
Comment 5 Vasilij K. Savin 2008-09-22 10:08:34 UTC
(In reply to comment #4)
> Please post your `emerge --info' too.

Here you are:

Portage 2.1.4.4 (default/linux/x86/2008.0/developer, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7x86ws i686)
=================================================================
System uname: 2.6.25-gentoo-r7x86ws i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Timestamp of tree: Mon, 22 Sep 2008 04:04:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -momit-leaf-frame-pointer -fno-ident -pipe -DHAVE_SNPRINTF=1"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -O2 -momit-leaf-frame-pointer -fno-ident -pipe -DHAVE_SNPRINTF=1 -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect cvs digest distlocks fixpackages metadata-transfer multilib-strict sandbox sfperms sign splitdebug strict stricter unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo http://gentoo.osuosl.org http://gentoo.inf.elte.hu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en lt ru"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X X509 a52 aac acl acpi alsa apache2 apm arts asf atm audiofile avahi avi berkdb bitmap-fonts bluetooth bzip2 cairo caps cdparanoia cdr chroot cli cracklib crypt cups curl dba dbus dga divx4linux dlloader dmx dri dts dv dvd dvdr dvdread emboss encode esd evo exif fam ffmpeg firefox flac flash font-server foomaticdb fpx gdbm gif gnokii gnome gnutls gphoto2 gpm graphviz gstreamer gtk gtk2 html iconv idn imagemagick imlib ipv6 irda isdnlog ithreads jack java jbig jpeg kde kerberos lame lcms ldap libg++ libnotify libwww live lm_sensors logrotate loop-aes lzo mad mailbox mailwrapper mbox md5sum mgetty midi mikmod milter mmx mng modplug mono motif mozilla mp3 mpeg mudflap mysql mythtv nas ncurses netboot nethack network nls nptl nptlonly nsplugin nvidia ogg oggvorbis opengl openmp oss pam pcmcia pcre pda pdf pdflib perl png pnp ppds pppd python qt qt3 qt3support qt4 quicktime rdesktop readline real realmedia reflection rtc samba scanner sdl serial session skey slang slp sms sndfile snmp socks5 speex spell spl sse sse2 ssh ssl startup-notification svg svga sysfs tcl tcpd tga theora threads tiff tk truetype truetype-fonts type1-fonts unicode usb vcd vidix vorbis win32codecs wma wmf x264 x86 xanim xattr xcomposite xine xinerama xinetd xml xml2 xorg xprint xscreensaver xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en lt ru" USERLAND="GNU" VIDEO_CARDS="mach64 nv nvidia r128 vesa vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 6 SpanKY gentoo-dev 2008-09-25 05:34:42 UTC
the automatic loading isnt even released yet, nor is split out microcode available

re-open once something *actually gets released*
Comment 7 Vasilij K. Savin 2008-09-25 10:56:00 UTC
(In reply to comment #6)
> the automatic loading isnt even released yet, nor is split out microcode
> available
> 
> re-open once something *actually gets released*
> 

FYI: After manual loading the "microcode" module it looks like the microcode update finished normally:

 * Updating microcode ...                                          [ ok ]

Should I trust the system message? ;)
If so, I hope the problem is solved and could be closed. It was a human mistake, as usually.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-12-09 16:58:56 UTC
Ok, the microcode loading should be feasible now. Fedora has got a little C program to split the code [1]; I don't like it personally, so I can rewrite it (or maybe even reinvent in bash) if you prefer that.

As I see it, microcode-ctl should be obsoleted for modern systems and microcode-data should install split microcode files. If that'd be better, we could install split microcode in a separate package which would install modules-load.d file as well.

And if you aren't interested, I could create such a package myself.

[1]:http://pkgs.fedoraproject.org/repo/pkgs/microcode_ctl/intel-microcode2ucode.c/0efc5f6c74a4d7e61ca22683c93c98cf/intel-microcode2ucode.c
Comment 9 SpanKY gentoo-dev 2011-12-12 21:35:01 UTC
microcode-data-20110915-r1 now installs the split up microcode files
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-12-13 06:32:56 UTC
(In reply to comment #9)
> microcode-data-20110915-r1 now installs the split up microcode files

Please consider installing modprobe.d file as well, to have microcode loaded automatically.
Comment 11 SpanKY gentoo-dev 2011-12-31 22:32:09 UTC
what modprobe.d files ?
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-01-01 09:39:03 UTC
(In reply to comment #11)
> what modprobe.d files ?

I have no idea. You should've asked like half a month ago :P. Nevermind probably.
Comment 13 emil karlson 2012-01-01 14:51:29 UTC
(In reply to comment #11)
> what modprobe.d files ?

I think it was about automatically loading 'microcode' as the initscript does this too.

It seems that microcode needs to be a module so that the files are actually available when it is initialized. (rootfs mounted etc...)
Comment 14 Sven 2012-01-01 16:26:04 UTC
(In reply to comment #13)
> It seems that microcode needs to be a module so that the files are actually
> available when it is initialized. (rootfs mounted etc...)

Loading microcode at startup works for me. I don't unload it. However, after waking up from suspend to disk the microcode is not updated again.
Comment 15 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-01-01 17:55:39 UTC
Ah, I probably meant modules-load.d then. Kay mentioned that udev at some point will be able to detect and load microcode itself but it isn't possible yet.
Comment 16 SpanKY gentoo-dev 2012-01-02 08:12:43 UTC
i don't think files in /etc/modprobe.d/ would help anything

a udev rule would automatically load the module at boot, but that'd be a one time thing ... it wouldn't help with suspend/resume

i don't think there's anything that'd help with suspend/resume.  that sounds like a bug imo with the kernel and should get reported upstream there.

i don't know what "modules-load.d" is
Comment 17 Sven 2012-01-06 15:05:35 UTC
(In reply to comment #16)
> a udev rule would automatically load the module at boot, but that'd be a one
> time thing ... it wouldn't help with suspend/resume

I was wrong previously. Once the microcode module is loaded (and remains loaded), the kernel will update the microcode after suspend to ram/disk. This is true for at least kernel 3.1.7 and 3.2.
Comment 18 C. Wijtmans 2013-02-17 17:39:21 UTC
resolved then?
Comment 19 SpanKY gentoo-dev 2013-04-27 07:55:14 UTC
let's stop kicking this horse.  if people have updates/suggestions with the latest versions, then file new bugs.