Subject: Re: Device or pseudo-device for CPU crypto?
To: None <danieldk@pobox.com>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 01/11/2007 13:24:03
On Thu, Jan 11, 2007 at 04:44:57AM -0500, danieldk@pobox.com wrote:
> Hi,
> 
> I have tried to port OpenBSD support for the VIA Padlock AES logic. It
> seems to be working well now. I am cleaning up the code now and am not
> sure how to represent this. The Padlock is not really a device, since it
> is just an additional CPU instruction. I would call it a pseudo-device,
> though I haven't seen (m)any hardware-bound pseudodevices.

This is for in-kernel use?

Just change the existing software crypto implementations to use the
appropriate VIA instructions if they are available.  While you are at it
you can clean up the mess with multiple algorithm implementations, one
set in sys/opencrypto and one in sys/crypto.  If you send a patch that
does this I will help review and rework as necessary.

That will result in even code that doesn't yet know how to use opencrypto
being accellerated by the VIA instructions, which is *really* what you
want.

Thor