Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp726063pxu; Wed, 6 Jan 2021 02:44:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlSkFpcWUS/d9PD4ODNdhB/KOa1rEhBrGzSNOx6jeyALjrWlI53tlMDXSv4nI4O26sjjvY X-Received: by 2002:a50:d604:: with SMTP id x4mr3597544edi.64.1609929849125; Wed, 06 Jan 2021 02:44:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609929849; cv=none; d=google.com; s=arc-20160816; b=hx/Vgy/cCjdiERvknimMli+jdldjf/jn/EP3Om9DJa8npyJoBTpeKXskr1PTa7KER2 vLoH/U0bJxl1uQjFIXYcoPr0dxdURjoVb9DoS7q/gp7/hLKDJVy8FvVEm/z15he7uMQU IsXJXOqYtlWdQJ+vUzESEZlbIK/GDBdkeOGAzXvueO60AlYO0/U/kghscgQD/G94OPOk KvRmTt1iTUTxLC6Hhx2yDo+7tiGpP+mpZ+KLGtxtj+/00gww4TAB+gOY4+Cdr4qUyS9S CYtJfoFve2LBKm3Le/EGUTOjcwz5xAkyv2HBFPbYQbGYVhA+jXCkYU9B+kSodzqDfguw 8ozQ== 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:dkim-signature; bh=ZdVwTScqOAiFEMQMRvsAfoLrgdQs5RZ9yvYjrcCOWD0=; b=B4PzRKqGEzS3m5SDOZFEOCpVTtFDQo/nl9CBdQ5PIqJEMShMohfD4+wG7UFLZ0VZzY bBItpuX0I22xw73Ib4NikfwtLE1geYQCu4QhQ09H0fwjFaU7MxKTbTkvjIL/R5BQFgGr 9/TToPJFhsPtytAVkOUAn8OQqkErgVUJV0RPawBiRORyagEbyayWbqsAFVFctdlAKhnA OuJ13iFNuZG3aBUiWMqo52h2fs6wS1tCt/e5mKXwXOiJig3uqiA5mP2JH5ns2mUr3NZd qAosii+YwMNL+vy+OhciMuFYpSdcRNnMjaICe53SANme0C5w8s4P2rW7xaQZovKLQJGd np6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=CMA0e+Ee; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m26si706463ejc.513.2021.01.06.02.43.48; Wed, 06 Jan 2021 02:44:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=CMA0e+Ee; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726436AbhAFKno (ORCPT + 99 others); Wed, 6 Jan 2021 05:43:44 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:30586 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726416AbhAFKno (ORCPT ); Wed, 6 Jan 2021 05:43:44 -0500 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 106AaO47025900; Wed, 6 Jan 2021 02:42:56 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=ZdVwTScqOAiFEMQMRvsAfoLrgdQs5RZ9yvYjrcCOWD0=; b=CMA0e+Ee8+rVCnXpky9/9Xs4FmVrSwA+fR0u+bcAKBEvKqGgyCdVMc7bF2F+Wsr3DvX4 YTLalDYeyyjZklOPilhGUVKRXd+lJGLi/upzdUYGzW4UQ+Jvb8GnYKfrPe0oUvxhwxc4 crE4w2zBL7nv3hm9HsDPBzwbP+O9vcPqb09T5qrEDJtCT7eKGp4QS9/XpJcVccUqJqMf 1EyFHANr0/W66ARqT/O8YwU1uHiwh1z4ExdcOdKmG+fq0vxXNF10D9Y8EybwdmnbJrs4 yCE1R/XaEl6QcjBD4cvQ1xL7k4zJ95J8TEgiH7LOtGUbdWfDoUhgmd7426R48bOJQgqT hw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 35ts7rs15a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 06 Jan 2021 02:42:55 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 6 Jan 2021 02:42:53 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 6 Jan 2021 02:42:54 -0800 Received: from hyd1schalla-dt.caveonetworks.com.com (unknown [10.29.8.39]) by maili.marvell.com (Postfix) with ESMTP id C94413F703F; Wed, 6 Jan 2021 02:42:51 -0800 (PST) From: Srujana Challa To: CC: , , , , Srujana Challa Subject: [PATCH 0/9] Add Support for Marvell OcteonTX2 CPT engine Date: Wed, 6 Jan 2021 16:12:14 +0530 Message-ID: <20210106104223.6182-1-schalla@marvell.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2021-01-06_05:2021-01-06,2021-01-06 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This series introduces crypto(CPT) drivers(PF & VF) for Marvell OcteonTX2 CN96XX Soc. OcteonTX2 SOC's resource virtualization unit (RVU) supports multiple physical and virtual functions. Each of the PF/VF's functionality is determined by what kind of resources are attached to it. When the CPT block is attached to a VF, it can function as a security device. The CPT PF driver is responsible for: - Forwarding messages to/from VFs from/to admin function(AF), - Enabling/disabling VFs, - Loading/unloading microcode (creation/deletion of engine groups). The CPT VF driver works as a crypto offload device. This patch series includes: - CPT PF driver patches that include AF<=>PF<=>VF mailbox communication, sriov_configure, and firmware load to the acceleration engines. - CPT VF driver patches that include VF<=>PF mailbox communication and crypto offload support through the kernel cryptographic API. This series is tested with CRYPTO_EXTRA_TESTS enabled and CRYPTO_DISABLE_TESTS disabled. Srujana Challa (9): drivers: crypto: add Marvell OcteonTX2 CPT PF driver crypto: octeontx2: add mailbox communication with AF crypto: octeontx2: enable SR-IOV and mailbox communication with VF crypto: octeontx2: load microcode and create engine groups crypto: octeontx2: add LF framework crypto: octeontx2: add support to get engine capabilities crypto: octeontx2: add virtual function driver support crypto: octeontx2: add support to process the crypto request crypto: octeontx2: register with linux crypto framework drivers/crypto/marvell/Kconfig | 14 + drivers/crypto/marvell/Makefile | 1 + drivers/crypto/marvell/octeontx2/Makefile | 10 + .../marvell/octeontx2/otx2_cpt_common.h | 137 ++ .../marvell/octeontx2/otx2_cpt_hw_types.h | 464 +++++ .../marvell/octeontx2/otx2_cpt_mbox_common.c | 202 ++ .../marvell/octeontx2/otx2_cpt_reqmgr.h | 197 ++ drivers/crypto/marvell/octeontx2/otx2_cptlf.c | 429 ++++ drivers/crypto/marvell/octeontx2/otx2_cptlf.h | 353 ++++ drivers/crypto/marvell/octeontx2/otx2_cptpf.h | 61 + .../marvell/octeontx2/otx2_cptpf_main.c | 713 +++++++ .../marvell/octeontx2/otx2_cptpf_mbox.c | 356 ++++ .../marvell/octeontx2/otx2_cptpf_ucode.c | 1415 +++++++++++++ .../marvell/octeontx2/otx2_cptpf_ucode.h | 162 ++ drivers/crypto/marvell/octeontx2/otx2_cptvf.h | 29 + .../marvell/octeontx2/otx2_cptvf_algs.c | 1758 +++++++++++++++++ .../marvell/octeontx2/otx2_cptvf_algs.h | 178 ++ .../marvell/octeontx2/otx2_cptvf_main.c | 410 ++++ .../marvell/octeontx2/otx2_cptvf_mbox.c | 167 ++ .../marvell/octeontx2/otx2_cptvf_reqmgr.c | 541 +++++ 20 files changed, 7597 insertions(+) create mode 100644 drivers/crypto/marvell/octeontx2/Makefile create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_common.h create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_hw_types.h create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.c create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptlf.c create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptlf.h create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf.h create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.c create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf.h create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.h create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_mbox.c create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c -- 2.29.0