mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tigran Aivazian <tigran@veritas.com>
To: Maciej Zenczykowski <maze@cela.pl>
Cc: "Nakajima, Jun" <jun.nakajima@intel.com>,
	"Giacomo A. Catenazzi" <cate@debian.org>,
	<linux-kernel@vger.kernel.org>, <simon@urbanmyth.org>
Subject: RE: RFC: changes to microcode update driver.
Date: Tue, 7 Oct 2003 09:03:20 -0700 (PDT)	[thread overview]
Message-ID: <Pine.GSO.4.44.0310070901010.23226-100000@south.veritas.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0310071747030.31485-100000@gaia.cela.pl>

On Tue, 7 Oct 2003, Maciej Zenczykowski wrote:

> > As Tigran pointed out, we are active in this area too. At this point we
> > want to add support of the extended update format to the driver, before
> > we ship the latest microcode data. Some of them require the new format.
>
> Do we even have any use for a userspace utility anymore?
> strace'ing the microcode_ctl -u process results in information that the
  ~~~~~~~~~~

If you read the code instead of stracing you would have discovered that
there is a little (i.e. undocummented :) switch to do everything you
described below.

As for compiling the microcode data into the kernel (as scsi firmware etc)
I recall that Alan Cox said we are moving away from that sort of thing,
so it's not a good idea.

Kind regards.
Tigran

> microcode.dat file is converted to binary and written to
> /dev/cpu/microcode.  The following code:
> #include <stdio.h>
> int main (void) {
>   int x[4], i;
>   while ((i = scanf("%x, %x, %x, %x,\n", &x[0], &x[1], &x[2], &x[3])) > 0)
> fwrite(x, 4, i, stdout);
>   return 0;
> };
> does the conversion to binary:
> cat /etc/microcode.dat | grep -v "^/" | ./a.out > microcode.raw
> and the following loads it:
> dd bs=`ls -s --block-size=1 microcode.raw | cut -f 1 -d " "`
> if=microcode.raw of=/dev/cpu/microcode
>
> Either distribute the microcode in binary form and load it via dd (in the
> /etc/rc.d/init.d/microcode script)
> or include the text file parser in the microcode module - since the module
> is only needed during loading of the update this tiny amount of extra code
> is likely acceptable.  For reducing kernel size for embedded systems (any
> based on ia32 lacking the few kb?) try compiling the 2kb update relevant
> for the given processor directly into the kernel...
>
> Just a few ideas...
>
> MaZe.
>
>


  reply	other threads:[~2003-10-07 16:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-07 13:56 Nakajima, Jun
2003-10-07 15:56 ` Maciej Zenczykowski
2003-10-07 16:03   ` Tigran Aivazian [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-07 10:58 Tigran Aivazian
2003-10-07 11:02 ` Tigran Aivazian
2003-10-07 13:34 ` Giacomo A. Catenazzi
2003-10-07 13:48   ` Tigran Aivazian
2003-10-07 13:54 ` Dave Jones
2003-10-08  8:59   ` Tigran Aivazian
2003-10-08 10:07     ` Mikael Pettersson
2003-10-08 19:43 ` Jamie Lokier

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=Pine.GSO.4.44.0310070901010.23226-100000@south.veritas.com \
    --to=tigran@veritas.com \
    --cc=cate@debian.org \
    --cc=jun.nakajima@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maze@cela.pl \
    --cc=simon@urbanmyth.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®