From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Konrad Rzeszutek Wilk
<konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: "Yu,
Fenghua" <fenghua.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC v1] dracut.sh: Support early microcode loading.
Date: Wed, 17 Jul 2013 14:40:33 +0200 [thread overview]
Message-ID: <51E690C1.5010004@redhat.com> (raw)
In-Reply-To: <20130712210254.GA26664-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
On 07/12/2013 11:02 PM, Konrad Rzeszutek Wilk wrote:
> From 5f853d2ececd4cadff648e22cb9c9287a01a9783 Mon Sep 17 00:00:00 2001
> From: Konrad Rzeszutek Wilk <konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Date: Tue, 9 Jul 2013 13:57:01 -0400
> Subject: [PATCH] dracut.sh: Support early microcode loading.
>
> Implement it per Linux kernel Documentation/x86/early-microcode.txt
> (from v3.11-rc0):
>
> <start>
> Early load microcode
> ====================
> By Fenghua Yu <fenghua.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> Kernel can update microcode in early phase of boot time. Loading microcode early
> can fix CPU issues before they are observed during kernel boot time.
>
> Microcode is stored in an initrd file. The microcode is read from the initrd
> file and loaded to CPUs during boot time.
>
> The format of the combined initrd image is microcode in cpio format followed by
> the initrd image (maybe compressed). Kernel parses the combined initrd image
> during boot time. The microcode file in cpio name space is:
> on Intel: kernel/x86/microcode/GenuineIntel.bin
> on AMD : kernel/x86/microcode/AuthenticAMD.bin
>
> During BSP boot (before SMP starts), if the kernel finds the microcode file in
> the initrd file, it parses the microcode and saves matching microcode in memory.
> If matching microcode is found, it will be uploaded in BSP and later on in all
> APs.
>
> The cached microcode patch is applied when CPUs resume from a sleep state.
>
> There are two legacy user space interfaces to load microcode, either through
> /dev/cpu/microcode or through /sys/devices/system/cpu/microcode/reload file
> in sysfs.
>
> In addition to these two legacy methods, the early loading method described
> here is the third method with which microcode can be uploaded to a system's
> CPUs.
>
> The following example script shows how to generate a new combined initrd file in
> /boot/initrd-3.5.0.ucode.img with original microcode microcode.bin and
> original initrd image /boot/initrd-3.5.0.img.
>
> mkdir initrd
> cd initrd
> mkdir -p kernel/x86/microcode
> cp ../microcode.bin kernel/x86/microcode/GenuineIntel.bin (or AuthenticAMD.bin)
> find . | cpio -o -H newc >../ucode.cpio
> cd ..
> cat ucode.cpio /boot/initrd-3.5.0.img >/boot/initrd-3.5.0.ucode.img
> <end>
>
> That is what we do in the patch. Furthermoere there is also
> an off-switch: "no-early-microcode" to disable it.
>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> [v1: Support --host-only parameter]
> ---
> dracut-functions.sh | 33 +++++++++++++++++++++++++++++++++
> dracut.sh | 46 ++++++++++++++++++++++++++++++++++++++++++----
> 2 files changed, 75 insertions(+), 4 deletions(-)
>
Pushed to dracut git HEAD, but disabled by default, also added the
--early-microcode option and bash cimpletion.
Man pages still need documentation.
lsinitrd only displays the microcode files at the moment of course.
This is tricky to solve. Any ideas?
next prev parent reply other threads:[~2013-07-17 12:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 19:24 [RFC v1] dracut.sh: Support early microcode loading Konrad Rzeszutek Wilk
[not found] ` <1373397849-11397-1-git-send-email-konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-10 0:29 ` Yu, Fenghua
[not found] ` <3E5A0FA7E9CA944F9D5414FEC6C712205A528195-P5GAC/sN6hlZtRGVdHMbwrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-07-10 7:37 ` Harald Hoyer
[not found] ` <51DD0F27.70202-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-07-10 14:58 ` Konrad Rzeszutek Wilk
[not found] ` <20130710145815.GD11007-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2013-07-12 21:02 ` Konrad Rzeszutek Wilk
[not found] ` <20130712210254.GA26664-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2013-07-17 12:40 ` Harald Hoyer [this message]
[not found] ` <51E690C1.5010004-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-07-17 17:20 ` Konrad Rzeszutek Wilk
2013-07-10 11:13 ` Konrad Rzeszutek Wilk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51E690C1.5010004@redhat.com \
--to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=fenghua.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.