Re: x86/microcode update on systems without INITRD

From: Markus Trippelsdorf
Date: Fri Jan 08 2016 - 07:21:08 EST


On 2016.01.08 at 12:18 +0000, Mike Keehan wrote:
> On Thu, 7 Jan 2016 13:41:11 +0100
> Markus Trippelsdorf <markus@xxxxxxxxxxxxxxx> wrote:
>
> > On 2016.01.07 at 13:36 +0100, Thomas Voegtle wrote:
> > > On Thu, 7 Jan 2016, Borislav Petkov wrote:
> > >
> > > >On Thu, Jan 07, 2016 at 01:12:16PM +0100, Thomas Voegtle wrote:
> > > >>I just diffed my 4.3 config with the 4.4 config and saw that the
> > > >>whole Microcode stuff was silently dropped by a normal "make
> > > >>oldconfig".
> > > >
> > > >Can you send me that 4.3 config please?
> > >
> > > Attached. It is a little bit unusual config without modules etc.
> > >
> > > But doesn't dropping Microcde stuff in the config happen to anyone
> > > who hasn't INITRD stuff switched on?
> >
> > Yes. But, as I wrote above, if you simply drop the BLK_DEV_INITRD
> > dependency, it will work just fine.
> > I also don't use modules and the firmware gets applied at boot time.
> >
> > ...
> > [ 2.573261] EDAC amd64: MCT channel count: 2
> > [ 2.573401] EDAC MC0: Giving out device to module amd64_edac
> > controller F10h: DEV 0000:00:18.2 (INTERRUPT) [ 2.573414] EDAC
> > PCI0: Giving out device to module amd64_edac controller EDAC PCI
> > controller: DEV 0000:00:18.2 (POLLED) [ 2.573424] hidraw: raw HID
> > events driver (C) Jiri Kosina [ 2.573449] usbcore: registered new
> > interface driver usbhid [ 2.573449] usbhid: USB HID core driver
> > [ 2.573770] usbcore: registered new interface driver snd-usb-audio
> > [ 2.573786] Netfilter messages via NETLINK v0.30. [ 2.573797]
> > nf_conntrack version 0.5.0 (65536 buckets, 262144 max) [ 2.573966]
> > ctnetlink v0.93: registering with nfnetlink. [ 2.574427]
> > ip_tables: (C) 2000-2006 Netfilter Core Team [ 2.574477] NET:
> > Registered protocol family 17 [ 2.574487] 9pnet: Installing 9P2000
> > support [ 2.574717] microcode: CPU0: patch_level=0x010000db
> > [ 2.574724] microcode: CPU1: patch_level=0x010000db
> > [ 2.574731] microcode: CPU2: patch_level=0x010000db
> > [ 2.574736] microcode: CPU3: patch_level=0x010000db
> > [ 2.574761] microcode: Microcode Update Driver: v2.01
> > <tigran@xxxxxxxxxxxxxxxxxxxx>, Peter Oruba [ 2.574876] registered
> > taskstats version 1 [ 2.575132] Btrfs loaded
> > ...
> >
>
> I'm not sure what you mean by "drop the BLK_DEV_INITRD dependency",
> but my microcode does not get loaded unless I have BLK_DEV_INITRD=Y
> in my .config.
>
> I don't use initrd, but I do use modules.

I mean:

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index db3622f22b61..52c6964e24bd 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1126,7 +1126,6 @@ config MICROCODE
bool "CPU microcode loading support"
default y
depends on CPU_SUP_AMD || CPU_SUP_INTEL
- depends on BLK_DEV_INITRD
select FW_LOADER
---help---

--
Markus