Subject: Re: microcode driver for ia-32
To: NetBSD-tech-kern <tech-kern@NetBSD.org>
From: phlox <phlox-netbsd-kern@fnop.net>
List: tech-kern
Date: 08/06/2004 23:22:56
--k+w/mQv8wyuph6w0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2004.08.06 19:18:03 +0000, Sascha Retzki wrote:
> I like the second, because of the "UNIX semantics". What about a
> directory ?
My ideia about creating only a device is to develop an ioctl() interface li=
ke
this (aka envsys(4) style):
struct microcode_t {
    u_int32_t proc_num;   /* MP processor number */
   =20
    [microcode update header]
} update;

for i in each proc in the system:
    update.proc_num =3D i;
    ioctl(fd, WRITE_MICROCODE, update);

and let the driver read proc_num from the struct. This way letting the user
control which CPU to update.
Anyway, having /dev/microcode[0-1023] or /dev/microcode/[0-1023] is not very
good IMHO, though it follows the UNIX semantic of 'one file per device'.

Regards.


--=20
  "Simplicity is the ultimate=20
    sophistication."=20
    -- Leonardo da Vinci     =20


--k+w/mQv8wyuph6w0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFBFAS/E4RCxrBa3LcRAhq8AJwO6Qig8On+R7jVgqqkdeCN9tEkDQCfetj8
fbsKEySUQ6Awq5ZoT1r6pPU=
=Fghk
-----END PGP SIGNATURE-----

--k+w/mQv8wyuph6w0--