[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANAwSgQOTA0mSvFW5otaCzFPHidhY7VFcrXZHjCD-1XkQpcx3w@mail.gmail.com>
Date: Wed, 11 Dec 2019 15:07:53 +0530
From: Anand Moon <linux.amoon@...il.com>
To: Neil Armstrong <narmstrong@...libre.com>
Cc: Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Corentin Labbe <clabbe@...libre.com>,
Kevin Hilman <khilman@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S . Miller" <davem@...emloft.net>,
devicetree <devicetree@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
linux-amlogic@...ts.infradead.org,
Linux Kernel <linux-kernel@...r.kernel.org>,
linux-crypto@...r.kernel.org
Subject: Re: [PATCHv1 0/3] Enable crypto module on Amlogic GXBB SoC platform
Hi Neil,
On Wed, 11 Dec 2019 at 14:23, Neil Armstrong <narmstrong@...libre.com> wrote:
>
> hi,
>
>
> On 11/12/2019 09:41, Anand Moon wrote:
> > Below changes enable cryto module on Amlogic GXBB SoC.
> >
> > I was realy happy to get this feature working on Odroid C2 SBC.
> > I will try on other SBC in the future.
> >
> > Tested with loading tcrypt module.
> > # sudo modprobe tcrypt sec=1 mode=200
> > [sudo] password for alarm:
> > [ 903.867059] tcrypt:
> > [ 903.867059] testing speed of async ecb(aes) (ecb(aes-arm64)) encryption
> > [ 903.870265] tcrypt: test 0 (128 bit key, 16 byte blocks): 1922107 operations in 1 seconds (30753712 bytes)
> > [ 904.872802] tcrypt: test 1 (128 bit key, 64 byte blocks): 679032 operations in 1 seconds (43458048 bytes)
> > [ 905.872717] tcrypt: test 2 (128 bit key, 256 byte blocks): 190190 operations in 1 seconds (48688640 bytes)
> > [ 906.872793] tcrypt: test 3 (128 bit key, 1024 byte blocks): 49014 operations in 1 seconds (50190336 bytes)
> > [ 907.872808] tcrypt: test 4 (128 bit key, 1472 byte blocks): 34342 operations in 1 seconds (50551424 bytes)
> > [ 908.876828] tcrypt: test 5 (128 bit key, 8192 byte blocks): 6199 operations in 1 seconds (50782208 bytes)
> >
> > -Anand
> >
> > Anand Moon (3):
> > arm64: dts: amlogic: adds crypto hardware node for GXBB SoCs
> > dt-bindings: crypto: Add compatible string for amlogic GXBB SoC
> > crypto: amlogic: Add new compatible string for amlogic GXBB SoC
> >
> > .../devicetree/bindings/crypto/amlogic,gxl-crypto.yaml | 1 +
> > arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 10 ++++++++++
> > drivers/crypto/amlogic/amlogic-gxl-core.c | 1 +
> > 3 files changed, 12 insertions(+)
> >
>
> Wow, I'm surprised it works on GXBB, Amlogic completely removed HW crypto for GXBB in all their
> vendor BSPs, in Linux, U-Boot and ATF chain.
Sorry I was not aware of this. :$
>
> Could you run more tests to be sure it's really functional ?
>
> Neil
>From the public datasheet for Odroid C2 [0] S905_Public_Datasheet_V1.1.4.pdf
Chapter 27.1 : "crypto engine is one encrypt/decrypt function accelerator"
AES block cipher with 128/192/256 Bits keys, standard 16 bytes block
size and streaming ECB, CBC and CTR modes
DES/TDES block cipher with ECB and CBC modes supporting 64 Bits key
for DES and 192 Bits key for 3DES
Hardware key-ladder operation and DVB-CSA for transport stream encryption
Built-in hardware True Random Number Generator (TRNG), CRC and
SHA-1/SHA-2 (SHA-224/SHA-256) engine
But in my testing I did not see any count increment in /proc/interrupts
32: 0 0 0 0 GICv2 201 Level ppmmu2
33: 0 0 0 0 GICv2 35 Edge meson
34: 0 0 0 0 GICv2 89 Edge
dw_hdmi_top_irq, c883a000.hdmi-tx
35: 0 0 0 0 GICv2 220 Edge
gxl-crypto
36: 0 0 0 0 GICv2 221 Edge
gxl-crypto
[0] https://dn.odroid.com/S905/DataSheet/S905_Public_Datasheet_V1.1.4.pdf
Attach is the some testing. *But not sure this is Hardware Accelerated.* :<
-Anand
View attachment "crypto_odroidc2.txt" of type "text/plain" (35848 bytes)
Powered by blists - more mailing lists