Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp452873ybl; Wed, 11 Dec 2019 22:23:45 -0800 (PST) X-Google-Smtp-Source: APXvYqz377in+zbpF816N6UV3bK9YWKiH/foAOHiVSUf/UocmgvYwTDDFuQ7GibM0RXVR8vjx9O3 X-Received: by 2002:a9d:74c8:: with SMTP id a8mr6015625otl.57.1576131825162; Wed, 11 Dec 2019 22:23:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576131825; cv=none; d=google.com; s=arc-20160816; b=jiOI+xqplzMi+agn7OYlh+V+4xJ0YvIXVY85wswbFlgKNhgUaQFEi+vtxns+c31MKQ 4zhxQ9c4g+dOGRS8WC12gof+Ma6jG8uWQmXLC0q7XW7vR/LLzhMmgTvGS+3Q8h9o8eid KYaGvDKPkE2K+4NN0TTRY4G/vbN9hqAhwXpXkZKNt4n+BKlPA4fDu4YChGQ8F1r91c7B eCXlWDa6kdEub7AZWfoRe/1SaqqkV7sXXPTdIrXAng2TwaFamK3//FQxlHzFaGDtKxQ0 z3AT4JpcRSBssKxlnpEupE2qwnttgkqD2xvKZ96X+ki0dQJore3sypZj30d7xq76dPD8 WclA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=v6NmxBZ8vV201dlBtVW07bjKFin+mwj/uirkjZ9u0AY=; b=AEC62DBCZXOqSaFfvcXHFuCoYUioVNW7uMKmDNQ9wMuhQBNmMzbQLwpwB68jw7ReAh F2PCPCdewubkQRb9Kyd/q9tXMJc9/9PW2hlzbzhQToVJvTOIetm9q/SR+maNNQczWyDH z6BSYK/K0Fsycv69x/AkEG43MFHELAVkEd02N+QdLcyf8jTXGLgyGHW/iLMFyuYDqCwJ dGqk0ai6Ilt01x1HhDafwqTF1hZjMngIvdj/QhDp3if71ENBk83KxAk6Rp/wnEJv1RG2 AccHiCFB6TgcFvLMgUs5k9eJxkJkzXNJ8SnJ2xLYQ00l4BCPnIO8ENkllFzWqjld654Q d8ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j5SWiyDV; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j71si2556836oib.213.2019.12.11.22.23.27; Wed, 11 Dec 2019 22:23:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j5SWiyDV; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726994AbfLLGXZ (ORCPT + 99 others); Thu, 12 Dec 2019 01:23:25 -0500 Received: from mail-io1-f41.google.com ([209.85.166.41]:37432 "EHLO mail-io1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726833AbfLLGXZ (ORCPT ); Thu, 12 Dec 2019 01:23:25 -0500 Received: by mail-io1-f41.google.com with SMTP id k24so1499930ioc.4; Wed, 11 Dec 2019 22:23:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v6NmxBZ8vV201dlBtVW07bjKFin+mwj/uirkjZ9u0AY=; b=j5SWiyDVBNqZT1PcE6iXH6kE4RXdm62NrmqGIGv09+lSo4LTU5s7rWwFFmSGdpfUNi sukpKFsgP7aFXfbDSo7gsCtzYOPCJbv4q4vWY41dBTOabdpeSYTXBy/5+BMQEItJ15Sy y09om1CxA57hk3TMln3XC75K+AYNnnV77NfqUChNDt1uXAAZ8M3dDrpgwaDVin3vILWY 5RhPY8iXSQ6NpUwvysBTC2YAUy5KsFKZcjVT/rzBCfpILNNiqZf0DlCEupx7Mc3WCoUP QkifWL5/1ME7tcmUiqm0xDlRvNYzSVtT/CW4k6muK0LK6CZCnxvYuOVBQdpJXln2+9kU bFWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v6NmxBZ8vV201dlBtVW07bjKFin+mwj/uirkjZ9u0AY=; b=ZFQS+nT7n0SzJlD/BIj391vJ+EpDB0D/FgsCo5PJKUw9Hx0rc8/kjYdBfDI5jqdPK3 C5wEN76Qy7+CpI7gkOXhn4whvQpJyWd750+mIZjW28tHiwwD4eqWRWhacTiwCN/b0JDM QEiPTab749iF1bAwex0JI7e55syp0Q8mj0gOxTFxHnmnSR1VeLP0gZGEbWcvJV64KZpg gP138NNb/HpgYvGYy8sMz7UBiV4O3OUw1Li8oDieIBEEwftxqQBRsjkMUoL3sY9kQoeK 4arDmMiAIkPKpBy4+2Qrd9TofdfUZcmnqf21uMeJeQnKJI5A/acPSUmGrjIQ1rfpA51p eLOw== X-Gm-Message-State: APjAAAVyRhvHl7RH7yPDVGTy/duLXNxq5kj+V6wx7/efbUvU1y7w12UF fd4d1kosZlIAsvSXrl9sbhaWwk3NcPAXOsiiVfU= X-Received: by 2002:a6b:4401:: with SMTP id r1mr1649395ioa.243.1576131803998; Wed, 11 Dec 2019 22:23:23 -0800 (PST) MIME-Version: 1.0 References: <20191211084112.971-1-linux.amoon@gmail.com> <20191211095043.3kngq7wh77xvadge@gondor.apana.org.au> <1229236701.11947072.1576070229564@mail.yahoo.com> In-Reply-To: From: Anand Moon Date: Thu, 12 Dec 2019 11:53:12 +0530 Message-ID: Subject: Re: [PATCHv1 0/3] Enable crypto module on Amlogic GXBB SoC platform To: Martin Blumenstingl Cc: Anand Moon , Ard Biesheuvel , Mark Rutland , devicetree , Herbert Xu , Neil Armstrong , Kevin Hilman , Linux Kernel , Rob Herring , Corentin Labbe , linux-amlogic@lists.infradead.org, "David S . Miller" , linux-arm-kernel , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi Martin, On Thu, 12 Dec 2019 at 05:00, Martin Blumenstingl wrote: > > Hi Anand, > > On Wed, Dec 11, 2019 at 2:17 PM Anand Moon 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