DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: qiming.yang@intel.com
Cc: dev@dpdk.org, haiyue.wang@intel.com, junfeng.guo@intel.com,
	Qi Zhang <qi.z.zhang@intel.com>, Amir Shay <shay.amir@intel.com>
Subject: [dpdk-dev] [PATCH 02/14] net/ice/base: signed external device package programming
Date: Tue,  2 Mar 2021 15:23:45 +0800	[thread overview]
Message-ID: <20210302072357.1657556-3-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20210302072357.1657556-1-qi.z.zhang@intel.com>

External topology devices (e.g. PHYs) connected to Columbiaville or to
SoC that includes CPK IP might have a firmware engine within the device
and the firmware is usually loaded from NVM connected to the topology
device.
In some cases, those firmware packages might need to be regularly
updated in a secure way to prevent malicious user to burn malicious
firmware into the topology device. In other cases, the topology device
firmware might be burned independently, as burning the NVM attached to
the device might cause the device to stop function but could be fixed
without permanent damage.
SoC topologies also enable mezzanine card, with an ID EEPROM
within it. This ID EEPROM might need an update also.
This patch provides these abilities.

Signed-off-by: Amir Shay <shay.amir@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index a345fb5a61..3f2b4cd54b 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -1506,11 +1506,12 @@ struct ice_aqc_get_link_status_data {
 #define ICE_AQ_LINK_TOPO_UNDRUTIL_MEDIA	BIT(6)
 #define ICE_AQ_LINK_TOPO_UNSUPP_MEDIA	BIT(7)
 	u8 link_cfg_err;
-#define ICE_AQ_LINK_CFG_ERR		BIT(0)
-#define ICE_AQ_LINK_ACT_PORT_OPT_INVAL	BIT(2)
+#define ICE_AQ_LINK_CFG_ERR			BIT(0)
+#define ICE_AQ_LINK_ACT_PORT_OPT_INVAL		BIT(2)
 #define ICE_AQ_LINK_FEAT_ID_OR_CONFIG_ID_INVAL	BIT(3)
 #define ICE_AQ_LINK_TOPO_CRITICAL_SDP_ERR	BIT(4)
 #define ICE_AQ_LINK_MODULE_POWER_UNSUPPORTED	BIT(5)
+#define ICE_AQ_LINK_EXTERNAL_PHY_LOAD_FAILURE	BIT(6)
 	u8 link_info;
 #define ICE_AQ_LINK_UP			BIT(0)	/* Link Status */
 #define ICE_AQ_LINK_FAULT		BIT(1)
@@ -1716,6 +1717,25 @@ struct ice_aqc_sw_gpio {
 	u8 rsvd[12];
 };
 
+/* Program topology device NVM (direct, 0x06F2) */
+struct ice_aqc_program_topology_device_nvm {
+	u8 lport_num;
+	u8 lport_num_valid;
+	u8 node_type_ctx;
+	u8 index;
+	u8 rsvd[12];
+};
+
+/* Read topology device NVM (indirect, 0x06F3) */
+struct ice_aqc_read_topology_device_nvm {
+	u8 lport_num;
+	u8 lport_num_valid;
+	u8 node_type_ctx;
+	u8 index;
+	__le32 start_address;
+	u8 data_read[8];
+};
+
 /* NVM Read command (indirect 0x0701)
  * NVM Erase commands (direct 0x0702)
  * NVM Write commands (indirect 0x0703)
@@ -3059,6 +3079,8 @@ enum ice_adminq_opc {
 	ice_aqc_opc_sff_eeprom				= 0x06EE,
 	ice_aqc_opc_sw_set_gpio				= 0x06EF,
 	ice_aqc_opc_sw_get_gpio				= 0x06F0,
+	ice_aqc_opc_program_topology_device_nvm		= 0x06F2,
+	ice_aqc_opc_read_topology_device_nvm		= 0x06F3,
 
 	/* NVM commands */
 	ice_aqc_opc_nvm_read				= 0x0701,
-- 
2.26.2


  parent reply	other threads:[~2021-03-02  7:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02  7:23 [dpdk-dev] [PATCH 00/14] ice: base code update Qi Zhang
2021-03-02  7:23 ` [dpdk-dev] [PATCH 01/14] net/ice/base: add firmware log support Qi Zhang
2021-03-02  7:23 ` Qi Zhang [this message]
2021-03-02  7:23 ` [dpdk-dev] [PATCH 03/14] net/ice/base: post update double reset solution restriction Qi Zhang
2021-03-02  7:23 ` [dpdk-dev] [PATCH 04/14] net/ice/base: enable GTPU inner L3/L4 for FDIR Qi Zhang
2021-03-02  7:23 ` [dpdk-dev] [PATCH 05/14] net/ice/base: expose link configuration error Qi Zhang
2021-03-02  7:23 ` [dpdk-dev] [PATCH 06/14] net/ice/base: enable more GTPU inner L3 fields for FDIR Qi Zhang
2021-03-02  7:23 ` [dpdk-dev] [PATCH 07/14] net/ice/base: support for switch filter (GTP tunnel+IP flow) Qi Zhang
2021-03-02  7:23 ` [dpdk-dev] [PATCH 08/14] net/ice/base: support GTPU IP inner IPv6 for FDIR Qi Zhang
2021-03-02  7:23 ` [dpdk-dev] [PATCH 09/14] net/ice/base: fix incorrect payload indicator on PTYPE Qi Zhang
2021-03-02  7:23 ` [dpdk-dev] [PATCH 10/14] net/ice/base: mark PTYPE 2 as reserved Qi Zhang
2021-03-02  7:23 ` [dpdk-dev] [PATCH 11/14] net/ice/base: add code to update boost TCAM for DVM Qi Zhang
2021-03-02  7:23 ` [dpdk-dev] [PATCH 12/14] net/ice/base: update GTPU EH dummy pkts for FDIR Qi Zhang
2021-03-02  7:23 ` [dpdk-dev] [PATCH 13/14] net/ice/base: fix uninitialized struct Qi Zhang
2021-03-02  7:23 ` [dpdk-dev] [PATCH 14/14] net/ice/base: cleanup fltr list in case of allocation issues Qi Zhang
2021-03-04  5:31 ` [dpdk-dev] [PATCH 00/14] ice: base code update Yang, Qiming
2021-03-05  8:39   ` Zhang, Qi Z

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=20210302072357.1657556-3-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=haiyue.wang@intel.com \
    --cc=junfeng.guo@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=shay.amir@intel.com \
    /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).