Re: [PATCHv1 0/3] Enable crypto module on Amlogic GXBB SoC platform
From: Anand Moon
Date: Thu Dec 12 2019 - 01:28:08 EST
Hi Martin,
On Thu, 12 Dec 2019 at 05:00, Martin Blumenstingl
<martin.blumenstingl@xxxxxxxxxxxxxx> wrote:
>
> Hi Anand,
>
> On Wed, Dec 11, 2019 at 2:17 PM Anand Moon <moon.linux@xxxxxxxxx> wrote:
> [...]
> > Sorry once again I send my logs too early.
> > I still having some issue with the Hardware glx cryto module.
> I'm surprised to see that you managed to get the GXL crypto driver to
> load at all on GXBB
> as far as I know GXBB uses an older crypto IP block (BLKMV) than GXL
> (and newer SoCs, called "DMA"): [0]
>
> so my understanding is that a new crypto driver is needed for GXBB
> (BLKMV registers) support.
> the 32-bit SoCs use the same BLKMV IP block as far as I can tell, so
> these would also benefit from this other driver.
> (I don't know if anyone is working on a BLKMV crypto driver - all I
> can tell is that I'm not working on one)
>
>
> Martin
>
>
> [0] https://github.com/khadas/linux/blob/195ea69f96d9bddc1386737e89769ff350762aea/drivers/amlogic/crypto/Kconfig
*You are absolutely correct. current crypto GLX driver might not work for GXBB*
Yes new crypto driver is needed for this board. I will try to study on
this feature.
But both S805 and S905 share the same crypto IP block for.sure see below link.
[0] https://github.com/khadas/linux/blob/195ea69f96d9bddc1386737e89769ff350762aea/Documentation/devicetree/bindings/crypto/aml-crypto.txt#L1-L61
It's not working see the debug logs.
[alarm@alarm ~]$ sudo modprobe tcrypt sec=1 mode=500
[sudo] password for alarm:
[ 39.567302] tcrypt:
[ 39.567302] testing speed of async ecb(aes) (ecb-aes-gxl) encryption
[ 39.570171] tcrypt: test 0 (128 bit key, 16 byte blocks):
[ 39.570229] gxl-crypto c8832000.crypto: meson_cipher ecb(aes) 16 1
IV(0) key=16 flow=1
[ 41.598687] gxl-crypto c8832000.crypto: DMA timeout for flow 1
[ 41.598900] tcrypt: encryption() failed flags=0
[ 41.603383] tcrypt: test 0 (192 bit key, 16 byte blocks):
[ 41.603424] gxl-crypto c8832000.crypto: meson_cipher ecb(aes) 16 1
IV(0) key=24 flow=0
[ 43.646686] gxl-crypto c8832000.crypto: DMA timeout for flow 0
[ 43.646900] tcrypt: encryption() failed flags=0
[ 43.651378] tcrypt: test 0 (256 bit key, 16 byte blocks):
[ 43.651419] gxl-crypto c8832000.crypto: meson_cipher ecb(aes) 16 1
IV(0) key=32 flow=1
[ 45.694691] gxl-crypto c8832000.crypto: DMA timeout for flow 1
[ 45.694902] tcrypt: encryption() failed flags=0
[ 45.699419] tcrypt:
[ 45.699419] testing speed of async ecb(aes) (ecb-aes-gxl) decryption
[ 45.707838] tcrypt: test 0 (128 bit key, 16 byte blocks):
[ 45.707872] gxl-crypto c8832000.crypto: meson_cipher ecb(aes) 16 0
IV(0) key=16 flow=0
[ 47.742677] gxl-crypto c8832000.crypto: DMA timeout for flow 0
[ 47.742879] tcrypt: decryption() failed flags=0
[ 47.747366] tcrypt: test 0 (192 bit key, 16 byte blocks):
[ 47.747402] gxl-crypto c8832000.crypto: meson_cipher ecb(aes) 16 0
IV(0) key=24 flow=1
[ 49.790684] gxl-crypto c8832000.crypto: DMA timeout for flow 1
[ 49.790898] tcrypt: decryption() failed flags=0
[ 49.795380] tcrypt: test 0 (256 bit key, 16 byte blocks):
[ 49.795420] gxl-crypto c8832000.crypto: meson_cipher ecb(aes) 16 0
IV(0) key=32 flow=0
[ 51.838680] gxl-crypto c8832000.crypto: DMA timeout for flow 0
[ 51.838894] tcrypt: decryption() failed flags=0
[ 51.852005] tcrypt:
[ 51.852005] testing speed of async cbc(aes) (cbc-aes-gxl) encryption
[ 51.854903] tcrypt: test 0 (128 bit key, 16 byte blocks):
[ 51.854941] gxl-crypto c8832000.crypto: meson_cipher cbc(aes) 16 1
IV(16) key=16 flow=1
[ 53.886678] gxl-crypto c8832000.crypto: DMA timeout for flow 1
[ 53.886882] tcrypt: encryption() failed flags=0
[ 53.891385] tcrypt: test 0 (192 bit key, 16 byte blocks):
[ 53.891428] gxl-crypto c8832000.crypto: meson_cipher cbc(aes) 16 1
IV(16) key=24 flow=0
[ 55.934686] gxl-crypto c8832000.crypto: DMA timeout for flow 0
[ 55.934901] tcrypt: encryption() failed flags=0
[ 55.939410] tcrypt: test 0 (256 bit key, 16 byte blocks):
[ 55.939447] gxl-crypto c8832000.crypto: meson_cipher cbc(aes) 16 1
IV(16) key=32 flow=1
[ 57.982684] gxl-crypto c8832000.crypto: DMA timeout for flow 1
[ 57.982899] tcrypt: encryption() failed flags=0
[ 57.987429] tcrypt:
[ 57.987429] testing speed of async cbc(aes) (cbc-aes-gxl) decryption
[ 57.995832] tcrypt: test 0 (128 bit key, 16 byte blocks):
[ 57.995864] gxl-crypto c8832000.crypto: meson_cipher cbc(aes) 16 0
IV(16) key=16 flow=0
[ 60.030680] gxl-crypto c8832000.crypto: DMA timeout for flow 0
[ 60.030880] tcrypt: decryption() failed flags=0
[ 60.035369] tcrypt: test 0 (192 bit key, 16 byte blocks):
[ 60.035406] gxl-crypto c8832000.crypto: meson_cipher cbc(aes) 16 0
IV(16) key=24 flow=1
[ 62.078678] gxl-crypto c8832000.crypto: DMA timeout for flow 1
[ 62.078888] tcrypt: decryption() failed flags=0
[ 62.083377] tcrypt: test 0 (256 bit key, 16 byte blocks):
[ 62.083416] gxl-crypto c8832000.crypto: meson_cipher cbc(aes) 16 0
IV(16) key=32 flow=0
[ 64.126684] gxl-crypto c8832000.crypto: DMA timeout for flow 0
[ 64.126899] tcrypt: decryption() failed flags=0
[ 64.143285] tcrypt: failed to load transform for lrw(aes): -2
[ 64.155243] tcrypt: failed to load transform for lrw(aes): -2
[ 64.167318] tcrypt:
-Anand