On Wednesday 01 Feb 2017 00:55:01 Marc Joliet wrote:
> On Sunday 29 January 2017 13:51:39 Mick wrote:
> > Hi All,
> > 
> > I am trying out a systemd installation on a MackBook Pro and I am not sure
> > the documentation on systemd + microcode is entirely correct.  So, I read
> > here:
> > 
> > https://wiki.gentoo.org/wiki/Intel_microcode#systemd
> > 
> > that the "microcode loader is set as a module in the kernel
> > configuration".
> > However, my kernel configuration is not offering this option.  Both 'CPU
> > microcode loading support' and 'Intel microcode loading support' can only
> > be set as built in elements.  I am not using an initramfs (yet) so I
> > wonder how I should go about this.
> 
> AIUI these days the microcode is supposed to be put in the initramfs and
> loaded from there during early boot (I read this somewhere, but don't
> remember where).  Dracut takes care of this, e.g., the initramfs on my
> laptop contains a microcode blob:
> 
> # lsinitrd /boot/initramfs-4.9.6-gentoo.img|grep -i micro
> drwxr-xr-x   1 root     root            0 Jan 27 01:14 kernel/x86/microcode
> -rw-r--r--   1 root     root       983040 Jan 27 01:14
> kernel/x86/microcode/GenuineIntel.bin
> 
> The third journal entry on said laptop is then:
> 
> Jan 30 20:42:17 localhost kernel: microcode: microcode updated early to
> revision 0x4, date = 2013-06-28
> 
> So it looks to me like the kernel loads it autonomously, and the reason to
> put the file in the initramfs is for the microcode to get updated as early
> as possible (before the kernel has to read from disk).
> 
> HTH

I eventually got on top of this.  No initramfs is needed, although if you are 
using one then it will serve the same purpose too.

These are the steps I followed:

Emerged sys-apps/iucode_tool and ran:

iucode_tool -S

which spewed out the CPU signature as:  0x00040661

Then I emerged intel-microcode with USE=split-ucode, to generate the microcode 
binaries the kernel can use directly.  Saving and searching through the output 
of the emerge compilation I found this snippet:

 intel-ucode/06-46-01
 signature: 0x40661     <===<
 flags:     0x32
 revision:  0x16
 date:      2016-04-01
 size:      24576

Previously in a rush, I got confused when I compared the hex notation of the 
CPU signature with 0x000 in front of it, with the above.  Thereafter I added 
'intel-ucode/06-46-01' in the kernel, like so:

Device Drivers  --->
  Generic Driver Options  --->
    [*]   Include in-kernel firmware blobs in kernel binary
    (intel-ucode/06-46-01 <other_CPU_firmware_follows_here>) External firmware 
blobs to build into the kernel binary
    (/lib/firmware/) Firmware blobs root directory

The intel-ucode needs to be loaded early at the start of the boot process, so 
I put it first and comma separated the rest of the CPU firmware blobs.  I now 
get an output which clearly states "microcode updated early".

I posted this in case it helps others too.
-- 
Regards,
Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to