svn commit: r334046 - head/tools/tools/intel-ucode-split

Mark Johnston markj at freebsd.org
Sun Jun 17 12:57:21 UTC 2018


On Sun, Jun 17, 2018 at 02:50:44PM +0200, Oliver Pinter wrote:
> On Sunday, June 17, 2018, Mark Johnston <markj at freebsd.org> wrote:
> 
> > On Sat, Jun 16, 2018 at 06:25:03PM -0700, Eitan Adler wrote:
> > > On 13 June 2018 at 07:07, Mark Johnston <markj at freebsd.org> wrote:
> > > > On Wed, Jun 13, 2018 at 01:46:34AM +0200, Oliver Pinter wrote:
> > > >> I'm considering to write an in kernel microcode update facility,
> > based on
> > > >> firmware(9), and in first idea it would be nice during the generation
> > of
> > > >> firmware modules.
> > > >
> > > > FWIW, I'm working on this for 12.0 and was planning to describe my
> > > > proposal on -arch in the next couple of weeks.  For my purposes at
> > > > least, firmware(9) isn't suitable.  We'd like to ensure that updates
> > are
> > > > applied before the kernel does CPU identification, and that happens
> > > > quite early during boot.  This places some constraints on the
> > > > implementation which exclude firmware(9).
> > >
> > > Naive question, knowing nothing about firmware(9), but why can't it be
> > > enhanced to work that early? It seems there might be other use-cases
> > > for very-early-boot firmware application.
> >
> > The constraint means that almost none of the standard kernel APIs (e.g.,
> > malloc()) are usable at the time that the update is to be applied.  It
> > doesn't seem practical to me to try and implement firmware(9)'s
> > abstractions under such limitations.  Further, because microcode
> > updating is an platform-specific operation, in this case it's preferable
> > to tie the implementation to that platform's code.
> 
> 
> How do you plan to put the firmware into memory? Preload it with the loader
> or compile into kernel module or with somehow early fs access from kernel?
> 
> Or instead of updating the microcode from kernel, do the whole process from
> the loader?
> This will be problematic in resume case.

The loader can be instructed to load arbitrary files into memory before
beginning execution of the kernel.  Currently, my plan is to check for a
loaded microcode file early in the MD startup code, and apply the update
if one is present.  This will be done following a resume as well.


More information about the svn-src-all mailing list