From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Borislav Petkov <bp@alien8.de>, Alexander Hirsch <1zeeky@gmail.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH] x86/microcode: Allow early loading without initrd
Date: Thu, 30 Apr 2015 10:18:14 -0300 [thread overview]
Message-ID: <1430399894.517718.260752813.340456D5@webmail.messagingengine.com> (raw)
In-Reply-To: <20150426161609.GA4053@pd.tnic>
On Sun, Apr 26, 2015, at 13:16, Borislav Petkov wrote:
> * the early loader was done with initrd in mind and it was/still is its
> main source for microcode blobs early in the boot. So if we want to
> make it not-mandatory, then the driver needs to be reorganized so that
> builtin blobs and initrd blobs loading paths are cleanly untangled. The
> ifdeffery thing might work now but is certainly not future-proof so it
> would need to be designed in a cleaner way.
>
> Perhaps something like a microcode cache of patches the AMD loader has,
> all decoupled from the loading paths or so... I don't have a good idea
> right now. I'll have to think about it.
Well, the *early* Intel driver does have a cache of sorts. It could use (a lot of) love, though...
The "cache" in the early intel microcode update driver is implemented by mc_saved_in_initrd[]. It is currently sub-optimal, in that it has MAX_UCODE_COUNT slots (128 slots).
The worst-case real-world fill of this cache is, currently, 7 slots (processor signature 0x6FB). The typical fill would be 1-4 slots.
If we change the code to store at maximum one microcode per pfmask bit plus some other details to handle the "processor does not support pfmask, so it is all zeroes" special case, we can safely change MAX_UCODE_COUNT to either 8 or 9, depending on implementation details.
--
"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
prev parent reply other threads:[~2015-04-30 13:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-26 15:03 Alexander Hirsch
2015-04-26 15:31 ` Paul Bolle
2015-04-26 16:37 ` Alexander Hirsch
2015-04-26 16:16 ` Borislav Petkov
2015-04-26 17:27 ` Alexander Hirsch
2015-04-27 9:23 ` Borislav Petkov
2015-04-30 13:18 ` Henrique de Moraes Holschuh [this message]
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=1430399894.517718.260752813.340456D5@webmail.messagingengine.com \
--to=hmh@hmh.eng.br \
--cc=1zeeky@gmail.com \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®