AMD Geode LX crypto accelerator (glxsb)

Michael Proto mike at jellydonut.org
Tue Jun 24 13:12:22 UTC 2008


Patrick Lamaizière wrote:
> Le Fri, 6 Jun 2008 23:41:35 +0200,
> Patrick Lamaizière <patfbsd at davenulle.org> a écrit :
> 
> Hello,
> 
>> I'm trying to port the glxsb driver from OpenBSD to FreeBSD 7-STABLE
>> (via the NetBSD port).
>> " The glxsb driver supports the security block of the Geode LX
>> series processors.  The Geode LX is a member of the AMD Geode family
>> of integrated x86 system chips.
>>
>> Driven by periodic checks for available data from the generator,
>> glxsb supplies entropy to the random(4) driver for common usage.
>>
>> glxsb also supports acceleration of AES-128-CBC operations for
>> crypto(4)."
> 
> Well, I hope this is the final version.
> 
> http://user.lamaiziere.net/patrick/glxsb-220608.tar.gz
> 
> I added a patch for FreeBSD 6 but i'am not able to test it.
> 
> On 7-STABLE, I've tested with hundred openssl encryptions and some flood
> pings under ipsec in the background. Looks good for me.
> 
> If someone can test and review it, it would be cool.


I don't know if you built it for this or not, but I just tested your
module on 8-CURRENT (last supped May 19) and its working beautifully on
an ALIX.3c1 (GeodeLX 700):

Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.0-CURRENT #0: Thu Jun  5 22:44:20 EDT 2008
    root at minibsd8-dev.localnet:/usr/obj/usr/src/sys/MINIBSD8
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Geode(TM) Integrated Processor by AMD PCS (431.65-MHz 586-class CPU)
  Origin = "AuthenticAMD"  Id = 0x5a2  Stepping = 2
  Features=0x88a93d<FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CLFLUSH,MMX>
  AMD Features=0xc0400000<MMX+,3DNow!+,3DNow!>
real memory  = 134217728 (128 MB)
avail memory = 126152704 (120 MB)
pnpbios: Bad PnP BIOS data checksum
wlan: mac acl policy registered
K6-family MTRR support enabled (2 registers)
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
cryptosoft0: <software crypto> on motherboard
pcib0: <Host to PCI bridge> pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
Geode LX: PC Engines ALIX.2 v0.98 tinyBIOS V1.4a (C)1997-2007
glxsb0: <AMD Geode LX Security Block (AES-128-CBC,RNG)> mem
0xefff4000-0xefff7fff irq 9 at device 1.2 on pci0


Output from "openssl speed -engine cryptodev -elapsed -evp aes-128-cbc
aes-128-cbc"

engine "cryptodev" set.
You have chosen to measure elapsed time instead of user CPU time.
To get the most accurate results, try to run this
program when this computer is idle.
Doing aes-128 cbc for 3s on 16 size blocks: 668161 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 64 size blocks: 178842 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 256 size blocks: 45510 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 1024 size blocks: 11435 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 8192 size blocks: 1429 aes-128 cbc's in 3.00s
Doing aes-128-cbc for 3s on 16 size blocks: 61055 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 59430 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 53475 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 37812 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 9323 aes-128-cbc's in 3.00s
OpenSSL 0.9.8e 23 Feb 2007
built on: Thu Jun  5 21:15:55 EDT 2008
options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long)
aes(partial) blowfish(idx)
compiler: cc
available timing options: USE_TOD HZ=128 [sysconf value]
timing function used: gettimeofday
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192
bytes
aes-128 cbc       3563.35k     3815.11k     3883.37k     3901.80k
3900.02k
aes-128-cbc        325.65k     1267.73k     4562.72k    12904.84k
25453.89k


Thanks for that, hopefully it can/will be committed soon!


-Proto


More information about the freebsd-hackers mailing list