xref: /freebsd/sys/dev/sfxge/common/ef10_tlv_layout.h (revision 622429035a42fcdf71b75a9d37b7f85cfe65b075)
13c838a9fSAndrew Rybchenko /*-
2ba3049f9SAndrew Rybchenko  * Copyright (c) 2012-2016 Solarflare Communications Inc.
33c838a9fSAndrew Rybchenko  * All rights reserved.
43c838a9fSAndrew Rybchenko  *
53c838a9fSAndrew Rybchenko  * Redistribution and use in source and binary forms, with or without
63c838a9fSAndrew Rybchenko  * modification, are permitted provided that the following conditions are met:
73c838a9fSAndrew Rybchenko  *
83c838a9fSAndrew Rybchenko  * 1. Redistributions of source code must retain the above copyright notice,
93c838a9fSAndrew Rybchenko  *    this list of conditions and the following disclaimer.
103c838a9fSAndrew Rybchenko  * 2. Redistributions in binary form must reproduce the above copyright notice,
113c838a9fSAndrew Rybchenko  *    this list of conditions and the following disclaimer in the documentation
123c838a9fSAndrew Rybchenko  *    and/or other materials provided with the distribution.
133c838a9fSAndrew Rybchenko  *
143c838a9fSAndrew Rybchenko  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
153c838a9fSAndrew Rybchenko  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
163c838a9fSAndrew Rybchenko  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
173c838a9fSAndrew Rybchenko  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
183c838a9fSAndrew Rybchenko  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
193c838a9fSAndrew Rybchenko  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
203c838a9fSAndrew Rybchenko  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
213c838a9fSAndrew Rybchenko  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
223c838a9fSAndrew Rybchenko  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
233c838a9fSAndrew Rybchenko  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
243c838a9fSAndrew Rybchenko  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
253c838a9fSAndrew Rybchenko  *
263c838a9fSAndrew Rybchenko  * The views and conclusions contained in the software and documentation are
273c838a9fSAndrew Rybchenko  * those of the authors and should not be interpreted as representing official
283c838a9fSAndrew Rybchenko  * policies, either expressed or implied, of the FreeBSD Project.
293c838a9fSAndrew Rybchenko  *
303c838a9fSAndrew Rybchenko  * $FreeBSD$
313c838a9fSAndrew Rybchenko  */
323c838a9fSAndrew Rybchenko 
333c838a9fSAndrew Rybchenko /* These structures define the layouts for the TLV items stored in static and
343c838a9fSAndrew Rybchenko  * dynamic configuration partitions in NVRAM for EF10 (Huntington etc.).
353c838a9fSAndrew Rybchenko  *
363c838a9fSAndrew Rybchenko  * They contain the same sort of information that was kept in the
373c838a9fSAndrew Rybchenko  * siena_mc_static_config_hdr_t and siena_mc_dynamic_config_hdr_t structures
383c838a9fSAndrew Rybchenko  * (defined in <ci/mgmt/mc_flash_layout.h> and <ci/mgmt/mc_dynamic_cfg.h>) for
393c838a9fSAndrew Rybchenko  * Siena.
403c838a9fSAndrew Rybchenko  *
413c838a9fSAndrew Rybchenko  * These are used directly by the MC and should also be usable directly on host
423c838a9fSAndrew Rybchenko  * systems which are little-endian and do not do strange things with structure
433c838a9fSAndrew Rybchenko  * padding.  (Big-endian host systems will require some byte-swapping.)
443c838a9fSAndrew Rybchenko  *
453c838a9fSAndrew Rybchenko  *                                    -----
463c838a9fSAndrew Rybchenko  *
473c838a9fSAndrew Rybchenko  * Please refer to SF-108797-SW for a general overview of the TLV partition
483c838a9fSAndrew Rybchenko  * format.
493c838a9fSAndrew Rybchenko  *
503c838a9fSAndrew Rybchenko  *                                    -----
513c838a9fSAndrew Rybchenko  *
523c838a9fSAndrew Rybchenko  * The current tag IDs have a general structure: with the exception of the
533c838a9fSAndrew Rybchenko  * special values defined in the document, they are of the form 0xLTTTNNNN,
543c838a9fSAndrew Rybchenko  * where:
553c838a9fSAndrew Rybchenko  *
563c838a9fSAndrew Rybchenko  *   -  L is a location, indicating where this tag is expected to be found:
572d9312f6SAndrew Rybchenko  *        0: static configuration
582d9312f6SAndrew Rybchenko  *        1: dynamic configuration
592d9312f6SAndrew Rybchenko  *        2: firmware internal use
602d9312f6SAndrew Rybchenko  *        3: license partition
613c838a9fSAndrew Rybchenko  *
623c838a9fSAndrew Rybchenko  *   -  TTT is a type, which is just a unique value.  The same type value
633c838a9fSAndrew Rybchenko  *      might appear in both locations, indicating a relationship between
643c838a9fSAndrew Rybchenko  *      the items (e.g. static and dynamic VPD below).
653c838a9fSAndrew Rybchenko  *
663c838a9fSAndrew Rybchenko  *   -  NNNN is an index of some form.  Some item types are per-port, some
673c838a9fSAndrew Rybchenko  *      are per-PF, some are per-partition-type.
683c838a9fSAndrew Rybchenko  *
693c838a9fSAndrew Rybchenko  *                                    -----
703c838a9fSAndrew Rybchenko  *
713c838a9fSAndrew Rybchenko  * As with the previous Siena structures, each structure here is laid out
723c838a9fSAndrew Rybchenko  * carefully: values are aligned to their natural boundary, with explicit
733c838a9fSAndrew Rybchenko  * padding fields added where necessary.  (No, technically this does not
743c838a9fSAndrew Rybchenko  * absolutely guarantee portability.  But, in practice, compilers are generally
753c838a9fSAndrew Rybchenko  * sensible enough not to introduce completely pointless padding, and it works
763c838a9fSAndrew Rybchenko  * well enough.)
773c838a9fSAndrew Rybchenko  */
783c838a9fSAndrew Rybchenko 
793c838a9fSAndrew Rybchenko 
803c838a9fSAndrew Rybchenko #ifndef CI_MGMT_TLV_LAYOUT_H
813c838a9fSAndrew Rybchenko #define CI_MGMT_TLV_LAYOUT_H
823c838a9fSAndrew Rybchenko 
833c838a9fSAndrew Rybchenko 
843c838a9fSAndrew Rybchenko /* ----------------------------------------------------------------------------
853c838a9fSAndrew Rybchenko  *  General structure (defined by SF-108797-SW)
863c838a9fSAndrew Rybchenko  * ----------------------------------------------------------------------------
873c838a9fSAndrew Rybchenko  */
883c838a9fSAndrew Rybchenko 
893c838a9fSAndrew Rybchenko 
903c838a9fSAndrew Rybchenko /* The "end" tag.
913c838a9fSAndrew Rybchenko  *
923c838a9fSAndrew Rybchenko  * (Note that this is *not* followed by length or value fields: anything after
933c838a9fSAndrew Rybchenko  * the tag itself is irrelevant.)
943c838a9fSAndrew Rybchenko  */
953c838a9fSAndrew Rybchenko 
963c838a9fSAndrew Rybchenko #define TLV_TAG_END                     (0xEEEEEEEE)
973c838a9fSAndrew Rybchenko 
983c838a9fSAndrew Rybchenko 
993c838a9fSAndrew Rybchenko /* Other special reserved tag values.
1003c838a9fSAndrew Rybchenko  */
1013c838a9fSAndrew Rybchenko 
1023c838a9fSAndrew Rybchenko #define TLV_TAG_SKIP                    (0x00000000)
1033c838a9fSAndrew Rybchenko #define TLV_TAG_INVALID                 (0xFFFFFFFF)
1043c838a9fSAndrew Rybchenko 
1053c838a9fSAndrew Rybchenko 
1063c838a9fSAndrew Rybchenko /* TLV partition header.
1073c838a9fSAndrew Rybchenko  *
1083c838a9fSAndrew Rybchenko  * In a TLV partition, this must be the first item in the sequence, at offset
1093c838a9fSAndrew Rybchenko  * 0.
1103c838a9fSAndrew Rybchenko  */
1113c838a9fSAndrew Rybchenko 
1123c838a9fSAndrew Rybchenko #define TLV_TAG_PARTITION_HEADER        (0xEF10DA7A)
1133c838a9fSAndrew Rybchenko 
1143c838a9fSAndrew Rybchenko struct tlv_partition_header {
1153c838a9fSAndrew Rybchenko   uint32_t tag;
1163c838a9fSAndrew Rybchenko   uint32_t length;
1173c838a9fSAndrew Rybchenko   uint16_t type_id;
1188b18714dSAndrew Rybchenko /* 0 indicates the default segment (always located at offset 0), while other values
1198b18714dSAndrew Rybchenko  * are for RFID-selectable presets that should immediately follow the default segment.
1208b18714dSAndrew Rybchenko  * The default segment may also have preset > 0, which means that it is a preset
1218b18714dSAndrew Rybchenko  * selected through an RFID command and copied by FW to the location at offset 0. */
1228b18714dSAndrew Rybchenko   uint16_t preset;
1233c838a9fSAndrew Rybchenko   uint32_t generation;
1243c838a9fSAndrew Rybchenko   uint32_t total_length;
1253c838a9fSAndrew Rybchenko };
1263c838a9fSAndrew Rybchenko 
1273c838a9fSAndrew Rybchenko 
1283c838a9fSAndrew Rybchenko /* TLV partition trailer.
1293c838a9fSAndrew Rybchenko  *
1303c838a9fSAndrew Rybchenko  * In a TLV partition, this must be the last item in the sequence, immediately
1313c838a9fSAndrew Rybchenko  * preceding the TLV_TAG_END word.
1323c838a9fSAndrew Rybchenko  */
1333c838a9fSAndrew Rybchenko 
1343c838a9fSAndrew Rybchenko #define TLV_TAG_PARTITION_TRAILER       (0xEF101A57)
1353c838a9fSAndrew Rybchenko 
1363c838a9fSAndrew Rybchenko struct tlv_partition_trailer {
1373c838a9fSAndrew Rybchenko   uint32_t tag;
1383c838a9fSAndrew Rybchenko   uint32_t length;
1393c838a9fSAndrew Rybchenko   uint32_t generation;
1403c838a9fSAndrew Rybchenko   uint32_t checksum;
1413c838a9fSAndrew Rybchenko };
1423c838a9fSAndrew Rybchenko 
1433c838a9fSAndrew Rybchenko 
1443c838a9fSAndrew Rybchenko /* Appendable TLV partition header.
1453c838a9fSAndrew Rybchenko  *
1463c838a9fSAndrew Rybchenko  * In an appendable TLV partition, this must be the first item in the sequence,
1473c838a9fSAndrew Rybchenko  * at offset 0.  (Note that, unlike the configuration partitions, there is no
1483c838a9fSAndrew Rybchenko  * trailer before the TLV_TAG_END word.)
1493c838a9fSAndrew Rybchenko  */
1503c838a9fSAndrew Rybchenko 
1513c838a9fSAndrew Rybchenko #define TLV_TAG_APPENDABLE_PARTITION_HEADER (0xEF10ADA7)
1523c838a9fSAndrew Rybchenko 
1533c838a9fSAndrew Rybchenko struct tlv_appendable_partition_header {
1543c838a9fSAndrew Rybchenko   uint32_t tag;
1553c838a9fSAndrew Rybchenko   uint32_t length;
1563c838a9fSAndrew Rybchenko   uint16_t type_id;
1573c838a9fSAndrew Rybchenko   uint16_t reserved;
1583c838a9fSAndrew Rybchenko };
1593c838a9fSAndrew Rybchenko 
1603c838a9fSAndrew Rybchenko 
1613c838a9fSAndrew Rybchenko /* ----------------------------------------------------------------------------
1623c838a9fSAndrew Rybchenko  *  Configuration items
1633c838a9fSAndrew Rybchenko  * ----------------------------------------------------------------------------
1643c838a9fSAndrew Rybchenko  */
1653c838a9fSAndrew Rybchenko 
1663c838a9fSAndrew Rybchenko 
1673c838a9fSAndrew Rybchenko /* NIC global capabilities.
1683c838a9fSAndrew Rybchenko  */
1693c838a9fSAndrew Rybchenko 
1703c838a9fSAndrew Rybchenko #define TLV_TAG_GLOBAL_CAPABILITIES     (0x00010000)
1713c838a9fSAndrew Rybchenko 
1723c838a9fSAndrew Rybchenko struct tlv_global_capabilities {
1733c838a9fSAndrew Rybchenko   uint32_t tag;
1743c838a9fSAndrew Rybchenko   uint32_t length;
1753c838a9fSAndrew Rybchenko   uint32_t flags;
1763c838a9fSAndrew Rybchenko };
1773c838a9fSAndrew Rybchenko 
1783c838a9fSAndrew Rybchenko 
1793c838a9fSAndrew Rybchenko /* Siena-style per-port MAC address allocation.
1803c838a9fSAndrew Rybchenko  *
1813c838a9fSAndrew Rybchenko  * There are <count> addresses, starting at <base_address> and incrementing
1823c838a9fSAndrew Rybchenko  * by adding <stride> to the low-order byte(s).
1833c838a9fSAndrew Rybchenko  *
1843c838a9fSAndrew Rybchenko  * (See also TLV_TAG_GLOBAL_MAC for an alternative, specifying a global pool
1853c838a9fSAndrew Rybchenko  * of contiguous MAC addresses for the firmware to allocate as it sees fit.)
1863c838a9fSAndrew Rybchenko  */
1873c838a9fSAndrew Rybchenko 
1883c838a9fSAndrew Rybchenko #define TLV_TAG_PORT_MAC(port)          (0x00020000 + (port))
1893c838a9fSAndrew Rybchenko 
1903c838a9fSAndrew Rybchenko struct tlv_port_mac {
1913c838a9fSAndrew Rybchenko   uint32_t tag;
1923c838a9fSAndrew Rybchenko   uint32_t length;
1933c838a9fSAndrew Rybchenko   uint8_t  base_address[6];
1943c838a9fSAndrew Rybchenko   uint16_t reserved;
1953c838a9fSAndrew Rybchenko   uint16_t count;
1963c838a9fSAndrew Rybchenko   uint16_t stride;
1973c838a9fSAndrew Rybchenko };
1983c838a9fSAndrew Rybchenko 
1993c838a9fSAndrew Rybchenko 
2003c838a9fSAndrew Rybchenko /* Static VPD.
2013c838a9fSAndrew Rybchenko  *
2023c838a9fSAndrew Rybchenko  * This is the portion of VPD which is set at manufacturing time and not
2034d982a25SAndrew Rybchenko  * expected to change.  It is formatted as a standard PCI VPD block. There are
2044d982a25SAndrew Rybchenko  * global and per-pf TLVs for this, the global TLV is new for Medford and is
2054d982a25SAndrew Rybchenko  * used in preference to the per-pf TLV.
2063c838a9fSAndrew Rybchenko  */
2073c838a9fSAndrew Rybchenko 
2083c838a9fSAndrew Rybchenko #define TLV_TAG_PF_STATIC_VPD(pf)       (0x00030000 + (pf))
2093c838a9fSAndrew Rybchenko 
2103c838a9fSAndrew Rybchenko struct tlv_pf_static_vpd {
2113c838a9fSAndrew Rybchenko   uint32_t tag;
2123c838a9fSAndrew Rybchenko   uint32_t length;
2133c838a9fSAndrew Rybchenko   uint8_t  bytes[];
2143c838a9fSAndrew Rybchenko };
2153c838a9fSAndrew Rybchenko 
2164d982a25SAndrew Rybchenko #define TLV_TAG_GLOBAL_STATIC_VPD       (0x001f0000)
2174d982a25SAndrew Rybchenko 
2184d982a25SAndrew Rybchenko struct tlv_global_static_vpd {
2194d982a25SAndrew Rybchenko   uint32_t tag;
2204d982a25SAndrew Rybchenko   uint32_t length;
2214d982a25SAndrew Rybchenko   uint8_t  bytes[];
2224d982a25SAndrew Rybchenko };
2234d982a25SAndrew Rybchenko 
2243c838a9fSAndrew Rybchenko 
2253c838a9fSAndrew Rybchenko /* Dynamic VPD.
2263c838a9fSAndrew Rybchenko  *
2273c838a9fSAndrew Rybchenko  * This is the portion of VPD which may be changed (e.g. by firmware updates).
2284d982a25SAndrew Rybchenko  * It is formatted as a standard PCI VPD block. There are global and per-pf TLVs
2294d982a25SAndrew Rybchenko  * for this, the global TLV is new for Medford and is used in preference to the
2304d982a25SAndrew Rybchenko  * per-pf TLV.
2313c838a9fSAndrew Rybchenko  */
2323c838a9fSAndrew Rybchenko 
2333c838a9fSAndrew Rybchenko #define TLV_TAG_PF_DYNAMIC_VPD(pf)      (0x10030000 + (pf))
2343c838a9fSAndrew Rybchenko 
2353c838a9fSAndrew Rybchenko struct tlv_pf_dynamic_vpd {
2363c838a9fSAndrew Rybchenko   uint32_t tag;
2373c838a9fSAndrew Rybchenko   uint32_t length;
2383c838a9fSAndrew Rybchenko   uint8_t  bytes[];
2393c838a9fSAndrew Rybchenko };
2403c838a9fSAndrew Rybchenko 
2414d982a25SAndrew Rybchenko #define TLV_TAG_GLOBAL_DYNAMIC_VPD      (0x10200000)
2424d982a25SAndrew Rybchenko 
2434d982a25SAndrew Rybchenko struct tlv_global_dynamic_vpd {
2444d982a25SAndrew Rybchenko   uint32_t tag;
2454d982a25SAndrew Rybchenko   uint32_t length;
2464d982a25SAndrew Rybchenko   uint8_t  bytes[];
2474d982a25SAndrew Rybchenko };
2484d982a25SAndrew Rybchenko 
2493c838a9fSAndrew Rybchenko 
2503c838a9fSAndrew Rybchenko /* "DBI" PCI config space changes.
2513c838a9fSAndrew Rybchenko  *
2523c838a9fSAndrew Rybchenko  * This is a set of edits made to the default PCI config space values before
2534d982a25SAndrew Rybchenko  * the device is allowed to enumerate. There are global and per-pf TLVs for
2544d982a25SAndrew Rybchenko  * this, the global TLV is new for Medford and is used in preference to the
2554d982a25SAndrew Rybchenko  * per-pf TLV.
2563c838a9fSAndrew Rybchenko  */
2573c838a9fSAndrew Rybchenko 
2583c838a9fSAndrew Rybchenko #define TLV_TAG_PF_DBI(pf)              (0x00040000 + (pf))
2593c838a9fSAndrew Rybchenko 
2603c838a9fSAndrew Rybchenko struct tlv_pf_dbi {
2613c838a9fSAndrew Rybchenko   uint32_t tag;
2623c838a9fSAndrew Rybchenko   uint32_t length;
2633c838a9fSAndrew Rybchenko   struct {
2643c838a9fSAndrew Rybchenko     uint16_t addr;
2653c838a9fSAndrew Rybchenko     uint16_t byte_enables;
2663c838a9fSAndrew Rybchenko     uint32_t value;
2673c838a9fSAndrew Rybchenko   } items[];
2683c838a9fSAndrew Rybchenko };
2693c838a9fSAndrew Rybchenko 
2703c838a9fSAndrew Rybchenko 
2714d982a25SAndrew Rybchenko #define TLV_TAG_GLOBAL_DBI              (0x00210000)
2724d982a25SAndrew Rybchenko 
2734d982a25SAndrew Rybchenko struct tlv_global_dbi {
2744d982a25SAndrew Rybchenko   uint32_t tag;
2754d982a25SAndrew Rybchenko   uint32_t length;
2764d982a25SAndrew Rybchenko   struct {
2774d982a25SAndrew Rybchenko     uint16_t addr;
2784d982a25SAndrew Rybchenko     uint16_t byte_enables;
2794d982a25SAndrew Rybchenko     uint32_t value;
2804d982a25SAndrew Rybchenko   } items[];
2814d982a25SAndrew Rybchenko };
2824d982a25SAndrew Rybchenko 
2834d982a25SAndrew Rybchenko 
2843c838a9fSAndrew Rybchenko /* Partition subtype codes.
2853c838a9fSAndrew Rybchenko  *
2863c838a9fSAndrew Rybchenko  * A subtype may optionally be stored for each type of partition present in
2873c838a9fSAndrew Rybchenko  * the NVRAM.  For example, this may be used to allow a generic firmware update
2883c838a9fSAndrew Rybchenko  * utility to select a specific variant of firmware for a specific variant of
2893c838a9fSAndrew Rybchenko  * board.
2903c838a9fSAndrew Rybchenko  *
2913c838a9fSAndrew Rybchenko  * The description[] field is an optional string which is returned in the
2923c838a9fSAndrew Rybchenko  * MC_CMD_NVRAM_METADATA response if present.
2933c838a9fSAndrew Rybchenko  */
2943c838a9fSAndrew Rybchenko 
2953c838a9fSAndrew Rybchenko #define TLV_TAG_PARTITION_SUBTYPE(type) (0x00050000 + (type))
2963c838a9fSAndrew Rybchenko 
2973c838a9fSAndrew Rybchenko struct tlv_partition_subtype {
2983c838a9fSAndrew Rybchenko   uint32_t tag;
2993c838a9fSAndrew Rybchenko   uint32_t length;
3003c838a9fSAndrew Rybchenko   uint32_t subtype;
3013c838a9fSAndrew Rybchenko   uint8_t  description[];
3023c838a9fSAndrew Rybchenko };
3033c838a9fSAndrew Rybchenko 
3043c838a9fSAndrew Rybchenko 
3053c838a9fSAndrew Rybchenko /* Partition version codes.
3063c838a9fSAndrew Rybchenko  *
3073c838a9fSAndrew Rybchenko  * A version may optionally be stored for each type of partition present in
3083c838a9fSAndrew Rybchenko  * the NVRAM.  This provides a standard way of tracking the currently stored
3093c838a9fSAndrew Rybchenko  * version of each of the various component images.
3103c838a9fSAndrew Rybchenko  */
3113c838a9fSAndrew Rybchenko 
3123c838a9fSAndrew Rybchenko #define TLV_TAG_PARTITION_VERSION(type) (0x10060000 + (type))
3133c838a9fSAndrew Rybchenko 
3143c838a9fSAndrew Rybchenko struct tlv_partition_version {
3153c838a9fSAndrew Rybchenko   uint32_t tag;
3163c838a9fSAndrew Rybchenko   uint32_t length;
3173c838a9fSAndrew Rybchenko   uint16_t version_w;
3183c838a9fSAndrew Rybchenko   uint16_t version_x;
3193c838a9fSAndrew Rybchenko   uint16_t version_y;
3203c838a9fSAndrew Rybchenko   uint16_t version_z;
3213c838a9fSAndrew Rybchenko };
3223c838a9fSAndrew Rybchenko 
3233c838a9fSAndrew Rybchenko /* Global PCIe configuration */
3243c838a9fSAndrew Rybchenko 
3253c838a9fSAndrew Rybchenko #define TLV_TAG_GLOBAL_PCIE_CONFIG (0x10070000)
3263c838a9fSAndrew Rybchenko 
3273c838a9fSAndrew Rybchenko struct tlv_pcie_config {
3283c838a9fSAndrew Rybchenko   uint32_t tag;
3293c838a9fSAndrew Rybchenko   uint32_t length;
3303c838a9fSAndrew Rybchenko   int16_t max_pf_number;                        /**< Largest PF RID (lower PFs may be hidden) */
3313c838a9fSAndrew Rybchenko   uint16_t pf_aper;                             /**< BIU aperture for PF BAR2 */
3323c838a9fSAndrew Rybchenko   uint16_t vf_aper;                             /**< BIU aperture for VF BAR0 */
3333c838a9fSAndrew Rybchenko   uint16_t int_aper;                            /**< BIU aperture for PF BAR4 and VF BAR2 */
3343c838a9fSAndrew Rybchenko #define TLV_MAX_PF_DEFAULT (-1)                 /* Use FW default for largest PF RID  */
3353c838a9fSAndrew Rybchenko #define TLV_APER_DEFAULT (0xFFFF)               /* Use FW default for a given aperture */
3363c838a9fSAndrew Rybchenko };
3373c838a9fSAndrew Rybchenko 
3383c838a9fSAndrew Rybchenko /* Per-PF configuration. Note that not all these fields are necessarily useful
3393c838a9fSAndrew Rybchenko  * as the apertures are constrained by the BIU settings (the one case we do
3403c838a9fSAndrew Rybchenko  * use is to make BAR2 bigger than the BIU thinks to reserve space), but we can
3413c838a9fSAndrew Rybchenko  * tidy things up later */
3423c838a9fSAndrew Rybchenko 
3433c838a9fSAndrew Rybchenko #define TLV_TAG_PF_PCIE_CONFIG(pf)  (0x10080000 + (pf))
3443c838a9fSAndrew Rybchenko 
3453c838a9fSAndrew Rybchenko struct tlv_per_pf_pcie_config {
3463c838a9fSAndrew Rybchenko   uint32_t tag;
3473c838a9fSAndrew Rybchenko   uint32_t length;
3483c838a9fSAndrew Rybchenko   uint8_t vfs_total;
3493c838a9fSAndrew Rybchenko   uint8_t port_allocation;
3503c838a9fSAndrew Rybchenko   uint16_t vectors_per_pf;
3513c838a9fSAndrew Rybchenko   uint16_t vectors_per_vf;
3523c838a9fSAndrew Rybchenko   uint8_t pf_bar0_aperture;
3533c838a9fSAndrew Rybchenko   uint8_t pf_bar2_aperture;
3543c838a9fSAndrew Rybchenko   uint8_t vf_bar0_aperture;
3553c838a9fSAndrew Rybchenko   uint8_t vf_base;
3563c838a9fSAndrew Rybchenko   uint16_t supp_pagesz;
3573c838a9fSAndrew Rybchenko   uint16_t msix_vec_base;
3583c838a9fSAndrew Rybchenko };
3593c838a9fSAndrew Rybchenko 
3603c838a9fSAndrew Rybchenko 
3613c838a9fSAndrew Rybchenko /* Development ONLY. This is a single TLV tag for all the gubbins
3623c838a9fSAndrew Rybchenko  * that can be set through the MC command-line other than the PCIe
3633c838a9fSAndrew Rybchenko  * settings. This is a temporary measure. */
3644d982a25SAndrew Rybchenko #define TLV_TAG_TMP_GUBBINS (0x10090000)        /* legacy symbol - do not use */
3654d982a25SAndrew Rybchenko #define TLV_TAG_TMP_GUBBINS_HUNT TLV_TAG_TMP_GUBBINS
3663c838a9fSAndrew Rybchenko 
3673c838a9fSAndrew Rybchenko struct tlv_tmp_gubbins {
3683c838a9fSAndrew Rybchenko   uint32_t tag;
3693c838a9fSAndrew Rybchenko   uint32_t length;
3703c838a9fSAndrew Rybchenko   /* Consumed by dpcpu.c */
3713c838a9fSAndrew Rybchenko   uint64_t tx0_tags;     /* Bitmap */
3723c838a9fSAndrew Rybchenko   uint64_t tx1_tags;     /* Bitmap */
3733c838a9fSAndrew Rybchenko   uint64_t dl_tags;      /* Bitmap */
3743c838a9fSAndrew Rybchenko   uint32_t flags;
375501fe79dSAndrew Rybchenko #define TLV_DPCPU_TX_STRIPE (1) /* No longer used, has no effect */
3763c838a9fSAndrew Rybchenko #define TLV_DPCPU_BIU_TAGS  (2) /* Use BIU tag manager */
3773c838a9fSAndrew Rybchenko #define TLV_DPCPU_TX0_TAGS  (4) /* tx0_tags is valid */
3783c838a9fSAndrew Rybchenko #define TLV_DPCPU_TX1_TAGS  (8) /* tx1_tags is valid */
3793c838a9fSAndrew Rybchenko #define TLV_DPCPU_DL_TAGS  (16) /* dl_tags is valid */
3803c838a9fSAndrew Rybchenko   /* Consumed by features.c */
3813c838a9fSAndrew Rybchenko   uint32_t dut_features;        /* All 1s -> leave alone */
3823c838a9fSAndrew Rybchenko   int8_t with_rmon;             /* 0 -> off, 1 -> on, -1 -> leave alone */
3833c838a9fSAndrew Rybchenko   /* Consumed by clocks_hunt.c */
3843c838a9fSAndrew Rybchenko   int8_t clk_mode;             /* 0 -> off, 1 -> on, -1 -> leave alone */
3855a59cbc9SAndrew Rybchenko   /* No longer used, superseded by TLV_TAG_DESCRIPTOR_CACHE_CONFIG. */
3863c838a9fSAndrew Rybchenko   int8_t rx_dc_size;           /* -1 -> leave alone */
3873c838a9fSAndrew Rybchenko   int8_t tx_dc_size;
3883c838a9fSAndrew Rybchenko   int16_t num_q_allocs;
3893c838a9fSAndrew Rybchenko };
3903c838a9fSAndrew Rybchenko 
3913c838a9fSAndrew Rybchenko /* Global port configuration
3923c838a9fSAndrew Rybchenko  *
3933c838a9fSAndrew Rybchenko  * This is now deprecated in favour of a platform-provided default
3943c838a9fSAndrew Rybchenko  * and dynamic config override via tlv_global_port_options.
3953c838a9fSAndrew Rybchenko  */
3963c838a9fSAndrew Rybchenko #define TLV_TAG_GLOBAL_PORT_CONFIG      (0x000a0000)
3973c838a9fSAndrew Rybchenko 
3983c838a9fSAndrew Rybchenko struct tlv_global_port_config {
3993c838a9fSAndrew Rybchenko   uint32_t tag;
4003c838a9fSAndrew Rybchenko   uint32_t length;
4013c838a9fSAndrew Rybchenko   uint32_t ports_per_core;
4023c838a9fSAndrew Rybchenko   uint32_t max_port_speed;
4033c838a9fSAndrew Rybchenko };
4043c838a9fSAndrew Rybchenko 
4053c838a9fSAndrew Rybchenko 
4063c838a9fSAndrew Rybchenko /* Firmware options.
4073c838a9fSAndrew Rybchenko  *
4083c838a9fSAndrew Rybchenko  * This is intended for user-configurable selection of optional firmware
4093c838a9fSAndrew Rybchenko  * features and variants.
4103c838a9fSAndrew Rybchenko  *
4113c838a9fSAndrew Rybchenko  * Initially, this consists only of the satellite CPU firmware variant
4123c838a9fSAndrew Rybchenko  * selection, but this tag could be extended in the future (using the
4133c838a9fSAndrew Rybchenko  * tag length to determine whether additional fields are present).
4143c838a9fSAndrew Rybchenko  */
4153c838a9fSAndrew Rybchenko 
4163c838a9fSAndrew Rybchenko #define TLV_TAG_FIRMWARE_OPTIONS        (0x100b0000)
4173c838a9fSAndrew Rybchenko 
4183c838a9fSAndrew Rybchenko struct tlv_firmware_options {
4193c838a9fSAndrew Rybchenko   uint32_t tag;
4203c838a9fSAndrew Rybchenko   uint32_t length;
4213c838a9fSAndrew Rybchenko   uint32_t firmware_variant;
4223c838a9fSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_DRIVER_SELECTED (0xffffffff)
4233c838a9fSAndrew Rybchenko 
4243c838a9fSAndrew Rybchenko /* These are the values for overriding the driver's choice; the definitions
4253c838a9fSAndrew Rybchenko  * are taken from MCDI so that they don't get out of step.  Include
4263c838a9fSAndrew Rybchenko  * <ci/mgmt/mc_driver_pcol.h> or the equivalent from your driver's tree if
4273c838a9fSAndrew Rybchenko  * you need to use these constants.
4283c838a9fSAndrew Rybchenko  */
4293c838a9fSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_FULL_FEATURED   MC_CMD_FW_FULL_FEATURED
4303c838a9fSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_LOW_LATENCY     MC_CMD_FW_LOW_LATENCY
4313c838a9fSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_PACKED_STREAM   MC_CMD_FW_PACKED_STREAM
4323c838a9fSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_HIGH_TX_RATE    MC_CMD_FW_HIGH_TX_RATE
4333c838a9fSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_PACKED_STREAM_HASH_MODE_1 \
4343c838a9fSAndrew Rybchenko                                              MC_CMD_FW_PACKED_STREAM_HASH_MODE_1
4353c838a9fSAndrew Rybchenko };
4363c838a9fSAndrew Rybchenko 
4373c838a9fSAndrew Rybchenko /* Voltage settings
4383c838a9fSAndrew Rybchenko  *
4393c838a9fSAndrew Rybchenko  * Intended for boards with A0 silicon where the core voltage may
4403c838a9fSAndrew Rybchenko  * need tweaking. Most likely set once when the pass voltage is
4413c838a9fSAndrew Rybchenko  * determined. */
4423c838a9fSAndrew Rybchenko 
4433c838a9fSAndrew Rybchenko #define TLV_TAG_0V9_SETTINGS (0x000c0000)
4443c838a9fSAndrew Rybchenko 
4453c838a9fSAndrew Rybchenko struct tlv_0v9_settings {
4463c838a9fSAndrew Rybchenko   uint32_t tag;
4473c838a9fSAndrew Rybchenko   uint32_t length;
4483c838a9fSAndrew Rybchenko   uint16_t flags; /* Boards with high 0v9 settings may need active cooling */
4493c838a9fSAndrew Rybchenko #define TLV_TAG_0V9_REQUIRES_FAN (1)
4503c838a9fSAndrew Rybchenko   uint16_t target_voltage; /* In millivolts */
4513c838a9fSAndrew Rybchenko   /* Since the limits are meant to be centred to the target (and must at least
4523c838a9fSAndrew Rybchenko    * contain it) they need setting as well. */
4533c838a9fSAndrew Rybchenko   uint16_t warn_low;       /* In millivolts */
4543c838a9fSAndrew Rybchenko   uint16_t warn_high;      /* In millivolts */
4553c838a9fSAndrew Rybchenko   uint16_t panic_low;      /* In millivolts */
4563c838a9fSAndrew Rybchenko   uint16_t panic_high;     /* In millivolts */
4573c838a9fSAndrew Rybchenko };
4583c838a9fSAndrew Rybchenko 
4593c838a9fSAndrew Rybchenko 
4603c838a9fSAndrew Rybchenko /* Clock configuration */
4613c838a9fSAndrew Rybchenko 
4624d982a25SAndrew Rybchenko #define TLV_TAG_CLOCK_CONFIG       (0x000d0000) /* legacy symbol - do not use */
4634d982a25SAndrew Rybchenko #define TLV_TAG_CLOCK_CONFIG_HUNT  TLV_TAG_CLOCK_CONFIG
4643c838a9fSAndrew Rybchenko 
4653c838a9fSAndrew Rybchenko struct tlv_clock_config {
4663c838a9fSAndrew Rybchenko   uint32_t tag;
4673c838a9fSAndrew Rybchenko   uint32_t length;
4683c838a9fSAndrew Rybchenko   uint16_t clk_sys;        /* MHz */
4693c838a9fSAndrew Rybchenko   uint16_t clk_dpcpu;      /* MHz */
4703c838a9fSAndrew Rybchenko   uint16_t clk_icore;      /* MHz */
4713c838a9fSAndrew Rybchenko   uint16_t clk_pcs;        /* MHz */
4723c838a9fSAndrew Rybchenko };
4733c838a9fSAndrew Rybchenko 
4743c838a9fSAndrew Rybchenko #define TLV_TAG_CLOCK_CONFIG_MEDFORD      (0x00100000)
4753c838a9fSAndrew Rybchenko 
4763c838a9fSAndrew Rybchenko struct tlv_clock_config_medford {
4773c838a9fSAndrew Rybchenko   uint32_t tag;
4783c838a9fSAndrew Rybchenko   uint32_t length;
4793c838a9fSAndrew Rybchenko   uint16_t clk_sys;        /* MHz */
4803c838a9fSAndrew Rybchenko   uint16_t clk_mc;         /* MHz */
4813c838a9fSAndrew Rybchenko   uint16_t clk_rmon;       /* MHz */
4823c838a9fSAndrew Rybchenko   uint16_t clk_vswitch;    /* MHz */
4833c838a9fSAndrew Rybchenko   uint16_t clk_dpcpu;      /* MHz */
4843c838a9fSAndrew Rybchenko   uint16_t clk_pcs;        /* MHz */
4853c838a9fSAndrew Rybchenko };
4863c838a9fSAndrew Rybchenko 
4873c838a9fSAndrew Rybchenko 
4883c838a9fSAndrew Rybchenko /* EF10-style global pool of MAC addresses.
4893c838a9fSAndrew Rybchenko  *
4903c838a9fSAndrew Rybchenko  * There are <count> addresses, starting at <base_address>, which are
4913c838a9fSAndrew Rybchenko  * contiguous.  Firmware is responsible for allocating addresses from this
4923c838a9fSAndrew Rybchenko  * pool to ports / PFs as appropriate.
4933c838a9fSAndrew Rybchenko  */
4943c838a9fSAndrew Rybchenko 
4953c838a9fSAndrew Rybchenko #define TLV_TAG_GLOBAL_MAC              (0x000e0000)
4963c838a9fSAndrew Rybchenko 
4973c838a9fSAndrew Rybchenko struct tlv_global_mac {
4983c838a9fSAndrew Rybchenko   uint32_t tag;
4993c838a9fSAndrew Rybchenko   uint32_t length;
5003c838a9fSAndrew Rybchenko   uint8_t  base_address[6];
5013c838a9fSAndrew Rybchenko   uint16_t reserved1;
5023c838a9fSAndrew Rybchenko   uint16_t count;
5033c838a9fSAndrew Rybchenko   uint16_t reserved2;
5043c838a9fSAndrew Rybchenko };
5053c838a9fSAndrew Rybchenko 
5064d982a25SAndrew Rybchenko #define TLV_TAG_ATB_0V9_TARGET     (0x000f0000) /* legacy symbol - do not use */
5074d982a25SAndrew Rybchenko #define TLV_TAG_ATB_0V9_TARGET_HUNT     TLV_TAG_ATB_0V9_TARGET
5083c838a9fSAndrew Rybchenko 
5093c838a9fSAndrew Rybchenko /* The target value for the 0v9 power rail measured on-chip at the
5103c838a9fSAndrew Rybchenko  * analogue test bus */
5113c838a9fSAndrew Rybchenko struct tlv_0v9_atb_target {
5123c838a9fSAndrew Rybchenko   uint32_t tag;
5133c838a9fSAndrew Rybchenko   uint32_t length;
5143c838a9fSAndrew Rybchenko   uint16_t millivolts;
5153c838a9fSAndrew Rybchenko   uint16_t reserved;
5163c838a9fSAndrew Rybchenko };
5173c838a9fSAndrew Rybchenko 
5183c838a9fSAndrew Rybchenko /* Global PCIe configuration, second revision. This represents the visible PFs
5193c838a9fSAndrew Rybchenko  * by a bitmap rather than having the number of the highest visible one. As such
5203c838a9fSAndrew Rybchenko  * it can (for a 16-PF chip) represent a superset of what TLV_TAG_GLOBAL_PCIE_CONFIG
5213c838a9fSAndrew Rybchenko  * can and it should be used in place of that tag in future (but compatibility with
5223c838a9fSAndrew Rybchenko  * the old tag will be left in the firmware indefinitely).  */
5233c838a9fSAndrew Rybchenko 
5243c838a9fSAndrew Rybchenko #define TLV_TAG_GLOBAL_PCIE_CONFIG_R2 (0x10100000)
5253c838a9fSAndrew Rybchenko 
5263c838a9fSAndrew Rybchenko struct tlv_pcie_config_r2 {
5273c838a9fSAndrew Rybchenko   uint32_t tag;
5283c838a9fSAndrew Rybchenko   uint32_t length;
5293c838a9fSAndrew Rybchenko   uint16_t visible_pfs;                         /**< Bitmap of visible PFs */
5303c838a9fSAndrew Rybchenko   uint16_t pf_aper;                             /**< BIU aperture for PF BAR2 */
5313c838a9fSAndrew Rybchenko   uint16_t vf_aper;                             /**< BIU aperture for VF BAR0 */
5323c838a9fSAndrew Rybchenko   uint16_t int_aper;                            /**< BIU aperture for PF BAR4 and VF BAR2 */
5333c838a9fSAndrew Rybchenko };
5343c838a9fSAndrew Rybchenko 
5353c838a9fSAndrew Rybchenko /* Dynamic port mode.
5363c838a9fSAndrew Rybchenko  *
5373c838a9fSAndrew Rybchenko  * Allows selecting alternate port configuration for platforms that support it
5383c838a9fSAndrew Rybchenko  * (e.g. 1x40G vs 2x10G on Milano, 1x40G vs 4x10G on Medford). This affects the
5393c838a9fSAndrew Rybchenko  * number of externally visible ports (and, hence, PF to port mapping), so must
5403c838a9fSAndrew Rybchenko  * be done at boot time.
5413c838a9fSAndrew Rybchenko  *
5423c838a9fSAndrew Rybchenko  * This tag supercedes tlv_global_port_config.
5433c838a9fSAndrew Rybchenko  */
5443c838a9fSAndrew Rybchenko 
5453c838a9fSAndrew Rybchenko #define TLV_TAG_GLOBAL_PORT_MODE         (0x10110000)
5463c838a9fSAndrew Rybchenko 
5473c838a9fSAndrew Rybchenko struct tlv_global_port_mode {
5483c838a9fSAndrew Rybchenko   uint32_t tag;
5493c838a9fSAndrew Rybchenko   uint32_t length;
5503c838a9fSAndrew Rybchenko   uint32_t port_mode;
5513c838a9fSAndrew Rybchenko #define TLV_PORT_MODE_DEFAULT           (0xffffffff) /* Default for given platform */
5523c838a9fSAndrew Rybchenko #define TLV_PORT_MODE_10G                        (0) /* 10G, single SFP/10G-KR */
5533c838a9fSAndrew Rybchenko #define TLV_PORT_MODE_40G                        (1) /* 40G, single QSFP/40G-KR */
5543c838a9fSAndrew Rybchenko #define TLV_PORT_MODE_10G_10G                    (2) /* 2x10G, dual SFP/10G-KR or single QSFP */
5553c838a9fSAndrew Rybchenko #define TLV_PORT_MODE_40G_40G                    (3) /* 40G + 40G, dual QSFP/40G-KR (Greenport, Medford) */
556*62242903SAndrew Rybchenko #define TLV_PORT_MODE_10G_10G_10G_10G            (4) /* 2x10G + 2x10G, quad SFP/10G-KR or dual QSFP (Greenport) */
557*62242903SAndrew Rybchenko #define TLV_PORT_MODE_10G_10G_10G_10G_Q1         (4) /* 4x10G, single QSFP, cage 0 (Medford) */
558*62242903SAndrew Rybchenko #define TLV_PORT_MODE_10G_10G_10G_10G_Q          (5) /* 4x10G, single QSFP, cage 0 (Medford) OBSOLETE DO NOT USE */
5593c838a9fSAndrew Rybchenko #define TLV_PORT_MODE_40G_10G_10G                (6) /* 1x40G + 2x10G, dual QSFP (Greenport, Medford) */
5603c838a9fSAndrew Rybchenko #define TLV_PORT_MODE_10G_10G_40G                (7) /* 2x10G + 1x40G, dual QSFP (Greenport, Medford) */
5613c838a9fSAndrew Rybchenko #define TLV_PORT_MODE_10G_10G_10G_10G_Q2         (8) /* 4x10G, single QSFP, cage 1 (Medford) */
562*62242903SAndrew Rybchenko #define TLV_PORT_MODE_10G_10G_10G_10G_Q1_Q2      (9) /* 2x10G + 2x10G, dual QSFP (Medford) */
563*62242903SAndrew Rybchenko #define TLV_PORT_MODE_MAX TLV_PORT_MODE_10G_10G_10G_10G_Q1_Q2
5643c838a9fSAndrew Rybchenko };
5653c838a9fSAndrew Rybchenko 
5663c838a9fSAndrew Rybchenko /* Type of the v-switch created implicitly by the firmware */
5673c838a9fSAndrew Rybchenko 
5683c838a9fSAndrew Rybchenko #define TLV_TAG_VSWITCH_TYPE(port)       (0x10120000 + (port))
5693c838a9fSAndrew Rybchenko 
5703c838a9fSAndrew Rybchenko struct tlv_vswitch_type {
5713c838a9fSAndrew Rybchenko   uint32_t tag;
5723c838a9fSAndrew Rybchenko   uint32_t length;
5733c838a9fSAndrew Rybchenko   uint32_t vswitch_type;
5743c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_DEFAULT        (0xffffffff) /* Firmware default; equivalent to no TLV present for a given port */
5753c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_NONE                    (0)
5763c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_VLAN                    (1)
5773c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_VEB                     (2)
5783c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_VEPA                    (3)
5793c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_MUX                     (4)
5803c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_TEST                    (5)
5813c838a9fSAndrew Rybchenko };
5823c838a9fSAndrew Rybchenko 
5833c838a9fSAndrew Rybchenko /* A VLAN tag for the v-port created implicitly by the firmware */
5843c838a9fSAndrew Rybchenko 
5853c838a9fSAndrew Rybchenko #define TLV_TAG_VPORT_VLAN_TAG(pf)               (0x10130000 + (pf))
5863c838a9fSAndrew Rybchenko 
5873c838a9fSAndrew Rybchenko struct tlv_vport_vlan_tag {
5883c838a9fSAndrew Rybchenko   uint32_t tag;
5893c838a9fSAndrew Rybchenko   uint32_t length;
5903c838a9fSAndrew Rybchenko   uint32_t vlan_tag;
5913c838a9fSAndrew Rybchenko #define TLV_VPORT_NO_VLAN_TAG                    (0xFFFFFFFF) /* Default in the absence of TLV for a given PF */
5923c838a9fSAndrew Rybchenko };
5933c838a9fSAndrew Rybchenko 
5943c838a9fSAndrew Rybchenko /* Offset to be applied to the 0v9 setting, wherever it came from */
5953c838a9fSAndrew Rybchenko 
5963c838a9fSAndrew Rybchenko #define TLV_TAG_ATB_0V9_OFFSET           (0x10140000)
5973c838a9fSAndrew Rybchenko 
5983c838a9fSAndrew Rybchenko struct tlv_0v9_atb_offset {
5993c838a9fSAndrew Rybchenko   uint32_t tag;
6003c838a9fSAndrew Rybchenko   uint32_t length;
6013c838a9fSAndrew Rybchenko   int16_t  offset_millivolts;
6023c838a9fSAndrew Rybchenko   uint16_t reserved;
6033c838a9fSAndrew Rybchenko };
6043c838a9fSAndrew Rybchenko 
6053c838a9fSAndrew Rybchenko /* A privilege mask given on reset to all non-admin PCIe functions (that is other than first-PF-per-port).
6063c838a9fSAndrew Rybchenko  * The meaning of particular bits is defined in mcdi_ef10.yml under MC_CMD_PRIVILEGE_MASK, see also bug 44583.
6073c838a9fSAndrew Rybchenko  * TLV_TAG_PRIVILEGE_MASK_ADD specifies bits that should be added (ORed) to firmware default while
6083c838a9fSAndrew Rybchenko  * TLV_TAG_PRIVILEGE_MASK_REM specifies bits that should be removed (ANDed) from firmware default:
6093c838a9fSAndrew Rybchenko  * Initial_privilege_mask = (firmware_default_mask | privilege_mask_add) & ~privilege_mask_rem */
6103c838a9fSAndrew Rybchenko 
6113c838a9fSAndrew Rybchenko #define TLV_TAG_PRIVILEGE_MASK          (0x10150000) /* legacy symbol - do not use */
6123c838a9fSAndrew Rybchenko 
6133c838a9fSAndrew Rybchenko struct tlv_privilege_mask {                          /* legacy structure - do not use */
6143c838a9fSAndrew Rybchenko   uint32_t tag;
6153c838a9fSAndrew Rybchenko   uint32_t length;
6163c838a9fSAndrew Rybchenko   uint32_t privilege_mask;
6173c838a9fSAndrew Rybchenko };
6183c838a9fSAndrew Rybchenko 
6193c838a9fSAndrew Rybchenko #define TLV_TAG_PRIVILEGE_MASK_ADD      (0x10150000)
6203c838a9fSAndrew Rybchenko 
6213c838a9fSAndrew Rybchenko struct tlv_privilege_mask_add {
6223c838a9fSAndrew Rybchenko   uint32_t tag;
6233c838a9fSAndrew Rybchenko   uint32_t length;
6243c838a9fSAndrew Rybchenko   uint32_t privilege_mask_add;
6253c838a9fSAndrew Rybchenko };
6263c838a9fSAndrew Rybchenko 
6273c838a9fSAndrew Rybchenko #define TLV_TAG_PRIVILEGE_MASK_REM      (0x10160000)
6283c838a9fSAndrew Rybchenko 
6293c838a9fSAndrew Rybchenko struct tlv_privilege_mask_rem {
6303c838a9fSAndrew Rybchenko   uint32_t tag;
6313c838a9fSAndrew Rybchenko   uint32_t length;
6323c838a9fSAndrew Rybchenko   uint32_t privilege_mask_rem;
6333c838a9fSAndrew Rybchenko };
6343c838a9fSAndrew Rybchenko 
6353c838a9fSAndrew Rybchenko /* Additional privileges given to all PFs.
6363c838a9fSAndrew Rybchenko  * This tag takes precedence over TLV_TAG_PRIVILEGE_MASK_REM. */
6373c838a9fSAndrew Rybchenko 
6383c838a9fSAndrew Rybchenko #define TLV_TAG_PRIVILEGE_MASK_ADD_ALL_PFS         (0x10190000)
6393c838a9fSAndrew Rybchenko 
6403c838a9fSAndrew Rybchenko struct tlv_privilege_mask_add_all_pfs {
6413c838a9fSAndrew Rybchenko   uint32_t tag;
6423c838a9fSAndrew Rybchenko   uint32_t length;
6433c838a9fSAndrew Rybchenko   uint32_t privilege_mask_add;
6443c838a9fSAndrew Rybchenko };
6453c838a9fSAndrew Rybchenko 
6463c838a9fSAndrew Rybchenko /* Additional privileges given to a selected PF.
6473c838a9fSAndrew Rybchenko  * This tag takes precedence over TLV_TAG_PRIVILEGE_MASK_REM. */
6483c838a9fSAndrew Rybchenko 
6493c838a9fSAndrew Rybchenko #define TLV_TAG_PRIVILEGE_MASK_ADD_SINGLE_PF(pf)   (0x101A0000 + (pf))
6503c838a9fSAndrew Rybchenko 
6513c838a9fSAndrew Rybchenko struct tlv_privilege_mask_add_single_pf {
6523c838a9fSAndrew Rybchenko   uint32_t tag;
6533c838a9fSAndrew Rybchenko   uint32_t length;
6543c838a9fSAndrew Rybchenko   uint32_t privilege_mask_add;
6553c838a9fSAndrew Rybchenko };
6563c838a9fSAndrew Rybchenko 
6573c838a9fSAndrew Rybchenko /* Turning on/off the PFIOV mode.
6583c838a9fSAndrew Rybchenko  * This tag only takes effect if TLV_TAG_VSWITCH_TYPE is missing or set to DEFAULT. */
6593c838a9fSAndrew Rybchenko 
6603c838a9fSAndrew Rybchenko #define TLV_TAG_PFIOV(port)             (0x10170000 + (port))
6613c838a9fSAndrew Rybchenko 
6623c838a9fSAndrew Rybchenko struct tlv_pfiov {
6633c838a9fSAndrew Rybchenko   uint32_t tag;
6643c838a9fSAndrew Rybchenko   uint32_t length;
6653c838a9fSAndrew Rybchenko   uint32_t pfiov;
6663c838a9fSAndrew Rybchenko #define TLV_PFIOV_OFF                    (0) /* Default */
6673c838a9fSAndrew Rybchenko #define TLV_PFIOV_ON                     (1)
6683c838a9fSAndrew Rybchenko };
6693c838a9fSAndrew Rybchenko 
6703c838a9fSAndrew Rybchenko /* Multicast filter chaining mode selection.
6713c838a9fSAndrew Rybchenko  *
6723c838a9fSAndrew Rybchenko  * When enabled, multicast packets are delivered to all recipients of all
6733c838a9fSAndrew Rybchenko  * matching multicast filters, with the exception that IP multicast filters
6743c838a9fSAndrew Rybchenko  * will steal traffic from MAC multicast filters on a per-function basis.
6753c838a9fSAndrew Rybchenko  * (New behaviour.)
6763c838a9fSAndrew Rybchenko  *
6773c838a9fSAndrew Rybchenko  * When disabled, multicast packets will always be delivered only to the
6783c838a9fSAndrew Rybchenko  * recipients of the highest priority matching multicast filter.
6793c838a9fSAndrew Rybchenko  * (Legacy behaviour.)
6803c838a9fSAndrew Rybchenko  *
6813c838a9fSAndrew Rybchenko  * The DEFAULT mode (which is the same as the tag not being present at all)
6823c838a9fSAndrew Rybchenko  * is equivalent to ENABLED in production builds, and DISABLED in eftest
6833c838a9fSAndrew Rybchenko  * builds.
6843c838a9fSAndrew Rybchenko  *
6853c838a9fSAndrew Rybchenko  * This option is intended to provide run-time control over this feature
6863c838a9fSAndrew Rybchenko  * while it is being stabilised and may be withdrawn at some point in the
6873c838a9fSAndrew Rybchenko  * future; the new behaviour is intended to become the standard behaviour.
6883c838a9fSAndrew Rybchenko  */
6893c838a9fSAndrew Rybchenko 
6903c838a9fSAndrew Rybchenko #define TLV_TAG_MCAST_FILTER_CHAINING   (0x10180000)
6913c838a9fSAndrew Rybchenko 
6923c838a9fSAndrew Rybchenko struct tlv_mcast_filter_chaining {
6933c838a9fSAndrew Rybchenko   uint32_t tag;
6943c838a9fSAndrew Rybchenko   uint32_t length;
6953c838a9fSAndrew Rybchenko   uint32_t mode;
6963c838a9fSAndrew Rybchenko #define TLV_MCAST_FILTER_CHAINING_DEFAULT  (0xffffffff)
6973c838a9fSAndrew Rybchenko #define TLV_MCAST_FILTER_CHAINING_DISABLED (0)
6983c838a9fSAndrew Rybchenko #define TLV_MCAST_FILTER_CHAINING_ENABLED  (1)
6993c838a9fSAndrew Rybchenko };
7003c838a9fSAndrew Rybchenko 
7013c838a9fSAndrew Rybchenko /* Pacer rate limit per PF */
7023c838a9fSAndrew Rybchenko #define TLV_TAG_RATE_LIMIT(pf)    (0x101b0000 + (pf))
7033c838a9fSAndrew Rybchenko 
7043c838a9fSAndrew Rybchenko struct tlv_rate_limit {
7053c838a9fSAndrew Rybchenko   uint32_t tag;
7063c838a9fSAndrew Rybchenko   uint32_t length;
7073c838a9fSAndrew Rybchenko   uint32_t rate_mbps;
7083c838a9fSAndrew Rybchenko };
7093c838a9fSAndrew Rybchenko 
7103c838a9fSAndrew Rybchenko /* OCSD Enable/Disable
7113c838a9fSAndrew Rybchenko  *
7123c838a9fSAndrew Rybchenko  * This setting allows OCSD to be disabled. This is a requirement for HP
7133c838a9fSAndrew Rybchenko  * servers to support PCI passthrough for virtualization.
7143c838a9fSAndrew Rybchenko  *
7153c838a9fSAndrew Rybchenko  * The DEFAULT mode (which is the same as the tag not being present) is
7163c838a9fSAndrew Rybchenko  * equivalent to ENABLED.
7173c838a9fSAndrew Rybchenko  *
7183c838a9fSAndrew Rybchenko  * This option is not used by the MCFW, and is entirely handled by the various
7193c838a9fSAndrew Rybchenko  * drivers that support OCSD, by reading the setting before they attempt
7203c838a9fSAndrew Rybchenko  * to enable OCSD.
7213c838a9fSAndrew Rybchenko  *
7223c838a9fSAndrew Rybchenko  * bit0: OCSD Disabled/Enabled
7233c838a9fSAndrew Rybchenko  */
7243c838a9fSAndrew Rybchenko 
7253c838a9fSAndrew Rybchenko #define TLV_TAG_OCSD (0x101C0000)
7263c838a9fSAndrew Rybchenko 
7273c838a9fSAndrew Rybchenko struct tlv_ocsd {
7283c838a9fSAndrew Rybchenko   uint32_t tag;
7293c838a9fSAndrew Rybchenko   uint32_t length;
7303c838a9fSAndrew Rybchenko   uint32_t mode;
7313c838a9fSAndrew Rybchenko #define TLV_OCSD_DISABLED 0
7323c838a9fSAndrew Rybchenko #define TLV_OCSD_ENABLED 1 /* Default */
7333c838a9fSAndrew Rybchenko };
7343c838a9fSAndrew Rybchenko 
735501fe79dSAndrew Rybchenko /* Descriptor cache config.
736501fe79dSAndrew Rybchenko  *
737501fe79dSAndrew Rybchenko  * Sets the sizes of the TX and RX descriptor caches as a power of 2. It also
738501fe79dSAndrew Rybchenko  * sets the total number of VIs. When the number of VIs is reduced VIs are taken
739501fe79dSAndrew Rybchenko  * away from the highest numbered port first, so a vi_count of 1024 means 1024
740501fe79dSAndrew Rybchenko  * VIs on the first port and 0 on the second (on a Torino).
741501fe79dSAndrew Rybchenko  */
742501fe79dSAndrew Rybchenko 
743501fe79dSAndrew Rybchenko #define TLV_TAG_DESCRIPTOR_CACHE_CONFIG    (0x101d0000)
744501fe79dSAndrew Rybchenko 
745501fe79dSAndrew Rybchenko struct tlv_descriptor_cache_config {
746501fe79dSAndrew Rybchenko   uint32_t tag;
747501fe79dSAndrew Rybchenko   uint32_t length;
748501fe79dSAndrew Rybchenko   uint8_t rx_desc_cache_size;
749501fe79dSAndrew Rybchenko   uint8_t tx_desc_cache_size;
750501fe79dSAndrew Rybchenko   uint16_t vi_count;
751501fe79dSAndrew Rybchenko };
752501fe79dSAndrew Rybchenko #define TLV_DESC_CACHE_DEFAULT (0xff)
753501fe79dSAndrew Rybchenko #define TLV_VI_COUNT_DEFAULT   (0xffff)
754501fe79dSAndrew Rybchenko 
755501fe79dSAndrew Rybchenko /* RX event merging config (read batching).
756501fe79dSAndrew Rybchenko  *
757501fe79dSAndrew Rybchenko  * Sets the global maximum number of events for the merging bins, and the
758501fe79dSAndrew Rybchenko  * global timeout configuration for the bins.
759501fe79dSAndrew Rybchenko  */
760501fe79dSAndrew Rybchenko 
761501fe79dSAndrew Rybchenko #define TLV_TAG_RX_EVENT_MERGING_CONFIG    (0x101e0000)
762501fe79dSAndrew Rybchenko 
763501fe79dSAndrew Rybchenko struct tlv_rx_event_merging_config {
764501fe79dSAndrew Rybchenko   uint32_t  tag;
765501fe79dSAndrew Rybchenko   uint32_t  length;
766501fe79dSAndrew Rybchenko   uint32_t  max_events;
767501fe79dSAndrew Rybchenko #define TLV_RX_EVENT_MERGING_CONFIG_MAX_EVENTS_MAX ((1 << 4) - 1)
768501fe79dSAndrew Rybchenko   uint32_t  timeout_ns;
769501fe79dSAndrew Rybchenko };
770*62242903SAndrew Rybchenko #define TLV_RX_EVENT_MERGING_MAX_EVENTS_DEFAULT (0xffffffff)
771*62242903SAndrew Rybchenko #define TLV_RX_EVENT_MERGING_TIMEOUT_NS_DEFAULT (0xffffffff)
772501fe79dSAndrew Rybchenko 
77388cbf0f7SAndrew Rybchenko #define TLV_TAG_PCIE_LINK_SETTINGS (0x101f0000)
77488cbf0f7SAndrew Rybchenko struct tlv_pcie_link_settings {
77588cbf0f7SAndrew Rybchenko   uint32_t tag;
77688cbf0f7SAndrew Rybchenko   uint32_t length;
77788cbf0f7SAndrew Rybchenko   uint16_t gen;   /* Target PCIe generation: 1, 2, 3 */
77888cbf0f7SAndrew Rybchenko   uint16_t width; /* Number of lanes */
77988cbf0f7SAndrew Rybchenko };
78088cbf0f7SAndrew Rybchenko 
7817d17c52bSAndrew Rybchenko /* TX event merging config.
7827d17c52bSAndrew Rybchenko  *
7837d17c52bSAndrew Rybchenko  * Sets the global maximum number of events for the merging bins, and the
7847d17c52bSAndrew Rybchenko  * global timeout configuration for the bins, and the global timeout for
7857d17c52bSAndrew Rybchenko  * empty queues.
7867d17c52bSAndrew Rybchenko  */
7877d17c52bSAndrew Rybchenko #define TLV_TAG_TX_EVENT_MERGING_CONFIG    (0x10210000)
7887d17c52bSAndrew Rybchenko struct tlv_tx_event_merging_config {
7897d17c52bSAndrew Rybchenko   uint32_t  tag;
7907d17c52bSAndrew Rybchenko   uint32_t  length;
7917d17c52bSAndrew Rybchenko   uint32_t  max_events;
7927d17c52bSAndrew Rybchenko #define TLV_TX_EVENT_MERGING_CONFIG_MAX_EVENTS_MAX ((1 << 4) - 1)
7937d17c52bSAndrew Rybchenko   uint32_t  timeout_ns;
7947d17c52bSAndrew Rybchenko   uint32_t  qempty_timeout_ns; /* Medford only */
7957d17c52bSAndrew Rybchenko };
796*62242903SAndrew Rybchenko #define TLV_TX_EVENT_MERGING_MAX_EVENTS_DEFAULT (0xffffffff)
797*62242903SAndrew Rybchenko #define TLV_TX_EVENT_MERGING_TIMEOUT_NS_DEFAULT (0xffffffff)
798*62242903SAndrew Rybchenko #define TLV_TX_EVENT_MERGING_QEMPTY_TIMEOUT_NS_DEFAULT (0xffffffff)
7997d17c52bSAndrew Rybchenko 
8007d17c52bSAndrew Rybchenko /* Tx vFIFO Low latency configuration
8017d17c52bSAndrew Rybchenko  *
8027d17c52bSAndrew Rybchenko  * To keep the desired booting behaviour for the switch, it just requires to
8037d17c52bSAndrew Rybchenko  * know if the low latency mode is enabled.
8047d17c52bSAndrew Rybchenko  */
8057d17c52bSAndrew Rybchenko 
806ba3049f9SAndrew Rybchenko #define TLV_TAG_TX_VFIFO_ULL_MODE          (0x10270000)
8077d17c52bSAndrew Rybchenko struct tlv_tx_vfifo_ull_mode {
8087d17c52bSAndrew Rybchenko   uint32_t tag;
8097d17c52bSAndrew Rybchenko   uint32_t length;
8107d17c52bSAndrew Rybchenko   uint8_t  mode;
8117d17c52bSAndrew Rybchenko #define TLV_TX_VFIFO_ULL_MODE_DEFAULT    0
8127d17c52bSAndrew Rybchenko };
8137d17c52bSAndrew Rybchenko 
814*62242903SAndrew Rybchenko /* BIU mode
815*62242903SAndrew Rybchenko  *
816*62242903SAndrew Rybchenko  * Medford2 tag for selecting VI window decode (see values below)
817*62242903SAndrew Rybchenko  */
818*62242903SAndrew Rybchenko #define TLV_TAG_BIU_VI_WINDOW_MODE       (0x10280000)
819*62242903SAndrew Rybchenko struct tlv_biu_vi_window_mode {
820*62242903SAndrew Rybchenko   uint32_t tag;
821*62242903SAndrew Rybchenko   uint32_t length;
822*62242903SAndrew Rybchenko   uint8_t  mode;
823*62242903SAndrew Rybchenko #define TLV_BIU_VI_WINDOW_MODE_8K    0  /*  8k per VI, CTPIO not mapped, medford/hunt compatible */
824*62242903SAndrew Rybchenko #define TLV_BIU_VI_WINDOW_MODE_16K   1  /* 16k per VI, CTPIO mapped */
825*62242903SAndrew Rybchenko #define TLV_BIU_VI_WINDOW_MODE_64K   2  /* 64k per VI, CTPIO mapped, POWER-friendly */
826*62242903SAndrew Rybchenko };
827*62242903SAndrew Rybchenko 
8282d9312f6SAndrew Rybchenko #define TLV_TAG_LICENSE (0x30800000)
82988cbf0f7SAndrew Rybchenko 
83088cbf0f7SAndrew Rybchenko typedef struct tlv_license {
83188cbf0f7SAndrew Rybchenko   uint32_t  tag;
83288cbf0f7SAndrew Rybchenko   uint32_t  length;
83388cbf0f7SAndrew Rybchenko   uint8_t   data[];
83488cbf0f7SAndrew Rybchenko } tlv_license_t;
83588cbf0f7SAndrew Rybchenko 
8367d17c52bSAndrew Rybchenko /* TSA NIC IP address configuration
8377d17c52bSAndrew Rybchenko  *
8387d17c52bSAndrew Rybchenko  * Sets the TSA NIC IP address statically via configuration tool or dynamically
8397d17c52bSAndrew Rybchenko  * via DHCP via snooping based on the mode selection (0=Static, 1=DHCP, 2=Snoop)
8407d17c52bSAndrew Rybchenko  *
8417d17c52bSAndrew Rybchenko  * NOTE: This TAG is temporarily placed in the dynamic config partition and will
8427d17c52bSAndrew Rybchenko  * be moved to a private partition during TSA development. It is not used in any
8437d17c52bSAndrew Rybchenko  * released code yet.
8447d17c52bSAndrew Rybchenko  */
8457d17c52bSAndrew Rybchenko 
8467d17c52bSAndrew Rybchenko #define TLV_TAG_TMP_TSAN_CONFIG         (0x10220000)
8477d17c52bSAndrew Rybchenko 
8487d17c52bSAndrew Rybchenko #define TLV_TSAN_IP_MODE_STATIC         (0)
8497d17c52bSAndrew Rybchenko #define TLV_TSAN_IP_MODE_DHCP           (1)
8507d17c52bSAndrew Rybchenko #define TLV_TSAN_IP_MODE_SNOOP          (2)
8517d17c52bSAndrew Rybchenko typedef struct tlv_tsan_config {
8527d17c52bSAndrew Rybchenko   uint32_t tag;
8537d17c52bSAndrew Rybchenko   uint32_t length;
8547d17c52bSAndrew Rybchenko   uint32_t mode;
8557d17c52bSAndrew Rybchenko   uint32_t ip;
8567d17c52bSAndrew Rybchenko   uint32_t netmask;
8577d17c52bSAndrew Rybchenko   uint32_t gateway;
8587d17c52bSAndrew Rybchenko   uint32_t port;
8597d17c52bSAndrew Rybchenko   uint32_t bind_retry;
8607d17c52bSAndrew Rybchenko   uint32_t bind_bkout;
8617d17c52bSAndrew Rybchenko } tlv_tsan_config_t;
8627d17c52bSAndrew Rybchenko 
8637d17c52bSAndrew Rybchenko /* TSA Controller IP address configuration
8647d17c52bSAndrew Rybchenko  *
8657d17c52bSAndrew Rybchenko  * Sets the TSA Controller IP address statically via configuration tool
8667d17c52bSAndrew Rybchenko  *
8677d17c52bSAndrew Rybchenko  * NOTE: This TAG is temporarily placed in the dynamic config partition and will
8687d17c52bSAndrew Rybchenko  * be moved to a private partition during TSA development. It is not used in any
8697d17c52bSAndrew Rybchenko  * released code yet.
8707d17c52bSAndrew Rybchenko  */
8717d17c52bSAndrew Rybchenko 
8727d17c52bSAndrew Rybchenko #define TLV_TAG_TMP_TSAC_CONFIG         (0x10230000)
8737d17c52bSAndrew Rybchenko 
8747d17c52bSAndrew Rybchenko #define TLV_MAX_TSACS (4)
8757d17c52bSAndrew Rybchenko typedef struct tlv_tsac_config {
8767d17c52bSAndrew Rybchenko   uint32_t tag;
8777d17c52bSAndrew Rybchenko   uint32_t length;
8787d17c52bSAndrew Rybchenko   uint32_t num_tsacs;
8797d17c52bSAndrew Rybchenko   uint32_t ip[TLV_MAX_TSACS];
8807d17c52bSAndrew Rybchenko   uint32_t port[TLV_MAX_TSACS];
8817d17c52bSAndrew Rybchenko } tlv_tsac_config_t;
8827d17c52bSAndrew Rybchenko 
8837d17c52bSAndrew Rybchenko /* Binding ticket
8847d17c52bSAndrew Rybchenko  *
8857d17c52bSAndrew Rybchenko  * Sets the TSA NIC binding ticket used for binding process between the TSA NIC
8867d17c52bSAndrew Rybchenko  * and the TSA Controller
8877d17c52bSAndrew Rybchenko  *
8887d17c52bSAndrew Rybchenko  * NOTE: This TAG is temporarily placed in the dynamic config partition and will
8897d17c52bSAndrew Rybchenko  * be moved to a private partition during TSA development. It is not used in any
8907d17c52bSAndrew Rybchenko  * released code yet.
8917d17c52bSAndrew Rybchenko  */
8927d17c52bSAndrew Rybchenko 
8937d17c52bSAndrew Rybchenko #define TLV_TAG_TMP_BINDING_TICKET      (0x10240000)
8947d17c52bSAndrew Rybchenko 
8957d17c52bSAndrew Rybchenko typedef struct tlv_binding_ticket {
8967d17c52bSAndrew Rybchenko   uint32_t tag;
8977d17c52bSAndrew Rybchenko   uint32_t length;
8987d17c52bSAndrew Rybchenko   uint8_t  bytes[];
8997d17c52bSAndrew Rybchenko } tlv_binding_ticket_t;
9007d17c52bSAndrew Rybchenko 
9017d17c52bSAndrew Rybchenko /* Solarflare private key
9027d17c52bSAndrew Rybchenko  *
9037d17c52bSAndrew Rybchenko  * Sets the Solareflare private key used for signing during the binding process
9047d17c52bSAndrew Rybchenko  *
9057d17c52bSAndrew Rybchenko  * NOTE: This TAG is temporarily placed in the dynamic config partition and will
9067d17c52bSAndrew Rybchenko  * be moved to a private partition during TSA development. It is not used in any
9077d17c52bSAndrew Rybchenko  * released code yet.
9087d17c52bSAndrew Rybchenko  */
9097d17c52bSAndrew Rybchenko 
9107d17c52bSAndrew Rybchenko #define TLV_TAG_TMP_PIK_SF              (0x10250000)
9117d17c52bSAndrew Rybchenko 
9127d17c52bSAndrew Rybchenko typedef struct tlv_pik_sf {
9137d17c52bSAndrew Rybchenko   uint32_t tag;
9147d17c52bSAndrew Rybchenko   uint32_t length;
9157d17c52bSAndrew Rybchenko   uint8_t  bytes[];
9167d17c52bSAndrew Rybchenko } tlv_pik_sf_t;
9177d17c52bSAndrew Rybchenko 
9187d17c52bSAndrew Rybchenko /* CA root certificate
9197d17c52bSAndrew Rybchenko  *
9207d17c52bSAndrew Rybchenko  * Sets the CA root certificate used for TSA Controller verfication during
9217d17c52bSAndrew Rybchenko  * TLS connection setup between the TSA NIC and the TSA Controller
9227d17c52bSAndrew Rybchenko  *
9237d17c52bSAndrew Rybchenko  * NOTE: This TAG is temporarily placed in the dynamic config partition and will
9247d17c52bSAndrew Rybchenko  * be moved to a private partition during TSA development. It is not used in any
9257d17c52bSAndrew Rybchenko  * released code yet.
9267d17c52bSAndrew Rybchenko  */
9277d17c52bSAndrew Rybchenko 
9287d17c52bSAndrew Rybchenko #define TLV_TAG_TMP_CA_ROOT_CERT        (0x10260000)
9297d17c52bSAndrew Rybchenko 
9307d17c52bSAndrew Rybchenko typedef struct tlv_ca_root_cert {
9317d17c52bSAndrew Rybchenko   uint32_t tag;
9327d17c52bSAndrew Rybchenko   uint32_t length;
9337d17c52bSAndrew Rybchenko   uint8_t  bytes[];
9347d17c52bSAndrew Rybchenko } tlv_ca_root_cert_t;
9357d17c52bSAndrew Rybchenko 
9363c838a9fSAndrew Rybchenko #endif /* CI_MGMT_TLV_LAYOUT_H */
937