Subject: Re: microcode driver for ia-32
To: NetBSD-tech-kern <tech-kern@netbsd.org>
From: Sascha Retzki <lantis@iqranet.info>
List: tech-kern
Date: 08/06/2004 19:18:03
Am Fr, 2004-08-06 um 18.38 schrieb Bill Studenmund:
> On Fri, Aug 06, 2004 at 04:13:58PM +0100, phlox wrote:
> > Greetings.
> > I'm developing a character device driver for NetBSD that will allow the
> > microcode update in the IA-32 architecture, but I have some design questions
> > that I would like to clarify:
> > * What devices should I use for SMP machines ? Should I create only
> > /dev/microcodei (and then use ioctl() to select the CPU)
> > or /dev/microcode[0-3] (for a 4-way SMP system) ?
> > (I think the last follows UNIX semantics better).
>
> I'd say just one device will be fine. The important thing is that you
> won't have concurrent, multi-user access to the different devices; they
> aren't tty's that folks are logged-onto. Also, once you've done the
> update, you don't need the devices anymore.
>
> Further, there are systems out there with much more than 4 CPUs on them.
> Higher-end iron can have 16 or 64 heads, and really-high end stuff can
> have 512 or 1024 heads. It would be really really messy to have to have a
> node for each one.
>
> > * I've been seeing the lkm code and I found that the loaded lkm list is an
> > array (lkmods[MAXLKMS]). Why isn't it a linked list, since this would
> > allow better cleanness ?
>
> Laziness probably.
>
> Take care,
>
> Bill
I like the second, because of the "UNIX semantics". What about a
directory ?