DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anoob Joseph <anoobj@marvell.com>
To: Akhil Goyal <gakhil@marvell.com>, Thomas Monjalon <thomas@monjalon.net>
Cc: Kiran Kumar Kokkilagadda <kirankumark@marvell.com>,
	Jerin Jacob <jerinj@marvell.com>,
	Ankur Dwivedi <adwivedi@marvell.com>,
	Tejasree Kondoj <ktejasree@marvell.com>, <dev@dpdk.org>,
	Anoob Joseph <anoobj@marvell.com>
Subject: [dpdk-dev] [PATCH 09/11] common/cnxk: add AE microcode defines
Date: Wed, 2 Jun 2021 21:26:23 +0530	[thread overview]
Message-ID: <1622649385-22652-10-git-send-email-anoobj@marvell.com> (raw)
In-Reply-To: <1622649385-22652-1-git-send-email-anoobj@marvell.com>

From: Kiran Kumar Kokkilagadda <kirankumark@marvell.com>

Microcode AE opcodes support asymmetric operations. Add defines
and structs defined by microcode.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Kiran Kumar Kokkilagadda <kirankumark@marvell.com>

---
 drivers/common/cnxk/roc_ae.h  | 56 +++++++++++++++++++++++++++++++++++++++++++
 drivers/common/cnxk/roc_cpt.h |  3 +++
 2 files changed, 59 insertions(+)
 create mode 100644 drivers/common/cnxk/roc_ae.h

diff --git a/drivers/common/cnxk/roc_ae.h b/drivers/common/cnxk/roc_ae.h
new file mode 100644
index 0000000..c549e18
--- /dev/null
+++ b/drivers/common/cnxk/roc_ae.h
@@ -0,0 +1,56 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2021 Marvell.
+ */
+
+#ifndef __ROC_AE_H__
+#define __ROC_AE_H__
+
+/* AE opcodes */
+#define ROC_AE_MAJOR_OP_MODEX	     0x03
+#define ROC_AE_MAJOR_OP_ECDSA	     0x04
+#define ROC_AE_MAJOR_OP_ECC	     0x05
+#define ROC_AE_MINOR_OP_MODEX	     0x01
+#define ROC_AE_MINOR_OP_PKCS_ENC     0x02
+#define ROC_AE_MINOR_OP_PKCS_ENC_CRT 0x03
+#define ROC_AE_MINOR_OP_PKCS_DEC     0x04
+#define ROC_AE_MINOR_OP_PKCS_DEC_CRT 0x05
+#define ROC_AE_MINOR_OP_MODEX_CRT    0x06
+#define ROC_AE_MINOR_OP_ECDSA_SIGN   0x01
+#define ROC_AE_MINOR_OP_ECDSA_VERIFY 0x02
+#define ROC_AE_MINOR_OP_ECC_UMP	     0x03
+
+/**
+ * Enumeration roc_ae_ec_id
+ *
+ * Enumerates supported elliptic curves
+ */
+typedef enum {
+	ROC_AE_EC_ID_P192 = 0,
+	ROC_AE_EC_ID_P224 = 1,
+	ROC_AE_EC_ID_P256 = 2,
+	ROC_AE_EC_ID_P384 = 3,
+	ROC_AE_EC_ID_P521 = 4,
+	ROC_AE_EC_ID_PMAX = 5
+} roc_ae_ec_id;
+
+/* Prime and order fields of built-in elliptic curves */
+struct roc_ae_ec_group {
+	struct {
+		/* P521 maximum length */
+		uint8_t data[66];
+		unsigned int length;
+	} prime;
+
+	struct {
+		/* P521 maximum length */
+		uint8_t data[66];
+		unsigned int length;
+	} order;
+};
+
+struct roc_ae_ec_ctx {
+	/* Prime length defined by microcode for EC operations */
+	uint8_t curveid;
+};
+
+#endif /* __ROC_AE_H__ */
diff --git a/drivers/common/cnxk/roc_cpt.h b/drivers/common/cnxk/roc_cpt.h
index 2b43a5a..1e7a208 100644
--- a/drivers/common/cnxk/roc_cpt.h
+++ b/drivers/common/cnxk/roc_cpt.h
@@ -7,6 +7,9 @@
 
 #include "roc_api.h"
 
+#define ROC_AE_CPT_BLOCK_TYPE1 0
+#define ROC_AE_CPT_BLOCK_TYPE2 1
+
 #define ROC_CPT_MAX_LFS 64
 
 struct roc_cpt_lf {
-- 
2.7.4


  parent reply	other threads:[~2021-06-02 15:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02 15:56 [dpdk-dev] [PATCH 00/11] Add CPT in Marvell CNXK common driver Anoob Joseph
2021-06-02 15:56 ` [dpdk-dev] [PATCH 01/11] common/cnxk: add CPT HW defines Anoob Joseph
2021-06-14  6:35   ` Akhil Goyal
2021-06-02 15:56 ` [dpdk-dev] [PATCH 02/11] common/cnxk: add CPT dev config routines Anoob Joseph
2021-06-14  6:34   ` Akhil Goyal
2021-06-02 15:56 ` [dpdk-dev] [PATCH 03/11] common/cnxk: add mbox to configure RXC Anoob Joseph
2021-06-02 15:56 ` [dpdk-dev] [PATCH 04/11] common/cnxk: add CPT LF config Anoob Joseph
2021-06-02 15:56 ` [dpdk-dev] [PATCH 05/11] common/cnxk: add CPT diagnostics Anoob Joseph
2021-06-02 15:56 ` [dpdk-dev] [PATCH 06/11] common/cnxk: add CPT LF flush Anoob Joseph
2021-06-02 15:56 ` [dpdk-dev] [PATCH 07/11] common/cnxk: add SE microcode defines Anoob Joseph
2021-06-02 15:56 ` [dpdk-dev] [PATCH 08/11] common/cnxk: add IE " Anoob Joseph
2021-06-02 15:56 ` Anoob Joseph [this message]
2021-06-02 15:56 ` [dpdk-dev] [PATCH 10/11] common/cnxk: add lmtline init Anoob Joseph
2021-06-02 15:56 ` [dpdk-dev] [PATCH 11/11] common/cnxk: add fpm tables Anoob Joseph

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1622649385-22652-10-git-send-email-anoobj@marvell.com \
    --to=anoobj@marvell.com \
    --cc=adwivedi@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ktejasree@marvell.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).