Hello Andrei, thanks for getting back on this... On Sat, 16/04/2016 at 09.01 +0300, Andrei Borzenkov wrote: > 16.04.2016 02:18, Guido Trentalancia пишет: > > This is the initial version of a new "microcode" dracut module > > that can be used to update the microcode on Intel(R) CPUs. > > > > ??? dracut already supports early microcode loading, why it is not > enough and what problem this patch solves? To be honest, I didn't notice it. I was expecting such support, if available, to be a module and I couldn't find it, so I wrote it. However, I have noticed it is much simpler than the actual implementation. It doesn't differentiate between Intel and AMD (why it should ?), it just loads the microcode in the standard location as defined by the microcode update utility. > > Signed-off-by: Guido Trentalancia <guido@xxxxxxxxxxxxxxxx> > > --- > > modules.d/00microcode/module-setup.sh | 26 > > ++++++++++++++++++++++++++ > > modules.d/99base/init.sh | 9 +++++++++ > > 2 files changed, 35 insertions(+) > > > > diff -pruN dracut-git/modules.d/00microcode/module-setup.sh dracut- > > git-microcode-update/modules.d/00microcode/module-setup.sh > > --- dracut-git/modules.d/00microcode/module-setup.sh 1970- > > 01-01 01:00:00.000000000 +0100 > > +++ dracut-git-microcode-update/modules.d/00microcode/module- > > setup.sh 2016-04-16 01:11:20.719287468 +0200 > > @@ -0,0 +1,26 @@ > > +#!/bin/bash > > + > > +# Dracut module to update the microcode on Intel(R) CPUs > > +# Copyright 2016 Guido Trentalancia <guido@xxxxxxxxxxxxxxxx> > > + > > +# called by dracut > > +check() { > > + [[ "$mount_needs" ]] && return 1 > > + > > + require_binaries microcode_ctl || return 1 > > + > > + return 0 > > +} > > + > > +# called by dracut > > +depends() { > > + return 0 > > +} > > + > > +# called by dracut > > +install() { > > + inst microcode_ctl > > + > > + inst_dir /lib/firmware > > + inst /lib/firmware/microcode.dat > > +} > > diff -pruN dracut-git/modules.d/99base/init.sh dracut-git- > > microcode-update/modules.d/99base/init.sh > > --- dracut-git/modules.d/99base/init.sh 2016-04-14 > > 22:21:22.681548895 +0200 > > +++ dracut-git-microcode-update/modules.d/99base/init.sh 201 > > 6-04-16 01:09:58.517080944 +0200 > > @@ -62,6 +62,15 @@ if ! ismounted /dev/shm; then > > mount -t tmpfs -o mode=1777,noexec,nosuid,nodev,strictatime > > tmpfs /dev/shm >/dev/null > > fi > > > > +# Update CPU microcode > > +if [ -x /usr/sbin/microcode_ctl ]; then > > + MICROCODE_CTL=/usr/sbin/microcode_ctl > > +elif [ -x /sbin/microcode_ctl ]; then > > + MICROCODE_CTL=/sbin/microcode_ctl > > +fi > > +[ $MICROCODE_CTL ] && [ ! -e /dev/cpu/microcode ] && echo > > "Creating microcode update device..." && mknod /dev/cpu/microcode c > > 10 184 > > +[ $MICROCODE_CTL ] && [ -e /lib/firmware/microcode.dat ] && > > $MICROCODE_CTL -u > > + > > if ! ismounted /run; then > > mkdir -m 0755 /newrun > > if ! str_starts "$(readlink -f /bin/sh)" "/run/"; then -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html