From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id E695DA0495 for ; Mon, 10 Jun 2019 09:40:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0C3101BED8; Mon, 10 Jun 2019 09:39:16 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id B8A8D1BE8D for ; Mon, 10 Jun 2019 09:38:55 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us5.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id EACA84C0058 for ; Mon, 10 Jun 2019 07:38:54 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 10 Jun 2019 00:38:51 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Mon, 10 Jun 2019 00:38:50 -0700 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id x5A7cndO008814; Mon, 10 Jun 2019 08:38:49 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id B0E821627D7; Mon, 10 Jun 2019 08:38:49 +0100 (BST) From: Andrew Rybchenko To: CC: Paul Fox Date: Mon, 10 Jun 2019 08:38:30 +0100 Message-ID: <1560152324-20538-16-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560152324-20538-1-git-send-email-arybchenko@solarflare.com> References: <1560152324-20538-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24664.003 X-TM-AS-Result: No-7.389300-4.000000-10 X-TMASE-MatchedRID: MMSrkgq1iAPjtwtQtmXE5bsHVDDM5xAPhVDnkfzD7ub82ks92f+GmnIo zGa69omdrdoLblq9S5ra/g/NGTW3MqMnBoh5DgLQXS7cB0DuouZSQLJ/PYofeOZYcdJgScjxeCN V1mMi/46rJu5r7IEq6c7C76TsXH7gmUQSrI/466vYeXBrcJgL5B7EG/14SzlmDO+DX+rUwfb5YB fioPFPEcq8KuMl8NrBC7s0JC/FqVQworcxDrbitZ4CIKY/Hg3AGdQnQSTrKGPEQdG7H66TyMdRT 5TQAJnAuR84PMsovspatOevZPU6yLMQZq34vKdiSkpiWlUvSVOeqD9WtJkSIw== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--7.389300-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24664.003 X-MDID: 1560152335-92JJiUEXlTGc Subject: [dpdk-dev] [PATCH 15/29] net/sfc/base: add definition of bundle metadata partition X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Paul Fox Signed-off-by: Paul Fox Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/base/ef10_nvram.c | 1 + drivers/net/sfc/base/ef10_tlv_layout.h | 25 +++++++++++++++++++++++++ drivers/net/sfc/base/efx.h | 1 + 3 files changed, 27 insertions(+) diff --git a/drivers/net/sfc/base/ef10_nvram.c b/drivers/net/sfc/base/ef10_nvram.c index ed88e83..8fc8fd9 100644 --- a/drivers/net/sfc/base/ef10_nvram.c +++ b/drivers/net/sfc/base/ef10_nvram.c @@ -2344,6 +2344,7 @@ static uint32_t checksum_tlv_partition( PARTN_MAP_ENTRY(DYNCONFIG_DEFAULTS, ALL, DYNCONFIG_DEFAULTS), PARTN_MAP_ENTRY(ROMCONFIG_DEFAULTS, ALL, ROMCONFIG_DEFAULTS), PARTN_MAP_ENTRY(BUNDLE, ALL, BUNDLE), + PARTN_MAP_ENTRY(BUNDLE_METADATA, ALL, BUNDLE_METADATA), }; static __checkReturn efx_rc_t diff --git a/drivers/net/sfc/base/ef10_tlv_layout.h b/drivers/net/sfc/base/ef10_tlv_layout.h index eaf24c5..bb1539f 100644 --- a/drivers/net/sfc/base/ef10_tlv_layout.h +++ b/drivers/net/sfc/base/ef10_tlv_layout.h @@ -41,6 +41,7 @@ * 2: firmware internal use * 3: license partition * 4: tsa configuration + * 5: bundle update * * - TTT is a type, which is just a unique value. The same type value * might appear in both locations, indicating a relationship between @@ -86,6 +87,30 @@ #define TLV_TAG_INVALID (0xFFFFFFFF) +/* TLV start. + * + * Marks the start of a TLV layout within a partition that may/may-not be + * a TLV partition. i.e. if a portion of data (at any offset) within a + * partition is expected to be in TLV format, then the first tag in this + * layout is expected to be TLV_TAG_START. + * + * This tag is not used in TLV layouts where the entire partition is TLV. + * Please continue using TLV_TAG_PARTITION_HEADER to indicate the start + * of TLV layout in such cases. + */ + +#define TLV_TAG_START (0xEF10BA5E) + +struct tlv_start { + uint32_t tag; + uint32_t length; + /* Length of the TLV structure following this tag - includes length of all tags + * within the TLV layout starting with this TLV_TAG_START. + * Includes TLV_TAG_END. Does not include TLV_TAG_START + */ + uint32_t tlv_layout_len; +}; + /* TLV partition header. * * In a TLV partition, this must be the first item in the sequence, at offset diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h index 4385379..6b6538c 100644 --- a/drivers/net/sfc/base/efx.h +++ b/drivers/net/sfc/base/efx.h @@ -1605,6 +1605,7 @@ enum { EFX_NVRAM_DYNCONFIG_DEFAULTS, EFX_NVRAM_ROMCONFIG_DEFAULTS, EFX_NVRAM_BUNDLE, + EFX_NVRAM_BUNDLE_METADATA, EFX_NVRAM_NTYPES, } efx_nvram_type_t; -- 1.8.3.1