Message ID | 20221130055214.2416888-1-jiajie.ho@starfivetech.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp746398wrr; Tue, 29 Nov 2022 21:57:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf6cf2nj7m9DNbTUfAPg8GDFnnW/cNR2O1Y8zXycMDpKnFsGRXNc+MqVDgHvebpnsTTw9SVT X-Received: by 2002:a17:90a:4605:b0:218:7dd7:ad4c with SMTP id w5-20020a17090a460500b002187dd7ad4cmr61006206pjg.224.1669787876318; Tue, 29 Nov 2022 21:57:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669787876; cv=none; d=google.com; s=arc-20160816; b=IlA6O7d/TJtZZGeAiYz6Eo8ymMnrEJdp6II0HVkbKk5z4uxfZjqweW77YVc/SlIIUP Z1xzoAtm0ts13LELNcIHlKU8GJp0nvbMSd8igbUczCzbP13kBDR9too8bv/oj4eH7Uf4 1lkuiCY2XZBKV/OG8F/b5Gs1vGMEcJ20XTdOno8pfJR5xZzcwUhebaa8JOKrY9ybBIBH CYARdwXl06IMKI4bwuywovwgxIom7LAEBplcg6kXZuAfBq7KSnqtV76ie1QQRPsR5kXQ 27M8kus8RGgHO11/9KwrIPbsejTsS+mTmsZ+/6nNXWUNjq9N/V1hy68r1jR09WaPViIe RBaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=fukM/aisIeIxcQ6sGkXBC2MHZiX+Gy0irgywCZL4km0=; b=ZcrrDC+BNh2qNF4FNkQTxWIzZWHE41gzn72VC5l3VPBwv1ZGnSFWgiX1cnqW/11OTq 5grogWFqpFUOtRrBSsR3GIF9za4YMku/nCsUruYcCStz8u4mkwtnbtzOeQ0jgu54LSAp hfg526/EUYB6H7kD6vqh/kUXNUaceV9PXPGSg5POask1glA3XxuOWgtTWh6jnvxTLsOU Pg4SMOEFknubrJhCyILZuD5bFKv/gpD0flzf9TtOr0FXbyJ95rUIAooVpYHcYH5n4wax ekO+LQag+EhDMKT4AMWdl+KKYHiphjymOVbAyQz+bbU/MrH9IetPpHHPnrUuQQjlZzdX WZiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id na9-20020a17090b4c0900b0021421d45058si781300pjb.103.2022.11.29.21.57.43; Tue, 29 Nov 2022 21:57:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233741AbiK3Fzf convert rfc822-to-8bit (ORCPT <rfc822;heyuhang3455@gmail.com> + 99 others); Wed, 30 Nov 2022 00:55:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233039AbiK3Fz2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 30 Nov 2022 00:55:28 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93AF9654D6; Tue, 29 Nov 2022 21:55:27 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 1CEE524E0AC; Wed, 30 Nov 2022 13:52:21 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 30 Nov 2022 13:52:21 +0800 Received: from ubuntu.localdomain (202.188.176.82) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 30 Nov 2022 13:52:17 +0800 From: Jia Jie Ho <jiajie.ho@starfivetech.com> To: Herbert Xu <herbert@gondor.apana.org.au>, "David S . Miller" <davem@davemloft.net>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> CC: <linux-crypto@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org>, Jia Jie Ho <jiajie.ho@starfivetech.com> Subject: [PATCH 0/6] crypto: starfive: Add driver for cryptographic engine Date: Wed, 30 Nov 2022 13:52:08 +0800 Message-ID: <20221130055214.2416888-1-jiajie.ho@starfivetech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.188.176.82] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750899491987864038?= X-GMAIL-MSGID: =?utf-8?q?1750899491987864038?= |
Series |
crypto: starfive: Add driver for cryptographic engine
|
|
Message
JiaJie Ho
Nov. 30, 2022, 5:52 a.m. UTC
This patch series adds kernel driver support for Starfive crypto engine. The engine supports hardware acceleration for HMAC/hash functions, AES block cipher operations and RSA. The first patch adds basic driver for device probe and DMA init. The subsequent patches adds supported crypto primitives to the driver which include hash functions, AES and RSA. Patch 5 adds documentation to describe device tree bindings and the last patch adds device node to VisionFive 2 dts. The driver has been tested with crypto selftest and additional test. This patch series depends on the following patches: https://patchwork.kernel.org/project/linux-riscv/cover/20221118010627.70576-1-hal.feng@starfivetech.com/ https://patchwork.kernel.org/project/linux-riscv/cover/20221118011714.70877-1-hal.feng@starfivetech.com/ Jia Jie Ho (6): crypto: starfive - Add StarFive crypto engine support crypto: starfive - Add hash and HMAC support crypto: starfive - Add AES skcipher and aead support crypto: starfive - Add Public Key algo support dt-bindings: crypto: Add bindings for Starfive crypto driver riscv: dts: starfive: Add crypto and DMA node for VisionFive 2 .../bindings/crypto/starfive-crypto.yaml | 109 ++ MAINTAINERS | 7 + .../jh7110-starfive-visionfive-v2.dts | 8 + arch/riscv/boot/dts/starfive/jh7110.dtsi | 36 + drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile | 1 + drivers/crypto/starfive/Kconfig | 20 + drivers/crypto/starfive/Makefile | 4 + drivers/crypto/starfive/starfive-aes.c | 1723 +++++++++++++++++ drivers/crypto/starfive/starfive-cryp.c | 324 ++++ drivers/crypto/starfive/starfive-hash.c | 1152 +++++++++++ drivers/crypto/starfive/starfive-pka.c | 683 +++++++ drivers/crypto/starfive/starfive-regs.h | 200 ++ drivers/crypto/starfive/starfive-str.h | 194 ++ 14 files changed, 4462 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/starfive-crypto.yaml create mode 100644 drivers/crypto/starfive/Kconfig create mode 100644 drivers/crypto/starfive/Makefile create mode 100644 drivers/crypto/starfive/starfive-aes.c create mode 100644 drivers/crypto/starfive/starfive-cryp.c create mode 100644 drivers/crypto/starfive/starfive-hash.c create mode 100644 drivers/crypto/starfive/starfive-pka.c create mode 100644 drivers/crypto/starfive/starfive-regs.h create mode 100644 drivers/crypto/starfive/starfive-str.h
Comments
> -----Original Message----- > From: JiaJie Ho <jiajie.ho@starfivetech.com> > Sent: Wednesday, November 30, 2022 1:52 PM > To: Herbert Xu <herbert@gondor.apana.org.au>; David S . Miller > <davem@davemloft.net>; Rob Herring <robh+dt@kernel.org>; Krzysztof > Kozlowski <krzysztof.kozlowski+dt@linaro.org> > Cc: linux-crypto@vger.kernel.org; devicetree@vger.kernel.org; linux- > kernel@vger.kernel.org; linux-riscv@lists.infradead.org; JiaJie Ho > <jiajie.ho@starfivetech.com> > Subject: [PATCH 0/6] crypto: starfive: Add driver for cryptographic engine > > This patch series adds kernel driver support for Starfive crypto engine. > The engine supports hardware acceleration for HMAC/hash functions, AES > block cipher operations and RSA. The first patch adds basic driver for device > probe and DMA init. The subsequent patches adds supported crypto > primitives to the driver which include hash functions, AES and RSA. Patch 5 > adds documentation to describe device tree bindings and the last patch adds > device node to VisionFive 2 dts. > > The driver has been tested with crypto selftest and additional test. > > This patch series depends on the following patches: > https://patchwork.kernel.org/project/linux- > riscv/cover/20221118010627.70576-1-hal.feng@starfivetech.com/ > https://patchwork.kernel.org/project/linux- > riscv/cover/20221118011714.70877-1-hal.feng@starfivetech.com/ > > Jia Jie Ho (6): > crypto: starfive - Add StarFive crypto engine support > crypto: starfive - Add hash and HMAC support > crypto: starfive - Add AES skcipher and aead support > crypto: starfive - Add Public Key algo support > dt-bindings: crypto: Add bindings for Starfive crypto driver > riscv: dts: starfive: Add crypto and DMA node for VisionFive 2 > Hi Herbert/David, Could you please help to review and provide comments on this patch series? Thank you in advance. Best regards, Jia Jie
On 08/12/2022 10:09, JiaJie Ho wrote: >> >> The driver has been tested with crypto selftest and additional test. >> >> This patch series depends on the following patches: >> https://patchwork.kernel.org/project/linux- >> riscv/cover/20221118010627.70576-1-hal.feng@starfivetech.com/ >> https://patchwork.kernel.org/project/linux- >> riscv/cover/20221118011714.70877-1-hal.feng@starfivetech.com/ >> >> Jia Jie Ho (6): >> crypto: starfive - Add StarFive crypto engine support >> crypto: starfive - Add hash and HMAC support >> crypto: starfive - Add AES skcipher and aead support >> crypto: starfive - Add Public Key algo support >> dt-bindings: crypto: Add bindings for Starfive crypto driver >> riscv: dts: starfive: Add crypto and DMA node for VisionFive 2 >> > > Hi Herbert/David, > > Could you please help to review and provide comments on this patch series? > Thank you in advance. You received some comments so the expectation is to send a v2. Best regards, Krzysztof
> -----Original Message----- > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Sent: Thursday, December 8, 2022 5:28 PM > To: JiaJie Ho <jiajie.ho@starfivetech.com>; Herbert Xu > <herbert@gondor.apana.org.au>; David S . Miller <davem@davemloft.net>; > Rob Herring <robh+dt@kernel.org>; Krzysztof Kozlowski > <krzysztof.kozlowski+dt@linaro.org> > Cc: linux-crypto@vger.kernel.org; devicetree@vger.kernel.org; linux- > kernel@vger.kernel.org; linux-riscv@lists.infradead.org > Subject: Re: [PATCH 0/6] crypto: starfive: Add driver for cryptographic engine > > On 08/12/2022 10:09, JiaJie Ho wrote: > > > > Hi Herbert/David, > > > > Could you please help to review and provide comments on this patch series? > > Thank you in advance. > > You received some comments so the expectation is to send a v2. > Sure, I'll do that then. Thanks Jia Jie
On Thu, 08 Dec 2022 01:35:10 PST (-0800), jiajie.ho@starfivetech.com wrote: > > >> -----Original Message----- >> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> Sent: Thursday, December 8, 2022 5:28 PM >> To: JiaJie Ho <jiajie.ho@starfivetech.com>; Herbert Xu >> <herbert@gondor.apana.org.au>; David S . Miller <davem@davemloft.net>; >> Rob Herring <robh+dt@kernel.org>; Krzysztof Kozlowski >> <krzysztof.kozlowski+dt@linaro.org> >> Cc: linux-crypto@vger.kernel.org; devicetree@vger.kernel.org; linux- >> kernel@vger.kernel.org; linux-riscv@lists.infradead.org >> Subject: Re: [PATCH 0/6] crypto: starfive: Add driver for cryptographic engine >> >> On 08/12/2022 10:09, JiaJie Ho wrote: >> > >> > Hi Herbert/David, >> > >> > Could you please help to review and provide comments on this patch series? >> > Thank you in advance. >> >> You received some comments so the expectation is to send a v2. >> > > Sure, I'll do that then. Not sure if I missed it, but I can't find a v2.
> -----Original Message----- > From: Palmer Dabbelt <palmer@dabbelt.com> > Sent: Tuesday, December 13, 2022 2:20 PM > To: JiaJie Ho <jiajie.ho@starfivetech.com> > Cc: krzysztof.kozlowski@linaro.org; herbert@gondor.apana.org.au; > davem@davemloft.net; robh+dt@kernel.org; > krzysztof.kozlowski+dt@linaro.org; linux-crypto@vger.kernel.org; > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux- > riscv@lists.infradead.org > Subject: RE: [PATCH 0/6] crypto: starfive: Add driver for cryptographic engine > > >> > >> You received some comments so the expectation is to send a v2. > >> > > > > Sure, I'll do that then. > > Not sure if I missed it, but I can't find a v2. Hi Palmer, I'm still working on the patches. I'll send them out soon. Thanks, Jia Jie