* Early microcode not being loaded
@ 2014-07-18 20:40 Conrad Kostecki
2014-07-18 21:24 ` Borislav Petkov
0 siblings, 1 reply; 6+ messages in thread
From: Conrad Kostecki @ 2014-07-18 20:40 UTC (permalink / raw)
To: linux-kernel
Hi!
I'am trying to use the feature of loading early an intel microcode.
According to the documentation (early-microcode.txt) that should be possible.
I am currently using my own initrd, so I've created a second one, as the docs specified and merged it with my own.
Galactica linux # file /tmp/ucode.cpio
/tmp/ucode.cpio: ASCII cpio archive (SVR4 with no CRC)
Galactica linux # file /tmp/my_own_initrd.cpio
/tmp/my_own_initrd.cpio: ASCII cpio archive (SVR4 with no CRC)
Galactica linux # cpio -itv < /tmp/ucode.cpio
drwxr-xr-x 3 root root 0 Jul 18 17:01 .
drwxr-xr-x 3 root root 0 Jul 18 17:01 kernel
drwxr-xr-x 3 root root 0 Jul 18 17:01 kernel/x86
drwxr-xr-x 2 root root 0 Jul 18 17:01 kernel/x86/microcode
-rw-r--r-- 1 root root 1857432 Jul 18 17:01 kernel/x86/microcode/GenuineIntel.bin
Galactica tmp # cpio -itv < /tmp/my_own_initrd.cpio
drwxr-xr-x 11 root root 0 Jul 18 22:33 .
drwxr-xr-x 3 root root 0 Jul 18 22:33 mnt
drwxr-xr-x 2 root root 0 Jul 18 22:33 mnt/root
drwxr-xr-x 2 root root 0 Jul 18 22:33 lib64
drwxr-xr-x 2 root root 0 Jul 18 22:33 etc
drwxr-xr-x 2 root root 0 Jul 18 22:33 sys
drwxr-xr-x 2 root root 0 Jul 18 22:33 bin
lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/ash -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/cat -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/loadkmap -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/cut -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/setfont -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/kbd_mode -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/echo -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/umount -> /bin/busybox
-rwxr-xr-x 1 root root 2638208 Jul 18 22:33 bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/mount -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/mdev -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/sleep -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/printf -> /bin/busybox
drwxr-xr-x 3 root root 0 Jul 18 22:33 usr
drwxr-xr-x 2 root root 0 Jul 18 22:33 usr/bin
lrwxrwxrwx 1 root root 12 Jul 18 22:33 usr/bin/setfont -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 usr/bin/kbd_mode -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 usr/bin/printf -> /bin/busybox
drwxr-xr-x 3 root root 0 Jul 18 22:33 dev
crw-r--r-- 1 root root 5, 1 Jul 18 22:33 dev/console
crw-r--r-- 1 root root 4, 64 Jul 18 22:33 dev/ttyS0
crw-r--r-- 1 root root 1, 3 Jul 18 22:33 dev/null
crw-r--r-- 1 root root 1, 5 Jul 18 22:33 dev/zero
drwxr-xr-x 2 root root 0 Jul 18 22:33 proc
-rwxr-xr-x 1 root root 5707 Jul 18 22:33 init
lrwxrwxrwx 1 root root 5 Jul 18 22:33 lib -> lib64
drwxr-xr-x 2 root root 0 Jul 18 22:33 sbin
lrwxrwxrwx 1 root root 12 Jul 18 22:33 sbin/loadkmap -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 sbin/switch_root -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jul 18 22:33 sbin/mdev -> /bin/busybox
5174 blocks
Then I merged them, as the docs say:
cat /tmp/ucode.cpio /tmp/my_own_initrd.cpio > /boot/initramfs-3.15.5.img
Booting works fine with this combined initrd, but there is no new microcode applied.
[ 1.058641] microcode: CPU0 sig=0x20661, pf=0x2, revision=0x104
[ 1.063259] microcode: CPU1 sig=0x20661, pf=0x2, revision=0x104
[ 1.068011] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
It's only applied much later, when my microcode_ctl runs as a service.
[ 15.764517] microcode: CPU0 sig=0x20661, pf=0x2, revision=0x104
[ 15.764979] microcode: CPU0 updated to revision 0x105, date = 2011-07-18
[ 15.765970] microcode: CPU1 sig=0x20661, pf=0x2, revision=0x104
[ 15.766430] microcode: CPU1 updated to revision 0x105, date = 2011-07-18
Where is the problem? Why is the microcode not being loaded early?
Cheers
Conrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Early microcode not being loaded
2014-07-18 20:40 Early microcode not being loaded Conrad Kostecki
@ 2014-07-18 21:24 ` Borislav Petkov
2014-07-18 21:49 ` AW: " Conrad Kostecki
0 siblings, 1 reply; 6+ messages in thread
From: Borislav Petkov @ 2014-07-18 21:24 UTC (permalink / raw)
To: Conrad Kostecki; +Cc: linux-kernel
On Fri, Jul 18, 2014 at 08:40:42PM +0000, Conrad Kostecki wrote:
> Where is the problem? Why is the microcode not being loaded early?
CONFIG_MICROCODE_INTEL_EARLY=y set in .config?
You can also try with a recent distro kernel and initrd which has
microcode in it to rule out you're doing something wrong when generating
the initrd.
HTH.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* AW: Early microcode not being loaded
2014-07-18 21:24 ` Borislav Petkov
@ 2014-07-18 21:49 ` Conrad Kostecki
2014-09-01 18:21 ` Conrad Kostecki
0 siblings, 1 reply; 6+ messages in thread
From: Conrad Kostecki @ 2014-07-18 21:49 UTC (permalink / raw)
To: Linux (Kernel) Mailingliste
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 633 bytes --]
> On Fri, Jul 18, 2014 at 08:40:42PM +0000, Conrad Kostecki wrote:
> > Where is the problem? Why is the microcode not being loaded early?
>
> CONFIG_MICROCODE_INTEL_EARLY=y set in .config?
Yes!
Galactica tmp # grep -i microcode /boot/config-3.15.5
CONFIG_MICROCODE=y
CONFIG_MICROCODE_INTEL=y
# CONFIG_MICROCODE_AMD is not set
CONFIG_MICROCODE_OLD_INTERFACE=y
CONFIG_MICROCODE_INTEL_EARLY=y
# CONFIG_MICROCODE_AMD_EARLY is not set
CONFIG_MICROCODE_EARLY=y
Cheers
Conrad
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 6+ messages in thread
* AW: Early microcode not being loaded
2014-07-18 21:49 ` AW: " Conrad Kostecki
@ 2014-09-01 18:21 ` Conrad Kostecki
2014-09-01 20:17 ` Henrique de Moraes Holschuh
0 siblings, 1 reply; 6+ messages in thread
From: Conrad Kostecki @ 2014-09-01 18:21 UTC (permalink / raw)
To: Linux (Kernel) Mailingliste (linux-kernel@vger.kernel.org)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 4843 bytes --]
> Hi!
> I'am trying to use the feature of loading early an intel microcode.
> According to the documentation (early-microcode.txt) that should be possible.
>
> I am currently using my own initrd, so I've created a second one, as the docs specified and merged it with my own.
>
> Galactica linux # file /tmp/ucode.cpio
> /tmp/ucode.cpio: ASCII cpio archive (SVR4 with no CRC)
>
> Galactica linux # file /tmp/my_own_initrd.cpio
> /tmp/my_own_initrd.cpio: ASCII cpio archive (SVR4 with no CRC)
>
> Galactica linux # cpio -itv < /tmp/ucode.cpio
> drwxr-xr-x 3 root root 0 Jul 18 17:01 .
> drwxr-xr-x 3 root root 0 Jul 18 17:01 kernel
> drwxr-xr-x 3 root root 0 Jul 18 17:01 kernel/x86
> drwxr-xr-x 2 root root 0 Jul 18 17:01 kernel/x86/microcode
> -rw-r--r-- 1 root root 1857432 Jul 18 17:01 kernel/x86/microcode/GenuineIntel.bin
>
> Galactica tmp # cpio -itv < /tmp/my_own_initrd.cpio
> drwxr-xr-x 11 root root 0 Jul 18 22:33 .
> drwxr-xr-x 3 root root 0 Jul 18 22:33 mnt
> drwxr-xr-x 2 root root 0 Jul 18 22:33 mnt/root
> drwxr-xr-x 2 root root 0 Jul 18 22:33 lib64
> drwxr-xr-x 2 root root 0 Jul 18 22:33 etc
> drwxr-xr-x 2 root root 0 Jul 18 22:33 sys
> drwxr-xr-x 2 root root 0 Jul 18 22:33 bin
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/ash -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/cat -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/loadkmap -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/cut -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/setfont -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/kbd_mode -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/echo -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/umount -> /bin/busybox
> -rwxr-xr-x 1 root root 2638208 Jul 18 22:33 bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/mount -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/mdev -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/sleep -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 bin/printf -> /bin/busybox
> drwxr-xr-x 3 root root 0 Jul 18 22:33 usr
> drwxr-xr-x 2 root root 0 Jul 18 22:33 usr/bin
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 usr/bin/setfont -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 usr/bin/kbd_mode -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 usr/bin/printf -> /bin/busybox
> drwxr-xr-x 3 root root 0 Jul 18 22:33 dev
> crw-r--r-- 1 root root 5, 1 Jul 18 22:33 dev/console
> crw-r--r-- 1 root root 4, 64 Jul 18 22:33 dev/ttyS0
> crw-r--r-- 1 root root 1, 3 Jul 18 22:33 dev/null
> crw-r--r-- 1 root root 1, 5 Jul 18 22:33 dev/zero
> drwxr-xr-x 2 root root 0 Jul 18 22:33 proc
> -rwxr-xr-x 1 root root 5707 Jul 18 22:33 init
> lrwxrwxrwx 1 root root 5 Jul 18 22:33 lib -> lib64
> drwxr-xr-x 2 root root 0 Jul 18 22:33 sbin
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 sbin/loadkmap -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 sbin/switch_root -> /bin/busybox
> lrwxrwxrwx 1 root root 12 Jul 18 22:33 sbin/mdev -> /bin/busybox
> 5174 blocks
>
> Then I merged them, as the docs say:
> cat /tmp/ucode.cpio /tmp/my_own_initrd.cpio > /boot/initramfs-3.15.5.img
>
> Booting works fine with this combined initrd, but there is no new microcode applied.
>
> [ 1.058641] microcode: CPU0 sig=0x20661, pf=0x2, revision=0x104
> [ 1.063259] microcode: CPU1 sig=0x20661, pf=0x2, revision=0x104
> [ 1.068011] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
>
> It's only applied much later, when my microcode_ctl runs as a service.
>
> [ 15.764517] microcode: CPU0 sig=0x20661, pf=0x2, revision=0x104
> [ 15.764979] microcode: CPU0 updated to revision 0x105, date = 2011-07-18
> [ 15.765970] microcode: CPU1 sig=0x20661, pf=0x2, revision=0x104
> [ 15.766430] microcode: CPU1 updated to revision 0x105, date = 2011-07-18
>
> Where is the problem? Why is the microcode not being loaded early?
>
> Cheers
> Conrad
Does anybody has some idea, why this is not working for me?
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Early microcode not being loaded
2014-09-01 18:21 ` Conrad Kostecki
@ 2014-09-01 20:17 ` Henrique de Moraes Holschuh
2014-09-01 20:36 ` AW: " Conrad Kostecki
0 siblings, 1 reply; 6+ messages in thread
From: Henrique de Moraes Holschuh @ 2014-09-01 20:17 UTC (permalink / raw)
To: Conrad Kostecki
Cc: Linux (Kernel) Mailingliste (linux-kernel@vger.kernel.org)
On Mon, 01 Sep 2014, Conrad Kostecki wrote:
> -rw-r--r-- 1 root root 1857432 Jul 18 17:01 kernel/x86/microcode/GenuineIntel.bin
That file is way too big. In fact, it is exactly the size of the newest
".dat" file from Intel. The kernel doesn't grok that text format, the
microcode updates have to be converted to binary format, first.
I suggest you use "iucode_tool -S --write-earlyfw=ucode.cpio" to generate
your ucode.cpio.
You can find iucode-tool at:
https://gitorious.org/iucode-tool/pages/Home
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
^ permalink raw reply [flat|nested] 6+ messages in thread
* AW: Early microcode not being loaded
2014-09-01 20:17 ` Henrique de Moraes Holschuh
@ 2014-09-01 20:36 ` Conrad Kostecki
0 siblings, 0 replies; 6+ messages in thread
From: Conrad Kostecki @ 2014-09-01 20:36 UTC (permalink / raw)
To: Linux (Kernel) Mailingliste (linux-kernel@vger.kernel.org)
> That file is way too big. In fact, it is exactly the size of the newest ".dat" file from Intel. The kernel doesn't grok that text format, the microcode updates have to be converted to binary format, first.
> I suggest you use "iucode_tool -S --write-earlyfw=ucode.cpio" to generate your ucode.cpio.
> You can find iucode-tool at:
> https://gitorious.org/iucode-tool/pages/Home
Thanks! That's it. I wasn't aware, that I need to convert first the microcode to binary. It's now working fine.
Cheers
Conrad
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-09-01 20:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-18 20:40 Early microcode not being loaded Conrad Kostecki
2014-07-18 21:24 ` Borislav Petkov
2014-07-18 21:49 ` AW: " Conrad Kostecki
2014-09-01 18:21 ` Conrad Kostecki
2014-09-01 20:17 ` Henrique de Moraes Holschuh
2014-09-01 20:36 ` AW: " Conrad Kostecki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.