Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp633596lqh; Thu, 28 Mar 2024 11:27:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV72mNcyaySX5wIE+iwDtewOcanmipoNJSTZqZODM4Go2331EPL3lBn0pikNjjakfQwEHfIXOFWnX+CoWXsjLu9lBPioHf2synpaScNqA== X-Google-Smtp-Source: AGHT+IFrSBhPKt6J3ynO7PbJtgL81phqg63zIwnqsFPTa59v5yLcy9qFDIlgPqxPQG44QUSzye+v X-Received: by 2002:a50:ccd8:0:b0:56b:b227:efc4 with SMTP id b24-20020a50ccd8000000b0056bb227efc4mr56600edj.18.1711650459017; Thu, 28 Mar 2024 11:27:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711650459; cv=pass; d=google.com; s=arc-20160816; b=R1sSwNnNO9qJS1UdtU2bpUXYDvXmyCTRJAd7bYfhBxpkoKP6Cx49wlpatWemw6YkX9 TH9pfh7pz5Cg/uI41pYR4IEz6fUQPKKIO8NGalnjKWMIRCzAhjU87khiA3LdIIIZW+RU 0bMoitk6Qh+oo0tczXntB4uFSmuUa2XX5Ex9oEuga30CkGk0H29pBAJ1rAPddcIPOsnz 8Ttd3Ctz1FQeZd0wLt27xR1jPINwW9yXdjq2FSG+Prj4vR/uS5509pZizLb+PoNmWwH4 LQ114BBNcEe1JhEUdegF5sfIOhuZs8+kdz/h4F6zKzOx05S2OnZktkoxcQ+gAUhMXnGs ORhw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=UqlCZa15/EgDhJqRplHZCJq6k9U555sbwgZc/ouqfYE=; fh=U6QggIMuTuj1OBBqg2dPc+5PpKDB7ZZsjCLKoPyRbXA=; b=nDqE8JPSxOvF9N7BPCHZSUl4NswcHLpgFQRCnbPlUKePmgS1KkwuWK8xNjNKuLJtkv G+j1Vk5vhPqCzKNK3c9KND+PuUXG73W1RuGmMmnFA/w/X1GYMb/RE7bw9xNugA6bSCJ0 iUw09byeYgkV6BhfJivsBBPSnToxeITN0wkL1ZxIgGks1IHrxUhZMDPgRuZLr8ecIniF mOdH7LgDnq+dFtXltZ+Dcy+HisrEoG9EOLwv4oYYep0MjXkhIR7ZPEnHrrr6YX3gLlOP 8tsLS7IdsU3kh2gZJo694tB9q1qpf2HugLv/DSHkF2rjeGv0H2q3/p4ozOWdErFzZmQF HNdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vayavyalabs.com header.s=google header.b=DObq9Uv2; arc=pass (i=1 spf=pass spfdomain=vayavyalabs.com dkim=pass dkdomain=vayavyalabs.com dmarc=pass fromdomain=vayavyalabs.com); spf=pass (google.com: domain of linux-crypto+bounces-3027-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3027-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=vayavyalabs.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c36-20020a509fa7000000b0056bd2c1c153si979944edf.629.2024.03.28.11.27.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 11:27:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-3027-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@vayavyalabs.com header.s=google header.b=DObq9Uv2; arc=pass (i=1 spf=pass spfdomain=vayavyalabs.com dkim=pass dkdomain=vayavyalabs.com dmarc=pass fromdomain=vayavyalabs.com); spf=pass (google.com: domain of linux-crypto+bounces-3027-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3027-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=vayavyalabs.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C5B471F26616 for ; Thu, 28 Mar 2024 18:27:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF422134419; Thu, 28 Mar 2024 18:27:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=vayavyalabs.com header.i=@vayavyalabs.com header.b="DObq9Uv2" X-Original-To: linux-crypto@vger.kernel.org Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E757B132805 for ; Thu, 28 Mar 2024 18:27:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711650434; cv=none; b=j1DPJhV8qMyLCxpVa7IcnRjE/TFzziR1OeQofmUqvIsMppUTxlynarUrCZDyOoPWfUCYD2vSmFbyQEyHf2nfh8CMBpi4UqPMhrR0luFVtBozWs8OFOQMlwjDWFR8j9knK3CKZ8hb0DEq10G/eavLussoO/BJCXbztyIoNhsEGn0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711650434; c=relaxed/simple; bh=yR3VIVzIm7J5DlRe3h9y8sO4VZfZwjLRaPB8+Bn9+kY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=PvXpPVXwyuzoWijmOXUaRU3hZbzYmViOLqC1hKFp1XtRhnV+FIdaTQMfYbUYUXxdHK0bUmPnjYX35Aar0Cg0q4DjSlpfMAwuYT6xn9ZcHlfB2bH3HBFGGQbgKPsBDE707wQYj3lblXqLVslyaE25EHIVL+wgRsGlPn+GoEJP6vc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=vayavyalabs.com; spf=pass smtp.mailfrom=vayavyalabs.com; dkim=pass (1024-bit key) header.d=vayavyalabs.com header.i=@vayavyalabs.com header.b=DObq9Uv2; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=vayavyalabs.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vayavyalabs.com Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1dff837d674so10606895ad.3 for ; Thu, 28 Mar 2024 11:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vayavyalabs.com; s=google; t=1711650432; x=1712255232; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UqlCZa15/EgDhJqRplHZCJq6k9U555sbwgZc/ouqfYE=; b=DObq9Uv2NiUPf3cdnIKtzudVR0PKK108u0mSD6SApBGBR5rDMjmsl5sIQFcvdkZAk6 sDE4LP77X1dLlrOcgN9T1X9ahjxt6fv1rkjI1bRupzHUpHTRK0Yuqh96Ccc6CVJbSDG3 /qqWFG/IEYtjFPDoys6PJJZt/FJA1o/I7cT6g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711650432; x=1712255232; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UqlCZa15/EgDhJqRplHZCJq6k9U555sbwgZc/ouqfYE=; b=Wc9KFaVXs/VrKXMisxFuEMcbLeSC1P7yb5VJICv8EzbZcXpZtXlpqswtVRQYexhAmr vGW2PoHMUNGXA3NXgXgrnFkRtjoa3pxk2V6e54hvfdJ2DtbI/t3uHsLat15SMAn636ne oKCpquf6NiNhgxUt1iPP3+UZqgz3VwexH6a2YWp989S3QgxQPsodDX3osLyT2zgx5o5G eLqMYgQ0oqteFi2c5vy3+6DqY2U6/+1Sqf5wbGSLorjEaCSSwSnGU+eNpBJkGh1zpZwq gp/47KNJMznuRQ2S0jDG4fS3JvxeMH/y+MN/5SLe4j6yzc76IYLkuvp8qLYxRdpQUa4w blNw== X-Forwarded-Encrypted: i=1; AJvYcCXOWlafEw5BfUHjhG9HGWzg37G4SlMJKUy8oc/d9VLsa4HLUWX7KqqRbxUz5gZvY6RffwekqEJm7xJni7fJBe4Wiy2vI8sQpwmeT0Vx X-Gm-Message-State: AOJu0YzZRQrdQcgxIO6d81u3WEGwFcS5at8t1DtpRLff5tij8D0WvmLq joXsn5v+PZ4OdN+C9rEgAxafb04rBWaok2CDY3pPiBfQVpMuG9Fx73H1/hmMFlE= X-Received: by 2002:a17:903:2c9:b0:1e2:875:f215 with SMTP id s9-20020a17090302c900b001e20875f215mr343600plk.30.1711650432130; Thu, 28 Mar 2024 11:27:12 -0700 (PDT) Received: from localhost.localdomain ([103.108.57.9]) by smtp.gmail.com with ESMTPSA id i7-20020a170902c94700b001e223c9679asm846059pla.93.2024.03.28.11.27.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 11:27:11 -0700 (PDT) From: Pavitrakumar M To: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org Cc: Ruud.Derwig@synopsys.com, manjunath.hadli@vayavyalabs.com, bhoomikak@vayavyalabs.com, Pavitrakumar M Subject: [PATCH v1 0/4] Add spacc crypto driver support Date: Thu, 28 Mar 2024 23:56:48 +0530 Message-Id: <20240328182652.3587727-1-pavitrakumarm@vayavyalabs.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add the driver for SPAcc(Security Protocol Accelerator), which is a crypto acceleration IP from Synopsys. The SPAcc supports many cipher, hash, aead algorithms and various modes.The driver currently supports below, aead: - ccm(sm4) - ccm(aes) - gcm(sm4) - gcm(aes) - rfc8998(gcm(sm4)) - rfc7539(chacha20,poly1305) cipher: - cbc(sm4) - ecb(sm4) - ofb(sm4) - cfb(sm4) - ctr(sm4) - cbc(aes) - ecb(aes) - ctr(aes) - xts(aes) - cts(cbc(aes)) - cbc(des) - ecb(des) - cbc(des3_ede) - ecb(des3_ede) - chacha20 - xts(sm4) - cts(cbc(sm4)) - ecb(kasumi) - f8(kasumi) - snow3g_uea2 - cs1(cbc(aes)) - cs2(cbc(aes)) - cs1(cbc(sm4)) - cs2(cbc(sm4)) - f8(sm4) hash: - michael_mic - sm3 - hmac(sm3) - sha3-512 - sha3-384 - sha3-256 - sha3-224 - hmac(sha512) - hmac(sha384) - hmac(sha256) - hmac(sha224) - sha512 - sha384 - sha256 - sha224 - sha1 - hmac(sha1) - md5 - hmac(md5) - cmac(sm4) - xcbc(aes) - cmac(aes) - xcbc(sm4) - sha512-224 - hmac(sha512-224) - sha512-256 - hmac(sha512-256) - mac(kasumi_f9) - mac(snow3g) - mac(zuc) - sslmac(sha1) - shake128 - shake256 - cshake128 - cshake256 - kcmac128 - kcmac256 - kcmacxof128 - kcmacxof256 - sslmac(md5) Pavitrakumar M (4): Add SPAcc driver to Linux kernel Add SPACC Kconfig and Makefile Add SPAcc dts overlay Enable Driver compilation in crypto Kconfig and Makefile file arch/arm64/boot/dts/xilinx/Makefile | 3 + .../arm64/boot/dts/xilinx/snps-dwc-spacc.dtso | 35 + drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile | 1 + drivers/crypto/dwc-spacc/Kconfig | 95 + drivers/crypto/dwc-spacc/Makefile | 16 + drivers/crypto/dwc-spacc/spacc_aead.c | 1382 ++++++++ drivers/crypto/dwc-spacc/spacc_ahash.c | 1183 +++++++ drivers/crypto/dwc-spacc/spacc_core.c | 2917 +++++++++++++++++ drivers/crypto/dwc-spacc/spacc_core.h | 839 +++++ drivers/crypto/dwc-spacc/spacc_device.c | 324 ++ drivers/crypto/dwc-spacc/spacc_device.h | 236 ++ drivers/crypto/dwc-spacc/spacc_hal.c | 365 +++ drivers/crypto/dwc-spacc/spacc_hal.h | 113 + drivers/crypto/dwc-spacc/spacc_interrupt.c | 204 ++ drivers/crypto/dwc-spacc/spacc_manager.c | 670 ++++ drivers/crypto/dwc-spacc/spacc_skcipher.c | 754 +++++ 17 files changed, 9138 insertions(+) create mode 100644 arch/arm64/boot/dts/xilinx/snps-dwc-spacc.dtso create mode 100644 drivers/crypto/dwc-spacc/Kconfig create mode 100644 drivers/crypto/dwc-spacc/Makefile create mode 100644 drivers/crypto/dwc-spacc/spacc_aead.c create mode 100644 drivers/crypto/dwc-spacc/spacc_ahash.c create mode 100644 drivers/crypto/dwc-spacc/spacc_core.c create mode 100644 drivers/crypto/dwc-spacc/spacc_core.h create mode 100644 drivers/crypto/dwc-spacc/spacc_device.c create mode 100644 drivers/crypto/dwc-spacc/spacc_device.h create mode 100644 drivers/crypto/dwc-spacc/spacc_hal.c create mode 100644 drivers/crypto/dwc-spacc/spacc_hal.h create mode 100644 drivers/crypto/dwc-spacc/spacc_interrupt.c create mode 100644 drivers/crypto/dwc-spacc/spacc_manager.c create mode 100644 drivers/crypto/dwc-spacc/spacc_skcipher.c base-commit: 6a8dbd71a70620c42d4fa82509204ba18231f28d -- 2.25.1