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 31*aed78107SAndrew Rybchenko /* 32*aed78107SAndrew Rybchenko * This is NOT the original source file. Do NOT edit it. 33*aed78107SAndrew Rybchenko * To update the tlv layout, please edit the copy in 34*aed78107SAndrew Rybchenko * the sfregistry repo and then, in that repo, 35*aed78107SAndrew Rybchenko * "make tlv_headers" or "make export" to 36*aed78107SAndrew Rybchenko * regenerate and export all types of headers. 37*aed78107SAndrew Rybchenko */ 38*aed78107SAndrew Rybchenko 393c838a9fSAndrew Rybchenko /* These structures define the layouts for the TLV items stored in static and 403c838a9fSAndrew Rybchenko * dynamic configuration partitions in NVRAM for EF10 (Huntington etc.). 413c838a9fSAndrew Rybchenko * 423c838a9fSAndrew Rybchenko * They contain the same sort of information that was kept in the 433c838a9fSAndrew Rybchenko * siena_mc_static_config_hdr_t and siena_mc_dynamic_config_hdr_t structures 443c838a9fSAndrew Rybchenko * (defined in <ci/mgmt/mc_flash_layout.h> and <ci/mgmt/mc_dynamic_cfg.h>) for 453c838a9fSAndrew Rybchenko * Siena. 463c838a9fSAndrew Rybchenko * 473c838a9fSAndrew Rybchenko * These are used directly by the MC and should also be usable directly on host 483c838a9fSAndrew Rybchenko * systems which are little-endian and do not do strange things with structure 493c838a9fSAndrew Rybchenko * padding. (Big-endian host systems will require some byte-swapping.) 503c838a9fSAndrew Rybchenko * 513c838a9fSAndrew Rybchenko * ----- 523c838a9fSAndrew Rybchenko * 533c838a9fSAndrew Rybchenko * Please refer to SF-108797-SW for a general overview of the TLV partition 543c838a9fSAndrew Rybchenko * format. 553c838a9fSAndrew Rybchenko * 563c838a9fSAndrew Rybchenko * ----- 573c838a9fSAndrew Rybchenko * 583c838a9fSAndrew Rybchenko * The current tag IDs have a general structure: with the exception of the 593c838a9fSAndrew Rybchenko * special values defined in the document, they are of the form 0xLTTTNNNN, 603c838a9fSAndrew Rybchenko * where: 613c838a9fSAndrew Rybchenko * 623c838a9fSAndrew Rybchenko * - L is a location, indicating where this tag is expected to be found: 632d9312f6SAndrew Rybchenko * 0: static configuration 642d9312f6SAndrew Rybchenko * 1: dynamic configuration 652d9312f6SAndrew Rybchenko * 2: firmware internal use 662d9312f6SAndrew Rybchenko * 3: license partition 676d522ee0SAndrew Rybchenko * 4: tsa configuration 683c838a9fSAndrew Rybchenko * 693c838a9fSAndrew Rybchenko * - TTT is a type, which is just a unique value. The same type value 703c838a9fSAndrew Rybchenko * might appear in both locations, indicating a relationship between 713c838a9fSAndrew Rybchenko * the items (e.g. static and dynamic VPD below). 723c838a9fSAndrew Rybchenko * 733c838a9fSAndrew Rybchenko * - NNNN is an index of some form. Some item types are per-port, some 743c838a9fSAndrew Rybchenko * are per-PF, some are per-partition-type. 753c838a9fSAndrew Rybchenko * 763c838a9fSAndrew Rybchenko * ----- 773c838a9fSAndrew Rybchenko * 783c838a9fSAndrew Rybchenko * As with the previous Siena structures, each structure here is laid out 793c838a9fSAndrew Rybchenko * carefully: values are aligned to their natural boundary, with explicit 803c838a9fSAndrew Rybchenko * padding fields added where necessary. (No, technically this does not 813c838a9fSAndrew Rybchenko * absolutely guarantee portability. But, in practice, compilers are generally 823c838a9fSAndrew Rybchenko * sensible enough not to introduce completely pointless padding, and it works 833c838a9fSAndrew Rybchenko * well enough.) 843c838a9fSAndrew Rybchenko */ 853c838a9fSAndrew Rybchenko 863c838a9fSAndrew Rybchenko #ifndef CI_MGMT_TLV_LAYOUT_H 873c838a9fSAndrew Rybchenko #define CI_MGMT_TLV_LAYOUT_H 883c838a9fSAndrew Rybchenko 893c838a9fSAndrew Rybchenko /* ---------------------------------------------------------------------------- 903c838a9fSAndrew Rybchenko * General structure (defined by SF-108797-SW) 913c838a9fSAndrew Rybchenko * ---------------------------------------------------------------------------- 923c838a9fSAndrew Rybchenko */ 933c838a9fSAndrew Rybchenko 943c838a9fSAndrew Rybchenko /* The "end" tag. 953c838a9fSAndrew Rybchenko * 963c838a9fSAndrew Rybchenko * (Note that this is *not* followed by length or value fields: anything after 973c838a9fSAndrew Rybchenko * the tag itself is irrelevant.) 983c838a9fSAndrew Rybchenko */ 993c838a9fSAndrew Rybchenko 1003c838a9fSAndrew Rybchenko #define TLV_TAG_END (0xEEEEEEEE) 1013c838a9fSAndrew Rybchenko 1023c838a9fSAndrew Rybchenko /* Other special reserved tag values. 1033c838a9fSAndrew Rybchenko */ 1043c838a9fSAndrew Rybchenko 1053c838a9fSAndrew Rybchenko #define TLV_TAG_SKIP (0x00000000) 1063c838a9fSAndrew Rybchenko #define TLV_TAG_INVALID (0xFFFFFFFF) 1073c838a9fSAndrew Rybchenko 1083c838a9fSAndrew Rybchenko /* TLV partition header. 1093c838a9fSAndrew Rybchenko * 1103c838a9fSAndrew Rybchenko * In a TLV partition, this must be the first item in the sequence, at offset 1113c838a9fSAndrew Rybchenko * 0. 1123c838a9fSAndrew Rybchenko */ 1133c838a9fSAndrew Rybchenko 1143c838a9fSAndrew Rybchenko #define TLV_TAG_PARTITION_HEADER (0xEF10DA7A) 1153c838a9fSAndrew Rybchenko 1163c838a9fSAndrew Rybchenko struct tlv_partition_header { 1173c838a9fSAndrew Rybchenko uint32_t tag; 1183c838a9fSAndrew Rybchenko uint32_t length; 1193c838a9fSAndrew Rybchenko uint16_t type_id; 1208b18714dSAndrew Rybchenko /* 0 indicates the default segment (always located at offset 0), while other values 1218b18714dSAndrew Rybchenko * are for RFID-selectable presets that should immediately follow the default segment. 1228b18714dSAndrew Rybchenko * The default segment may also have preset > 0, which means that it is a preset 1238b18714dSAndrew Rybchenko * selected through an RFID command and copied by FW to the location at offset 0. */ 1248b18714dSAndrew Rybchenko uint16_t preset; 1253c838a9fSAndrew Rybchenko uint32_t generation; 1263c838a9fSAndrew Rybchenko uint32_t total_length; 1273c838a9fSAndrew Rybchenko }; 1283c838a9fSAndrew Rybchenko 1293c838a9fSAndrew Rybchenko /* TLV partition trailer. 1303c838a9fSAndrew Rybchenko * 1313c838a9fSAndrew Rybchenko * In a TLV partition, this must be the last item in the sequence, immediately 1323c838a9fSAndrew Rybchenko * preceding the TLV_TAG_END word. 1333c838a9fSAndrew Rybchenko */ 1343c838a9fSAndrew Rybchenko 1353c838a9fSAndrew Rybchenko #define TLV_TAG_PARTITION_TRAILER (0xEF101A57) 1363c838a9fSAndrew Rybchenko 1373c838a9fSAndrew Rybchenko struct tlv_partition_trailer { 1383c838a9fSAndrew Rybchenko uint32_t tag; 1393c838a9fSAndrew Rybchenko uint32_t length; 1403c838a9fSAndrew Rybchenko uint32_t generation; 1413c838a9fSAndrew Rybchenko uint32_t checksum; 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 * Configuration items 1623c838a9fSAndrew Rybchenko * ---------------------------------------------------------------------------- 1633c838a9fSAndrew Rybchenko */ 1643c838a9fSAndrew Rybchenko 1653c838a9fSAndrew Rybchenko /* NIC global capabilities. 1663c838a9fSAndrew Rybchenko */ 1673c838a9fSAndrew Rybchenko 1683c838a9fSAndrew Rybchenko #define TLV_TAG_GLOBAL_CAPABILITIES (0x00010000) 1693c838a9fSAndrew Rybchenko 1703c838a9fSAndrew Rybchenko struct tlv_global_capabilities { 1713c838a9fSAndrew Rybchenko uint32_t tag; 1723c838a9fSAndrew Rybchenko uint32_t length; 1733c838a9fSAndrew Rybchenko uint32_t flags; 1743c838a9fSAndrew Rybchenko }; 1753c838a9fSAndrew Rybchenko 1763c838a9fSAndrew Rybchenko /* Siena-style per-port MAC address allocation. 1773c838a9fSAndrew Rybchenko * 1783c838a9fSAndrew Rybchenko * There are <count> addresses, starting at <base_address> and incrementing 1793c838a9fSAndrew Rybchenko * by adding <stride> to the low-order byte(s). 1803c838a9fSAndrew Rybchenko * 1813c838a9fSAndrew Rybchenko * (See also TLV_TAG_GLOBAL_MAC for an alternative, specifying a global pool 1823c838a9fSAndrew Rybchenko * of contiguous MAC addresses for the firmware to allocate as it sees fit.) 1833c838a9fSAndrew Rybchenko */ 1843c838a9fSAndrew Rybchenko 1853c838a9fSAndrew Rybchenko #define TLV_TAG_PORT_MAC(port) (0x00020000 + (port)) 1863c838a9fSAndrew Rybchenko 1873c838a9fSAndrew Rybchenko struct tlv_port_mac { 1883c838a9fSAndrew Rybchenko uint32_t tag; 1893c838a9fSAndrew Rybchenko uint32_t length; 1903c838a9fSAndrew Rybchenko uint8_t base_address[6]; 1913c838a9fSAndrew Rybchenko uint16_t reserved; 1923c838a9fSAndrew Rybchenko uint16_t count; 1933c838a9fSAndrew Rybchenko uint16_t stride; 1943c838a9fSAndrew Rybchenko }; 1953c838a9fSAndrew Rybchenko 1963c838a9fSAndrew Rybchenko /* Static VPD. 1973c838a9fSAndrew Rybchenko * 1983c838a9fSAndrew Rybchenko * This is the portion of VPD which is set at manufacturing time and not 1994d982a25SAndrew Rybchenko * expected to change. It is formatted as a standard PCI VPD block. There are 2004d982a25SAndrew Rybchenko * global and per-pf TLVs for this, the global TLV is new for Medford and is 2014d982a25SAndrew Rybchenko * used in preference to the per-pf TLV. 2023c838a9fSAndrew Rybchenko */ 2033c838a9fSAndrew Rybchenko 2043c838a9fSAndrew Rybchenko #define TLV_TAG_PF_STATIC_VPD(pf) (0x00030000 + (pf)) 2053c838a9fSAndrew Rybchenko 2063c838a9fSAndrew Rybchenko struct tlv_pf_static_vpd { 2073c838a9fSAndrew Rybchenko uint32_t tag; 2083c838a9fSAndrew Rybchenko uint32_t length; 2093c838a9fSAndrew Rybchenko uint8_t bytes[]; 2103c838a9fSAndrew Rybchenko }; 2113c838a9fSAndrew Rybchenko 2124d982a25SAndrew Rybchenko #define TLV_TAG_GLOBAL_STATIC_VPD (0x001f0000) 2134d982a25SAndrew Rybchenko 2144d982a25SAndrew Rybchenko struct tlv_global_static_vpd { 2154d982a25SAndrew Rybchenko uint32_t tag; 2164d982a25SAndrew Rybchenko uint32_t length; 2174d982a25SAndrew Rybchenko uint8_t bytes[]; 2184d982a25SAndrew Rybchenko }; 2194d982a25SAndrew Rybchenko 2203c838a9fSAndrew Rybchenko /* Dynamic VPD. 2213c838a9fSAndrew Rybchenko * 2223c838a9fSAndrew Rybchenko * This is the portion of VPD which may be changed (e.g. by firmware updates). 2234d982a25SAndrew Rybchenko * It is formatted as a standard PCI VPD block. There are global and per-pf TLVs 2244d982a25SAndrew Rybchenko * for this, the global TLV is new for Medford and is used in preference to the 2254d982a25SAndrew Rybchenko * per-pf TLV. 2263c838a9fSAndrew Rybchenko */ 2273c838a9fSAndrew Rybchenko 2283c838a9fSAndrew Rybchenko #define TLV_TAG_PF_DYNAMIC_VPD(pf) (0x10030000 + (pf)) 2293c838a9fSAndrew Rybchenko 2303c838a9fSAndrew Rybchenko struct tlv_pf_dynamic_vpd { 2313c838a9fSAndrew Rybchenko uint32_t tag; 2323c838a9fSAndrew Rybchenko uint32_t length; 2333c838a9fSAndrew Rybchenko uint8_t bytes[]; 2343c838a9fSAndrew Rybchenko }; 2353c838a9fSAndrew Rybchenko 2364d982a25SAndrew Rybchenko #define TLV_TAG_GLOBAL_DYNAMIC_VPD (0x10200000) 2374d982a25SAndrew Rybchenko 2384d982a25SAndrew Rybchenko struct tlv_global_dynamic_vpd { 2394d982a25SAndrew Rybchenko uint32_t tag; 2404d982a25SAndrew Rybchenko uint32_t length; 2414d982a25SAndrew Rybchenko uint8_t bytes[]; 2424d982a25SAndrew Rybchenko }; 2434d982a25SAndrew Rybchenko 2443c838a9fSAndrew Rybchenko /* "DBI" PCI config space changes. 2453c838a9fSAndrew Rybchenko * 2463c838a9fSAndrew Rybchenko * This is a set of edits made to the default PCI config space values before 2474d982a25SAndrew Rybchenko * the device is allowed to enumerate. There are global and per-pf TLVs for 2484d982a25SAndrew Rybchenko * this, the global TLV is new for Medford and is used in preference to the 2494d982a25SAndrew Rybchenko * per-pf TLV. 2503c838a9fSAndrew Rybchenko */ 2513c838a9fSAndrew Rybchenko 2523c838a9fSAndrew Rybchenko #define TLV_TAG_PF_DBI(pf) (0x00040000 + (pf)) 2533c838a9fSAndrew Rybchenko 2543c838a9fSAndrew Rybchenko struct tlv_pf_dbi { 2553c838a9fSAndrew Rybchenko uint32_t tag; 2563c838a9fSAndrew Rybchenko uint32_t length; 2573c838a9fSAndrew Rybchenko struct { 2583c838a9fSAndrew Rybchenko uint16_t addr; 2593c838a9fSAndrew Rybchenko uint16_t byte_enables; 2603c838a9fSAndrew Rybchenko uint32_t value; 2613c838a9fSAndrew Rybchenko } items[]; 2623c838a9fSAndrew Rybchenko }; 2633c838a9fSAndrew Rybchenko 2644d982a25SAndrew Rybchenko #define TLV_TAG_GLOBAL_DBI (0x00210000) 2654d982a25SAndrew Rybchenko 2664d982a25SAndrew Rybchenko struct tlv_global_dbi { 2674d982a25SAndrew Rybchenko uint32_t tag; 2684d982a25SAndrew Rybchenko uint32_t length; 2694d982a25SAndrew Rybchenko struct { 2704d982a25SAndrew Rybchenko uint16_t addr; 2714d982a25SAndrew Rybchenko uint16_t byte_enables; 2724d982a25SAndrew Rybchenko uint32_t value; 2734d982a25SAndrew Rybchenko } items[]; 2744d982a25SAndrew Rybchenko }; 2754d982a25SAndrew Rybchenko 2763c838a9fSAndrew Rybchenko /* Partition subtype codes. 2773c838a9fSAndrew Rybchenko * 2783c838a9fSAndrew Rybchenko * A subtype may optionally be stored for each type of partition present in 2793c838a9fSAndrew Rybchenko * the NVRAM. For example, this may be used to allow a generic firmware update 2803c838a9fSAndrew Rybchenko * utility to select a specific variant of firmware for a specific variant of 2813c838a9fSAndrew Rybchenko * board. 2823c838a9fSAndrew Rybchenko * 2833c838a9fSAndrew Rybchenko * The description[] field is an optional string which is returned in the 2843c838a9fSAndrew Rybchenko * MC_CMD_NVRAM_METADATA response if present. 2853c838a9fSAndrew Rybchenko */ 2863c838a9fSAndrew Rybchenko 2873c838a9fSAndrew Rybchenko #define TLV_TAG_PARTITION_SUBTYPE(type) (0x00050000 + (type)) 2883c838a9fSAndrew Rybchenko 2893c838a9fSAndrew Rybchenko struct tlv_partition_subtype { 2903c838a9fSAndrew Rybchenko uint32_t tag; 2913c838a9fSAndrew Rybchenko uint32_t length; 2923c838a9fSAndrew Rybchenko uint32_t subtype; 2933c838a9fSAndrew Rybchenko uint8_t description[]; 2943c838a9fSAndrew Rybchenko }; 2953c838a9fSAndrew Rybchenko 2963c838a9fSAndrew Rybchenko /* Partition version codes. 2973c838a9fSAndrew Rybchenko * 2983c838a9fSAndrew Rybchenko * A version may optionally be stored for each type of partition present in 2993c838a9fSAndrew Rybchenko * the NVRAM. This provides a standard way of tracking the currently stored 3003c838a9fSAndrew Rybchenko * version of each of the various component images. 3013c838a9fSAndrew Rybchenko */ 3023c838a9fSAndrew Rybchenko 3033c838a9fSAndrew Rybchenko #define TLV_TAG_PARTITION_VERSION(type) (0x10060000 + (type)) 3043c838a9fSAndrew Rybchenko 3053c838a9fSAndrew Rybchenko struct tlv_partition_version { 3063c838a9fSAndrew Rybchenko uint32_t tag; 3073c838a9fSAndrew Rybchenko uint32_t length; 3083c838a9fSAndrew Rybchenko uint16_t version_w; 3093c838a9fSAndrew Rybchenko uint16_t version_x; 3103c838a9fSAndrew Rybchenko uint16_t version_y; 3113c838a9fSAndrew Rybchenko uint16_t version_z; 3123c838a9fSAndrew Rybchenko }; 3133c838a9fSAndrew Rybchenko 3143c838a9fSAndrew Rybchenko /* Global PCIe configuration */ 3153c838a9fSAndrew Rybchenko 3163c838a9fSAndrew Rybchenko #define TLV_TAG_GLOBAL_PCIE_CONFIG (0x10070000) 3173c838a9fSAndrew Rybchenko 3183c838a9fSAndrew Rybchenko struct tlv_pcie_config { 3193c838a9fSAndrew Rybchenko uint32_t tag; 3203c838a9fSAndrew Rybchenko uint32_t length; 3213c838a9fSAndrew Rybchenko int16_t max_pf_number; /**< Largest PF RID (lower PFs may be hidden) */ 3223c838a9fSAndrew Rybchenko uint16_t pf_aper; /**< BIU aperture for PF BAR2 */ 3233c838a9fSAndrew Rybchenko uint16_t vf_aper; /**< BIU aperture for VF BAR0 */ 3243c838a9fSAndrew Rybchenko uint16_t int_aper; /**< BIU aperture for PF BAR4 and VF BAR2 */ 3253c838a9fSAndrew Rybchenko #define TLV_MAX_PF_DEFAULT (-1) /* Use FW default for largest PF RID */ 3263c838a9fSAndrew Rybchenko #define TLV_APER_DEFAULT (0xFFFF) /* Use FW default for a given aperture */ 3273c838a9fSAndrew Rybchenko }; 3283c838a9fSAndrew Rybchenko 3293c838a9fSAndrew Rybchenko /* Per-PF configuration. Note that not all these fields are necessarily useful 3303c838a9fSAndrew Rybchenko * as the apertures are constrained by the BIU settings (the one case we do 3313c838a9fSAndrew Rybchenko * use is to make BAR2 bigger than the BIU thinks to reserve space), but we can 3323c838a9fSAndrew Rybchenko * tidy things up later */ 3333c838a9fSAndrew Rybchenko 3343c838a9fSAndrew Rybchenko #define TLV_TAG_PF_PCIE_CONFIG(pf) (0x10080000 + (pf)) 3353c838a9fSAndrew Rybchenko 3363c838a9fSAndrew Rybchenko struct tlv_per_pf_pcie_config { 3373c838a9fSAndrew Rybchenko uint32_t tag; 3383c838a9fSAndrew Rybchenko uint32_t length; 3393c838a9fSAndrew Rybchenko uint8_t vfs_total; 3403c838a9fSAndrew Rybchenko uint8_t port_allocation; 3413c838a9fSAndrew Rybchenko uint16_t vectors_per_pf; 3423c838a9fSAndrew Rybchenko uint16_t vectors_per_vf; 3433c838a9fSAndrew Rybchenko uint8_t pf_bar0_aperture; 3443c838a9fSAndrew Rybchenko uint8_t pf_bar2_aperture; 3453c838a9fSAndrew Rybchenko uint8_t vf_bar0_aperture; 3463c838a9fSAndrew Rybchenko uint8_t vf_base; 3473c838a9fSAndrew Rybchenko uint16_t supp_pagesz; 3483c838a9fSAndrew Rybchenko uint16_t msix_vec_base; 3493c838a9fSAndrew Rybchenko }; 3503c838a9fSAndrew Rybchenko 3513c838a9fSAndrew Rybchenko /* Development ONLY. This is a single TLV tag for all the gubbins 3523c838a9fSAndrew Rybchenko * that can be set through the MC command-line other than the PCIe 3533c838a9fSAndrew Rybchenko * settings. This is a temporary measure. */ 3544d982a25SAndrew Rybchenko #define TLV_TAG_TMP_GUBBINS (0x10090000) /* legacy symbol - do not use */ 3554d982a25SAndrew Rybchenko #define TLV_TAG_TMP_GUBBINS_HUNT TLV_TAG_TMP_GUBBINS 3563c838a9fSAndrew Rybchenko 3573c838a9fSAndrew Rybchenko struct tlv_tmp_gubbins { 3583c838a9fSAndrew Rybchenko uint32_t tag; 3593c838a9fSAndrew Rybchenko uint32_t length; 3603c838a9fSAndrew Rybchenko /* Consumed by dpcpu.c */ 3613c838a9fSAndrew Rybchenko uint64_t tx0_tags; /* Bitmap */ 3623c838a9fSAndrew Rybchenko uint64_t tx1_tags; /* Bitmap */ 3633c838a9fSAndrew Rybchenko uint64_t dl_tags; /* Bitmap */ 3643c838a9fSAndrew Rybchenko uint32_t flags; 365501fe79dSAndrew Rybchenko #define TLV_DPCPU_TX_STRIPE (1) /* No longer used, has no effect */ 3663c838a9fSAndrew Rybchenko #define TLV_DPCPU_BIU_TAGS (2) /* Use BIU tag manager */ 3673c838a9fSAndrew Rybchenko #define TLV_DPCPU_TX0_TAGS (4) /* tx0_tags is valid */ 3683c838a9fSAndrew Rybchenko #define TLV_DPCPU_TX1_TAGS (8) /* tx1_tags is valid */ 3693c838a9fSAndrew Rybchenko #define TLV_DPCPU_DL_TAGS (16) /* dl_tags is valid */ 3703c838a9fSAndrew Rybchenko /* Consumed by features.c */ 3713c838a9fSAndrew Rybchenko uint32_t dut_features; /* All 1s -> leave alone */ 3723c838a9fSAndrew Rybchenko int8_t with_rmon; /* 0 -> off, 1 -> on, -1 -> leave alone */ 3733c838a9fSAndrew Rybchenko /* Consumed by clocks_hunt.c */ 3743c838a9fSAndrew Rybchenko int8_t clk_mode; /* 0 -> off, 1 -> on, -1 -> leave alone */ 3755a59cbc9SAndrew Rybchenko /* No longer used, superseded by TLV_TAG_DESCRIPTOR_CACHE_CONFIG. */ 3763c838a9fSAndrew Rybchenko int8_t rx_dc_size; /* -1 -> leave alone */ 3773c838a9fSAndrew Rybchenko int8_t tx_dc_size; 3783c838a9fSAndrew Rybchenko int16_t num_q_allocs; 3793c838a9fSAndrew Rybchenko }; 3803c838a9fSAndrew Rybchenko 3813c838a9fSAndrew Rybchenko /* Global port configuration 3823c838a9fSAndrew Rybchenko * 3833c838a9fSAndrew Rybchenko * This is now deprecated in favour of a platform-provided default 3843c838a9fSAndrew Rybchenko * and dynamic config override via tlv_global_port_options. 3853c838a9fSAndrew Rybchenko */ 3863c838a9fSAndrew Rybchenko #define TLV_TAG_GLOBAL_PORT_CONFIG (0x000a0000) 3873c838a9fSAndrew Rybchenko 3883c838a9fSAndrew Rybchenko struct tlv_global_port_config { 3893c838a9fSAndrew Rybchenko uint32_t tag; 3903c838a9fSAndrew Rybchenko uint32_t length; 3913c838a9fSAndrew Rybchenko uint32_t ports_per_core; 3923c838a9fSAndrew Rybchenko uint32_t max_port_speed; 3933c838a9fSAndrew Rybchenko }; 3943c838a9fSAndrew Rybchenko 3953c838a9fSAndrew Rybchenko /* Firmware options. 3963c838a9fSAndrew Rybchenko * 3973c838a9fSAndrew Rybchenko * This is intended for user-configurable selection of optional firmware 3983c838a9fSAndrew Rybchenko * features and variants. 3993c838a9fSAndrew Rybchenko * 4003c838a9fSAndrew Rybchenko * Initially, this consists only of the satellite CPU firmware variant 4013c838a9fSAndrew Rybchenko * selection, but this tag could be extended in the future (using the 4023c838a9fSAndrew Rybchenko * tag length to determine whether additional fields are present). 4033c838a9fSAndrew Rybchenko */ 4043c838a9fSAndrew Rybchenko 4053c838a9fSAndrew Rybchenko #define TLV_TAG_FIRMWARE_OPTIONS (0x100b0000) 4063c838a9fSAndrew Rybchenko 4073c838a9fSAndrew Rybchenko struct tlv_firmware_options { 4083c838a9fSAndrew Rybchenko uint32_t tag; 4093c838a9fSAndrew Rybchenko uint32_t length; 4103c838a9fSAndrew Rybchenko uint32_t firmware_variant; 4113c838a9fSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_DRIVER_SELECTED (0xffffffff) 4123c838a9fSAndrew Rybchenko 4133c838a9fSAndrew Rybchenko /* These are the values for overriding the driver's choice; the definitions 4143c838a9fSAndrew Rybchenko * are taken from MCDI so that they don't get out of step. Include 4153c838a9fSAndrew Rybchenko * <ci/mgmt/mc_driver_pcol.h> or the equivalent from your driver's tree if 4163c838a9fSAndrew Rybchenko * you need to use these constants. 4173c838a9fSAndrew Rybchenko */ 4183c838a9fSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_FULL_FEATURED MC_CMD_FW_FULL_FEATURED 4193c838a9fSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_LOW_LATENCY MC_CMD_FW_LOW_LATENCY 4203c838a9fSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_PACKED_STREAM MC_CMD_FW_PACKED_STREAM 4213c838a9fSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_HIGH_TX_RATE MC_CMD_FW_HIGH_TX_RATE 4223c838a9fSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_PACKED_STREAM_HASH_MODE_1 \ 4233c838a9fSAndrew Rybchenko MC_CMD_FW_PACKED_STREAM_HASH_MODE_1 4244af6e4dfSAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_RULES_ENGINE MC_CMD_FW_RULES_ENGINE 42580c4ed96SAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_DPDK MC_CMD_FW_DPDK 426*aed78107SAndrew Rybchenko #define TLV_FIRMWARE_VARIANT_L3XUDP MC_CMD_FW_L3XUDP 4273c838a9fSAndrew Rybchenko }; 4283c838a9fSAndrew Rybchenko 4293c838a9fSAndrew Rybchenko /* Voltage settings 4303c838a9fSAndrew Rybchenko * 4313c838a9fSAndrew Rybchenko * Intended for boards with A0 silicon where the core voltage may 4323c838a9fSAndrew Rybchenko * need tweaking. Most likely set once when the pass voltage is 4333c838a9fSAndrew Rybchenko * determined. */ 4343c838a9fSAndrew Rybchenko 4353c838a9fSAndrew Rybchenko #define TLV_TAG_0V9_SETTINGS (0x000c0000) 4363c838a9fSAndrew Rybchenko 4373c838a9fSAndrew Rybchenko struct tlv_0v9_settings { 4383c838a9fSAndrew Rybchenko uint32_t tag; 4393c838a9fSAndrew Rybchenko uint32_t length; 4403c838a9fSAndrew Rybchenko uint16_t flags; /* Boards with high 0v9 settings may need active cooling */ 4413c838a9fSAndrew Rybchenko #define TLV_TAG_0V9_REQUIRES_FAN (1) 4423c838a9fSAndrew Rybchenko uint16_t target_voltage; /* In millivolts */ 4433c838a9fSAndrew Rybchenko /* Since the limits are meant to be centred to the target (and must at least 4443c838a9fSAndrew Rybchenko * contain it) they need setting as well. */ 4453c838a9fSAndrew Rybchenko uint16_t warn_low; /* In millivolts */ 4463c838a9fSAndrew Rybchenko uint16_t warn_high; /* In millivolts */ 4473c838a9fSAndrew Rybchenko uint16_t panic_low; /* In millivolts */ 4483c838a9fSAndrew Rybchenko uint16_t panic_high; /* In millivolts */ 4493c838a9fSAndrew Rybchenko }; 4503c838a9fSAndrew Rybchenko 4513c838a9fSAndrew Rybchenko /* Clock configuration */ 4523c838a9fSAndrew Rybchenko 4534d982a25SAndrew Rybchenko #define TLV_TAG_CLOCK_CONFIG (0x000d0000) /* legacy symbol - do not use */ 4544d982a25SAndrew Rybchenko #define TLV_TAG_CLOCK_CONFIG_HUNT TLV_TAG_CLOCK_CONFIG 4553c838a9fSAndrew Rybchenko 4563c838a9fSAndrew Rybchenko struct tlv_clock_config { 4573c838a9fSAndrew Rybchenko uint32_t tag; 4583c838a9fSAndrew Rybchenko uint32_t length; 4593c838a9fSAndrew Rybchenko uint16_t clk_sys; /* MHz */ 4603c838a9fSAndrew Rybchenko uint16_t clk_dpcpu; /* MHz */ 4613c838a9fSAndrew Rybchenko uint16_t clk_icore; /* MHz */ 4623c838a9fSAndrew Rybchenko uint16_t clk_pcs; /* MHz */ 4633c838a9fSAndrew Rybchenko }; 4643c838a9fSAndrew Rybchenko 4653c838a9fSAndrew Rybchenko #define TLV_TAG_CLOCK_CONFIG_MEDFORD (0x00100000) 4663c838a9fSAndrew Rybchenko 4673c838a9fSAndrew Rybchenko struct tlv_clock_config_medford { 4683c838a9fSAndrew Rybchenko uint32_t tag; 4693c838a9fSAndrew Rybchenko uint32_t length; 4703c838a9fSAndrew Rybchenko uint16_t clk_sys; /* MHz */ 4713c838a9fSAndrew Rybchenko uint16_t clk_mc; /* MHz */ 4723c838a9fSAndrew Rybchenko uint16_t clk_rmon; /* MHz */ 4733c838a9fSAndrew Rybchenko uint16_t clk_vswitch; /* MHz */ 4743c838a9fSAndrew Rybchenko uint16_t clk_dpcpu; /* MHz */ 4753c838a9fSAndrew Rybchenko uint16_t clk_pcs; /* MHz */ 4763c838a9fSAndrew Rybchenko }; 4773c838a9fSAndrew Rybchenko 4783c838a9fSAndrew Rybchenko /* EF10-style global pool of MAC addresses. 4793c838a9fSAndrew Rybchenko * 4803c838a9fSAndrew Rybchenko * There are <count> addresses, starting at <base_address>, which are 4813c838a9fSAndrew Rybchenko * contiguous. Firmware is responsible for allocating addresses from this 4823c838a9fSAndrew Rybchenko * pool to ports / PFs as appropriate. 4833c838a9fSAndrew Rybchenko */ 4843c838a9fSAndrew Rybchenko 4853c838a9fSAndrew Rybchenko #define TLV_TAG_GLOBAL_MAC (0x000e0000) 4863c838a9fSAndrew Rybchenko 4873c838a9fSAndrew Rybchenko struct tlv_global_mac { 4883c838a9fSAndrew Rybchenko uint32_t tag; 4893c838a9fSAndrew Rybchenko uint32_t length; 4903c838a9fSAndrew Rybchenko uint8_t base_address[6]; 4913c838a9fSAndrew Rybchenko uint16_t reserved1; 4923c838a9fSAndrew Rybchenko uint16_t count; 4933c838a9fSAndrew Rybchenko uint16_t reserved2; 4943c838a9fSAndrew Rybchenko }; 4953c838a9fSAndrew Rybchenko 4964d982a25SAndrew Rybchenko #define TLV_TAG_ATB_0V9_TARGET (0x000f0000) /* legacy symbol - do not use */ 4974d982a25SAndrew Rybchenko #define TLV_TAG_ATB_0V9_TARGET_HUNT TLV_TAG_ATB_0V9_TARGET 4983c838a9fSAndrew Rybchenko 4993c838a9fSAndrew Rybchenko /* The target value for the 0v9 power rail measured on-chip at the 5003c838a9fSAndrew Rybchenko * analogue test bus */ 5013c838a9fSAndrew Rybchenko struct tlv_0v9_atb_target { 5023c838a9fSAndrew Rybchenko uint32_t tag; 5033c838a9fSAndrew Rybchenko uint32_t length; 5043c838a9fSAndrew Rybchenko uint16_t millivolts; 5053c838a9fSAndrew Rybchenko uint16_t reserved; 5063c838a9fSAndrew Rybchenko }; 5073c838a9fSAndrew Rybchenko 508*aed78107SAndrew Rybchenko /* Factory settings for amplitude calibration of the PCIE TX serdes */ 509*aed78107SAndrew Rybchenko #define TLV_TAG_TX_PCIE_AMP_CONFIG (0x00220000) 510*aed78107SAndrew Rybchenko struct tlv_pcie_tx_amp_config { 511*aed78107SAndrew Rybchenko uint32_t tag; 512*aed78107SAndrew Rybchenko uint32_t length; 513*aed78107SAndrew Rybchenko uint8_t quad_tx_imp2k[4]; 514*aed78107SAndrew Rybchenko uint8_t quad_tx_imp50[4]; 515*aed78107SAndrew Rybchenko uint8_t lane_amp[16]; 516*aed78107SAndrew Rybchenko }; 517*aed78107SAndrew 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 * 5429ed106d0SAndrew Rybchenko * Port mode naming convention is 5439ed106d0SAndrew Rybchenko * 5449ed106d0SAndrew Rybchenko * [nports_on_cage0]x[port_lane_width]_[nports_on_cage1]x[port_lane_width] 5459ed106d0SAndrew Rybchenko * 5469ed106d0SAndrew Rybchenko * Port lane width determines the capabilities (speeds) of the ports, subject 5479ed106d0SAndrew Rybchenko * to architecture capabilities (e.g. 25G support) and switch bandwidth 5489ed106d0SAndrew Rybchenko * constraints: 5499ed106d0SAndrew Rybchenko * - single lane ports can do 25G/10G/1G 5509ed106d0SAndrew Rybchenko * - dual lane ports can do 50G/25G/10G/1G (with fallback to 1 lane) 5519ed106d0SAndrew Rybchenko * - quad lane ports can do 100G/40G/50G/25G/10G/1G (with fallback to 2 or 1 lanes) 5529ed106d0SAndrew Rybchenko 5533c838a9fSAndrew Rybchenko * This tag supercedes tlv_global_port_config. 5543c838a9fSAndrew Rybchenko */ 5553c838a9fSAndrew Rybchenko 5563c838a9fSAndrew Rybchenko #define TLV_TAG_GLOBAL_PORT_MODE (0x10110000) 5573c838a9fSAndrew Rybchenko 5583c838a9fSAndrew Rybchenko struct tlv_global_port_mode { 5593c838a9fSAndrew Rybchenko uint32_t tag; 5603c838a9fSAndrew Rybchenko uint32_t length; 5613c838a9fSAndrew Rybchenko uint32_t port_mode; 5623c838a9fSAndrew Rybchenko #define TLV_PORT_MODE_DEFAULT (0xffffffff) /* Default for given platform */ 56380c4ed96SAndrew Rybchenko 56480c4ed96SAndrew Rybchenko /* Huntington port modes */ 56580c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_10G (0) 56680c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_40G (1) 56780c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_10G_10G (2) 56880c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_40G_40G (3) 56980c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_10G_10G_10G_10G (4) 57080c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_40G_10G_10G (6) 57180c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_10G_10G_40G (7) 57280c4ed96SAndrew Rybchenko 57380c4ed96SAndrew Rybchenko /* Medford (and later) port modes */ 5749ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_1x1_NA (0) /* Single 10G/25G on mdi0 */ 5759ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_1x4_NA (1) /* Single 100G/40G on mdi0 */ 5769ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_NA_1x4 (22) /* Single 100G/40G on mdi1 */ 5779ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_1x2_NA (10) /* Single 50G on mdi0 */ 5789ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_NA_1x2 (11) /* Single 50G on mdi1 */ 5799ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_1x1_1x1 (2) /* Single 10G/25G on mdi0, single 10G/25G on mdi1 */ 5809ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_1x4_1x4 (3) /* Single 40G on mdi0, single 40G on mdi1 */ 58180c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_2x1_2x1 (5) /* Dual 10G/25G on mdi0, dual 10G/25G on mdi1 */ 58280c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_4x1_NA (4) /* Quad 10G/25G on mdi0 */ 5839ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_NA_4x1 (8) /* Quad 10G/25G on mdi1 */ 5849ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_1x4_2x1 (6) /* Single 40G on mdi0, dual 10G/25G on mdi1 */ 5859ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_2x1_1x4 (7) /* Dual 10G/25G on mdi0, single 40G on mdi1 */ 5869ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_1x2_1x2 (12) /* Single 50G on mdi0, single 50G on mdi1 */ 5879ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_2x2_NA (13) /* Dual 50G on mdi0 */ 5889ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_NA_2x2 (14) /* Dual 50G on mdi1 */ 5899ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_1x4_1x2 (15) /* Single 40G on mdi0, single 50G on mdi1 */ 5909ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_1x2_1x4 (16) /* Single 50G on mdi0, single 40G on mdi1 */ 5919ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_1x2_2x1 (17) /* Single 50G on mdi0, dual 10G/25G on mdi1 */ 5929ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_2x1_1x2 (18) /* Dual 10G/25G on mdi0, single 50G on mdi1 */ 59380c4ed96SAndrew Rybchenko 59480c4ed96SAndrew Rybchenko /* Snapper-only Medford2 port modes. 59580c4ed96SAndrew Rybchenko * These modes are eftest only, to allow snapper explicit 59680c4ed96SAndrew Rybchenko * selection between multi-channel and LLPCS. In production, 59780c4ed96SAndrew Rybchenko * this selection is automatic and outside world should not 59880c4ed96SAndrew Rybchenko * care about LLPCS. 59980c4ed96SAndrew Rybchenko */ 6009ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_2x1_2x1_LL (19) /* Dual 10G/25G on mdi0, dual 10G/25G on mdi1, low-latency PCS */ 6019ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_4x1_NA_LL (20) /* Quad 10G/25G on mdi0, low-latency PCS */ 6029ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_NA_4x1_LL (21) /* Quad 10G/25G on mdi1, low-latency PCS */ 6039ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_1x1_NA_LL (23) /* Single 10G/25G on mdi0, low-latency PCS */ 6049ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_1x1_1x1_LL (24) /* Single 10G/25G on mdi0, single 10G/25G on mdi1, low-latency PCS */ 6059ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_BUG63720_DO_NOT_USE (9) /* bug63720: Do not use */ 6069ed106d0SAndrew Rybchenko #define TLV_PORT_MODE_MAX TLV_PORT_MODE_1x1_1x1_LL 6079ed106d0SAndrew Rybchenko 60880c4ed96SAndrew Rybchenko /* Deprecated Medford aliases - DO NOT USE IN NEW CODE */ 60980c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_10G_10G_10G_10G_Q (5) 61080c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_10G_10G_10G_10G_Q1 (4) 61180c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_10G_10G_10G_10G_Q2 (8) 61280c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_10G_10G_10G_10G_Q1_Q2 (9) 61380c4ed96SAndrew Rybchenko 61480c4ed96SAndrew Rybchenko #define TLV_PORT_MODE_MAX TLV_PORT_MODE_1x1_1x1_LL 6153c838a9fSAndrew Rybchenko }; 6163c838a9fSAndrew Rybchenko 6173c838a9fSAndrew Rybchenko /* Type of the v-switch created implicitly by the firmware */ 6183c838a9fSAndrew Rybchenko 6193c838a9fSAndrew Rybchenko #define TLV_TAG_VSWITCH_TYPE(port) (0x10120000 + (port)) 6203c838a9fSAndrew Rybchenko 6213c838a9fSAndrew Rybchenko struct tlv_vswitch_type { 6223c838a9fSAndrew Rybchenko uint32_t tag; 6233c838a9fSAndrew Rybchenko uint32_t length; 6243c838a9fSAndrew Rybchenko uint32_t vswitch_type; 6253c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_DEFAULT (0xffffffff) /* Firmware default; equivalent to no TLV present for a given port */ 6263c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_NONE (0) 6273c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_VLAN (1) 6283c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_VEB (2) 6293c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_VEPA (3) 6303c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_MUX (4) 6313c838a9fSAndrew Rybchenko #define TLV_VSWITCH_TYPE_TEST (5) 6323c838a9fSAndrew Rybchenko }; 6333c838a9fSAndrew Rybchenko 6343c838a9fSAndrew Rybchenko /* A VLAN tag for the v-port created implicitly by the firmware */ 6353c838a9fSAndrew Rybchenko 6363c838a9fSAndrew Rybchenko #define TLV_TAG_VPORT_VLAN_TAG(pf) (0x10130000 + (pf)) 6373c838a9fSAndrew Rybchenko 6383c838a9fSAndrew Rybchenko struct tlv_vport_vlan_tag { 6393c838a9fSAndrew Rybchenko uint32_t tag; 6403c838a9fSAndrew Rybchenko uint32_t length; 6413c838a9fSAndrew Rybchenko uint32_t vlan_tag; 6423c838a9fSAndrew Rybchenko #define TLV_VPORT_NO_VLAN_TAG (0xFFFFFFFF) /* Default in the absence of TLV for a given PF */ 6433c838a9fSAndrew Rybchenko }; 6443c838a9fSAndrew Rybchenko 6453c838a9fSAndrew Rybchenko /* Offset to be applied to the 0v9 setting, wherever it came from */ 6463c838a9fSAndrew Rybchenko 6473c838a9fSAndrew Rybchenko #define TLV_TAG_ATB_0V9_OFFSET (0x10140000) 6483c838a9fSAndrew Rybchenko 6493c838a9fSAndrew Rybchenko struct tlv_0v9_atb_offset { 6503c838a9fSAndrew Rybchenko uint32_t tag; 6513c838a9fSAndrew Rybchenko uint32_t length; 6523c838a9fSAndrew Rybchenko int16_t offset_millivolts; 6533c838a9fSAndrew Rybchenko uint16_t reserved; 6543c838a9fSAndrew Rybchenko }; 6553c838a9fSAndrew Rybchenko 6563c838a9fSAndrew Rybchenko /* A privilege mask given on reset to all non-admin PCIe functions (that is other than first-PF-per-port). 6573c838a9fSAndrew Rybchenko * The meaning of particular bits is defined in mcdi_ef10.yml under MC_CMD_PRIVILEGE_MASK, see also bug 44583. 6583c838a9fSAndrew Rybchenko * TLV_TAG_PRIVILEGE_MASK_ADD specifies bits that should be added (ORed) to firmware default while 6593c838a9fSAndrew Rybchenko * TLV_TAG_PRIVILEGE_MASK_REM specifies bits that should be removed (ANDed) from firmware default: 6603c838a9fSAndrew Rybchenko * Initial_privilege_mask = (firmware_default_mask | privilege_mask_add) & ~privilege_mask_rem */ 6613c838a9fSAndrew Rybchenko 6623c838a9fSAndrew Rybchenko #define TLV_TAG_PRIVILEGE_MASK (0x10150000) /* legacy symbol - do not use */ 6633c838a9fSAndrew Rybchenko 6643c838a9fSAndrew Rybchenko struct tlv_privilege_mask { /* legacy structure - do not use */ 6653c838a9fSAndrew Rybchenko uint32_t tag; 6663c838a9fSAndrew Rybchenko uint32_t length; 6673c838a9fSAndrew Rybchenko uint32_t privilege_mask; 6683c838a9fSAndrew Rybchenko }; 6693c838a9fSAndrew Rybchenko 6703c838a9fSAndrew Rybchenko #define TLV_TAG_PRIVILEGE_MASK_ADD (0x10150000) 6713c838a9fSAndrew Rybchenko 6723c838a9fSAndrew Rybchenko struct tlv_privilege_mask_add { 6733c838a9fSAndrew Rybchenko uint32_t tag; 6743c838a9fSAndrew Rybchenko uint32_t length; 6753c838a9fSAndrew Rybchenko uint32_t privilege_mask_add; 6763c838a9fSAndrew Rybchenko }; 6773c838a9fSAndrew Rybchenko 6783c838a9fSAndrew Rybchenko #define TLV_TAG_PRIVILEGE_MASK_REM (0x10160000) 6793c838a9fSAndrew Rybchenko 6803c838a9fSAndrew Rybchenko struct tlv_privilege_mask_rem { 6813c838a9fSAndrew Rybchenko uint32_t tag; 6823c838a9fSAndrew Rybchenko uint32_t length; 6833c838a9fSAndrew Rybchenko uint32_t privilege_mask_rem; 6843c838a9fSAndrew Rybchenko }; 6853c838a9fSAndrew Rybchenko 6863c838a9fSAndrew Rybchenko /* Additional privileges given to all PFs. 6873c838a9fSAndrew Rybchenko * This tag takes precedence over TLV_TAG_PRIVILEGE_MASK_REM. */ 6883c838a9fSAndrew Rybchenko 6893c838a9fSAndrew Rybchenko #define TLV_TAG_PRIVILEGE_MASK_ADD_ALL_PFS (0x10190000) 6903c838a9fSAndrew Rybchenko 6913c838a9fSAndrew Rybchenko struct tlv_privilege_mask_add_all_pfs { 6923c838a9fSAndrew Rybchenko uint32_t tag; 6933c838a9fSAndrew Rybchenko uint32_t length; 6943c838a9fSAndrew Rybchenko uint32_t privilege_mask_add; 6953c838a9fSAndrew Rybchenko }; 6963c838a9fSAndrew Rybchenko 6973c838a9fSAndrew Rybchenko /* Additional privileges given to a selected PF. 6983c838a9fSAndrew Rybchenko * This tag takes precedence over TLV_TAG_PRIVILEGE_MASK_REM. */ 6993c838a9fSAndrew Rybchenko 7003c838a9fSAndrew Rybchenko #define TLV_TAG_PRIVILEGE_MASK_ADD_SINGLE_PF(pf) (0x101A0000 + (pf)) 7013c838a9fSAndrew Rybchenko 7023c838a9fSAndrew Rybchenko struct tlv_privilege_mask_add_single_pf { 7033c838a9fSAndrew Rybchenko uint32_t tag; 7043c838a9fSAndrew Rybchenko uint32_t length; 7053c838a9fSAndrew Rybchenko uint32_t privilege_mask_add; 7063c838a9fSAndrew Rybchenko }; 7073c838a9fSAndrew Rybchenko 7083c838a9fSAndrew Rybchenko /* Turning on/off the PFIOV mode. 7093c838a9fSAndrew Rybchenko * This tag only takes effect if TLV_TAG_VSWITCH_TYPE is missing or set to DEFAULT. */ 7103c838a9fSAndrew Rybchenko 7113c838a9fSAndrew Rybchenko #define TLV_TAG_PFIOV(port) (0x10170000 + (port)) 7123c838a9fSAndrew Rybchenko 7133c838a9fSAndrew Rybchenko struct tlv_pfiov { 7143c838a9fSAndrew Rybchenko uint32_t tag; 7153c838a9fSAndrew Rybchenko uint32_t length; 7163c838a9fSAndrew Rybchenko uint32_t pfiov; 7173c838a9fSAndrew Rybchenko #define TLV_PFIOV_OFF (0) /* Default */ 7183c838a9fSAndrew Rybchenko #define TLV_PFIOV_ON (1) 7193c838a9fSAndrew Rybchenko }; 7203c838a9fSAndrew Rybchenko 7213c838a9fSAndrew Rybchenko /* Multicast filter chaining mode selection. 7223c838a9fSAndrew Rybchenko * 7233c838a9fSAndrew Rybchenko * When enabled, multicast packets are delivered to all recipients of all 7243c838a9fSAndrew Rybchenko * matching multicast filters, with the exception that IP multicast filters 7253c838a9fSAndrew Rybchenko * will steal traffic from MAC multicast filters on a per-function basis. 7263c838a9fSAndrew Rybchenko * (New behaviour.) 7273c838a9fSAndrew Rybchenko * 7283c838a9fSAndrew Rybchenko * When disabled, multicast packets will always be delivered only to the 7293c838a9fSAndrew Rybchenko * recipients of the highest priority matching multicast filter. 7303c838a9fSAndrew Rybchenko * (Legacy behaviour.) 7313c838a9fSAndrew Rybchenko * 7323c838a9fSAndrew Rybchenko * The DEFAULT mode (which is the same as the tag not being present at all) 7333c838a9fSAndrew Rybchenko * is equivalent to ENABLED in production builds, and DISABLED in eftest 7343c838a9fSAndrew Rybchenko * builds. 7353c838a9fSAndrew Rybchenko * 7363c838a9fSAndrew Rybchenko * This option is intended to provide run-time control over this feature 7373c838a9fSAndrew Rybchenko * while it is being stabilised and may be withdrawn at some point in the 7383c838a9fSAndrew Rybchenko * future; the new behaviour is intended to become the standard behaviour. 7393c838a9fSAndrew Rybchenko */ 7403c838a9fSAndrew Rybchenko 7413c838a9fSAndrew Rybchenko #define TLV_TAG_MCAST_FILTER_CHAINING (0x10180000) 7423c838a9fSAndrew Rybchenko 7433c838a9fSAndrew Rybchenko struct tlv_mcast_filter_chaining { 7443c838a9fSAndrew Rybchenko uint32_t tag; 7453c838a9fSAndrew Rybchenko uint32_t length; 7463c838a9fSAndrew Rybchenko uint32_t mode; 7473c838a9fSAndrew Rybchenko #define TLV_MCAST_FILTER_CHAINING_DEFAULT (0xffffffff) 7483c838a9fSAndrew Rybchenko #define TLV_MCAST_FILTER_CHAINING_DISABLED (0) 7493c838a9fSAndrew Rybchenko #define TLV_MCAST_FILTER_CHAINING_ENABLED (1) 7503c838a9fSAndrew Rybchenko }; 7513c838a9fSAndrew Rybchenko 7523c838a9fSAndrew Rybchenko /* Pacer rate limit per PF */ 7533c838a9fSAndrew Rybchenko #define TLV_TAG_RATE_LIMIT(pf) (0x101b0000 + (pf)) 7543c838a9fSAndrew Rybchenko 7553c838a9fSAndrew Rybchenko struct tlv_rate_limit { 7563c838a9fSAndrew Rybchenko uint32_t tag; 7573c838a9fSAndrew Rybchenko uint32_t length; 7583c838a9fSAndrew Rybchenko uint32_t rate_mbps; 7593c838a9fSAndrew Rybchenko }; 7603c838a9fSAndrew Rybchenko 7613c838a9fSAndrew Rybchenko /* OCSD Enable/Disable 7623c838a9fSAndrew Rybchenko * 7633c838a9fSAndrew Rybchenko * This setting allows OCSD to be disabled. This is a requirement for HP 7643c838a9fSAndrew Rybchenko * servers to support PCI passthrough for virtualization. 7653c838a9fSAndrew Rybchenko * 7663c838a9fSAndrew Rybchenko * The DEFAULT mode (which is the same as the tag not being present) is 7673c838a9fSAndrew Rybchenko * equivalent to ENABLED. 7683c838a9fSAndrew Rybchenko * 7693c838a9fSAndrew Rybchenko * This option is not used by the MCFW, and is entirely handled by the various 7703c838a9fSAndrew Rybchenko * drivers that support OCSD, by reading the setting before they attempt 7713c838a9fSAndrew Rybchenko * to enable OCSD. 7723c838a9fSAndrew Rybchenko * 7733c838a9fSAndrew Rybchenko * bit0: OCSD Disabled/Enabled 7743c838a9fSAndrew Rybchenko */ 7753c838a9fSAndrew Rybchenko 7763c838a9fSAndrew Rybchenko #define TLV_TAG_OCSD (0x101C0000) 7773c838a9fSAndrew Rybchenko 7783c838a9fSAndrew Rybchenko struct tlv_ocsd { 7793c838a9fSAndrew Rybchenko uint32_t tag; 7803c838a9fSAndrew Rybchenko uint32_t length; 7813c838a9fSAndrew Rybchenko uint32_t mode; 7823c838a9fSAndrew Rybchenko #define TLV_OCSD_DISABLED 0 7833c838a9fSAndrew Rybchenko #define TLV_OCSD_ENABLED 1 /* Default */ 7843c838a9fSAndrew Rybchenko }; 7853c838a9fSAndrew Rybchenko 786501fe79dSAndrew Rybchenko /* Descriptor cache config. 787501fe79dSAndrew Rybchenko * 788501fe79dSAndrew Rybchenko * Sets the sizes of the TX and RX descriptor caches as a power of 2. It also 789501fe79dSAndrew Rybchenko * sets the total number of VIs. When the number of VIs is reduced VIs are taken 790501fe79dSAndrew Rybchenko * away from the highest numbered port first, so a vi_count of 1024 means 1024 791501fe79dSAndrew Rybchenko * VIs on the first port and 0 on the second (on a Torino). 792501fe79dSAndrew Rybchenko */ 793501fe79dSAndrew Rybchenko 794501fe79dSAndrew Rybchenko #define TLV_TAG_DESCRIPTOR_CACHE_CONFIG (0x101d0000) 795501fe79dSAndrew Rybchenko 796501fe79dSAndrew Rybchenko struct tlv_descriptor_cache_config { 797501fe79dSAndrew Rybchenko uint32_t tag; 798501fe79dSAndrew Rybchenko uint32_t length; 799501fe79dSAndrew Rybchenko uint8_t rx_desc_cache_size; 800501fe79dSAndrew Rybchenko uint8_t tx_desc_cache_size; 801501fe79dSAndrew Rybchenko uint16_t vi_count; 802501fe79dSAndrew Rybchenko }; 803501fe79dSAndrew Rybchenko #define TLV_DESC_CACHE_DEFAULT (0xff) 804501fe79dSAndrew Rybchenko #define TLV_VI_COUNT_DEFAULT (0xffff) 805501fe79dSAndrew Rybchenko 806501fe79dSAndrew Rybchenko /* RX event merging config (read batching). 807501fe79dSAndrew Rybchenko * 808501fe79dSAndrew Rybchenko * Sets the global maximum number of events for the merging bins, and the 809501fe79dSAndrew Rybchenko * global timeout configuration for the bins. 810501fe79dSAndrew Rybchenko */ 811501fe79dSAndrew Rybchenko 812501fe79dSAndrew Rybchenko #define TLV_TAG_RX_EVENT_MERGING_CONFIG (0x101e0000) 813501fe79dSAndrew Rybchenko 814501fe79dSAndrew Rybchenko struct tlv_rx_event_merging_config { 815501fe79dSAndrew Rybchenko uint32_t tag; 816501fe79dSAndrew Rybchenko uint32_t length; 817501fe79dSAndrew Rybchenko uint32_t max_events; 818501fe79dSAndrew Rybchenko #define TLV_RX_EVENT_MERGING_CONFIG_MAX_EVENTS_MAX ((1 << 4) - 1) 819501fe79dSAndrew Rybchenko uint32_t timeout_ns; 820501fe79dSAndrew Rybchenko }; 82162242903SAndrew Rybchenko #define TLV_RX_EVENT_MERGING_MAX_EVENTS_DEFAULT (0xffffffff) 82262242903SAndrew Rybchenko #define TLV_RX_EVENT_MERGING_TIMEOUT_NS_DEFAULT (0xffffffff) 823501fe79dSAndrew Rybchenko 82488cbf0f7SAndrew Rybchenko #define TLV_TAG_PCIE_LINK_SETTINGS (0x101f0000) 82588cbf0f7SAndrew Rybchenko struct tlv_pcie_link_settings { 82688cbf0f7SAndrew Rybchenko uint32_t tag; 82788cbf0f7SAndrew Rybchenko uint32_t length; 82888cbf0f7SAndrew Rybchenko uint16_t gen; /* Target PCIe generation: 1, 2, 3 */ 82988cbf0f7SAndrew Rybchenko uint16_t width; /* Number of lanes */ 83088cbf0f7SAndrew Rybchenko }; 83188cbf0f7SAndrew Rybchenko 8327d17c52bSAndrew Rybchenko /* TX event merging config. 8337d17c52bSAndrew Rybchenko * 8347d17c52bSAndrew Rybchenko * Sets the global maximum number of events for the merging bins, and the 8357d17c52bSAndrew Rybchenko * global timeout configuration for the bins, and the global timeout for 8367d17c52bSAndrew Rybchenko * empty queues. 8377d17c52bSAndrew Rybchenko */ 8387d17c52bSAndrew Rybchenko #define TLV_TAG_TX_EVENT_MERGING_CONFIG (0x10210000) 8397d17c52bSAndrew Rybchenko struct tlv_tx_event_merging_config { 8407d17c52bSAndrew Rybchenko uint32_t tag; 8417d17c52bSAndrew Rybchenko uint32_t length; 8427d17c52bSAndrew Rybchenko uint32_t max_events; 8437d17c52bSAndrew Rybchenko #define TLV_TX_EVENT_MERGING_CONFIG_MAX_EVENTS_MAX ((1 << 4) - 1) 8447d17c52bSAndrew Rybchenko uint32_t timeout_ns; 8457d17c52bSAndrew Rybchenko uint32_t qempty_timeout_ns; /* Medford only */ 8467d17c52bSAndrew Rybchenko }; 84762242903SAndrew Rybchenko #define TLV_TX_EVENT_MERGING_MAX_EVENTS_DEFAULT (0xffffffff) 84862242903SAndrew Rybchenko #define TLV_TX_EVENT_MERGING_TIMEOUT_NS_DEFAULT (0xffffffff) 84962242903SAndrew Rybchenko #define TLV_TX_EVENT_MERGING_QEMPTY_TIMEOUT_NS_DEFAULT (0xffffffff) 8507d17c52bSAndrew Rybchenko 8512d9312f6SAndrew Rybchenko #define TLV_TAG_LICENSE (0x30800000) 85288cbf0f7SAndrew Rybchenko 85388cbf0f7SAndrew Rybchenko typedef struct tlv_license { 85488cbf0f7SAndrew Rybchenko uint32_t tag; 85588cbf0f7SAndrew Rybchenko uint32_t length; 85688cbf0f7SAndrew Rybchenko uint8_t data[]; 85788cbf0f7SAndrew Rybchenko } tlv_license_t; 85888cbf0f7SAndrew Rybchenko 8596d522ee0SAndrew Rybchenko /* TSA NIC IP address configuration (DEPRECATED) 8607d17c52bSAndrew Rybchenko * 8617d17c52bSAndrew Rybchenko * Sets the TSA NIC IP address statically via configuration tool or dynamically 8627d17c52bSAndrew Rybchenko * via DHCP via snooping based on the mode selection (0=Static, 1=DHCP, 2=Snoop) 8637d17c52bSAndrew Rybchenko * 8647d17c52bSAndrew Rybchenko * NOTE: This TAG is temporarily placed in the dynamic config partition and will 8657d17c52bSAndrew Rybchenko * be moved to a private partition during TSA development. It is not used in any 8667d17c52bSAndrew Rybchenko * released code yet. 8677d17c52bSAndrew Rybchenko */ 8687d17c52bSAndrew Rybchenko 8696d522ee0SAndrew Rybchenko #define TLV_TAG_TMP_TSAN_CONFIG (0x10220000) /* DEPRECATED */ 8707d17c52bSAndrew Rybchenko 8717d17c52bSAndrew Rybchenko #define TLV_TSAN_IP_MODE_STATIC (0) 8727d17c52bSAndrew Rybchenko #define TLV_TSAN_IP_MODE_DHCP (1) 8737d17c52bSAndrew Rybchenko #define TLV_TSAN_IP_MODE_SNOOP (2) 8747d17c52bSAndrew Rybchenko typedef struct tlv_tsan_config { 8757d17c52bSAndrew Rybchenko uint32_t tag; 8767d17c52bSAndrew Rybchenko uint32_t length; 8777d17c52bSAndrew Rybchenko uint32_t mode; 8787d17c52bSAndrew Rybchenko uint32_t ip; 8797d17c52bSAndrew Rybchenko uint32_t netmask; 8807d17c52bSAndrew Rybchenko uint32_t gateway; 8817d17c52bSAndrew Rybchenko uint32_t port; 8824af6e4dfSAndrew Rybchenko uint32_t bind_retry; /* DEPRECATED */ 8834af6e4dfSAndrew Rybchenko uint32_t bind_bkout; /* DEPRECATED */ 8847d17c52bSAndrew Rybchenko } tlv_tsan_config_t; 8857d17c52bSAndrew Rybchenko 8866d522ee0SAndrew Rybchenko /* TSA Controller IP address configuration (DEPRECATED) 8877d17c52bSAndrew Rybchenko * 8887d17c52bSAndrew Rybchenko * Sets the TSA Controller IP address statically via configuration tool 8897d17c52bSAndrew Rybchenko * 8907d17c52bSAndrew Rybchenko * NOTE: This TAG is temporarily placed in the dynamic config partition and will 8917d17c52bSAndrew Rybchenko * be moved to a private partition during TSA development. It is not used in any 8927d17c52bSAndrew Rybchenko * released code yet. 8937d17c52bSAndrew Rybchenko */ 8947d17c52bSAndrew Rybchenko 8956d522ee0SAndrew Rybchenko #define TLV_TAG_TMP_TSAC_CONFIG (0x10230000) /* DEPRECATED */ 8967d17c52bSAndrew Rybchenko 8977d17c52bSAndrew Rybchenko #define TLV_MAX_TSACS (4) 8987d17c52bSAndrew Rybchenko typedef struct tlv_tsac_config { 8997d17c52bSAndrew Rybchenko uint32_t tag; 9007d17c52bSAndrew Rybchenko uint32_t length; 9017d17c52bSAndrew Rybchenko uint32_t num_tsacs; 9027d17c52bSAndrew Rybchenko uint32_t ip[TLV_MAX_TSACS]; 9037d17c52bSAndrew Rybchenko uint32_t port[TLV_MAX_TSACS]; 9047d17c52bSAndrew Rybchenko } tlv_tsac_config_t; 9057d17c52bSAndrew Rybchenko 9066d522ee0SAndrew Rybchenko /* Binding ticket (DEPRECATED) 9077d17c52bSAndrew Rybchenko * 9087d17c52bSAndrew Rybchenko * Sets the TSA NIC binding ticket used for binding process between the TSA NIC 9097d17c52bSAndrew Rybchenko * and the TSA Controller 9107d17c52bSAndrew Rybchenko * 9117d17c52bSAndrew Rybchenko * NOTE: This TAG is temporarily placed in the dynamic config partition and will 9127d17c52bSAndrew Rybchenko * be moved to a private partition during TSA development. It is not used in any 9137d17c52bSAndrew Rybchenko * released code yet. 9147d17c52bSAndrew Rybchenko */ 9157d17c52bSAndrew Rybchenko 9166d522ee0SAndrew Rybchenko #define TLV_TAG_TMP_BINDING_TICKET (0x10240000) /* DEPRECATED */ 9177d17c52bSAndrew Rybchenko 9187d17c52bSAndrew Rybchenko typedef struct tlv_binding_ticket { 9197d17c52bSAndrew Rybchenko uint32_t tag; 9207d17c52bSAndrew Rybchenko uint32_t length; 9217d17c52bSAndrew Rybchenko uint8_t bytes[]; 9227d17c52bSAndrew Rybchenko } tlv_binding_ticket_t; 9237d17c52bSAndrew Rybchenko 9244af6e4dfSAndrew Rybchenko /* Solarflare private key (DEPRECATED) 9257d17c52bSAndrew Rybchenko * 9267d17c52bSAndrew Rybchenko * Sets the Solareflare private key used for signing during the binding process 9277d17c52bSAndrew Rybchenko * 9287d17c52bSAndrew Rybchenko * NOTE: This TAG is temporarily placed in the dynamic config partition and will 9297d17c52bSAndrew Rybchenko * be moved to a private partition during TSA development. It is not used in any 9307d17c52bSAndrew Rybchenko * released code yet. 9317d17c52bSAndrew Rybchenko */ 9327d17c52bSAndrew Rybchenko 9334af6e4dfSAndrew Rybchenko #define TLV_TAG_TMP_PIK_SF (0x10250000) /* DEPRECATED */ 9347d17c52bSAndrew Rybchenko 9357d17c52bSAndrew Rybchenko typedef struct tlv_pik_sf { 9367d17c52bSAndrew Rybchenko uint32_t tag; 9377d17c52bSAndrew Rybchenko uint32_t length; 9387d17c52bSAndrew Rybchenko uint8_t bytes[]; 9397d17c52bSAndrew Rybchenko } tlv_pik_sf_t; 9407d17c52bSAndrew Rybchenko 9416d522ee0SAndrew Rybchenko /* CA root certificate (DEPRECATED) 9427d17c52bSAndrew Rybchenko * 9437d17c52bSAndrew Rybchenko * Sets the CA root certificate used for TSA Controller verfication during 9447d17c52bSAndrew Rybchenko * TLS connection setup between the TSA NIC and the TSA Controller 9457d17c52bSAndrew Rybchenko * 9467d17c52bSAndrew Rybchenko * NOTE: This TAG is temporarily placed in the dynamic config partition and will 9477d17c52bSAndrew Rybchenko * be moved to a private partition during TSA development. It is not used in any 9487d17c52bSAndrew Rybchenko * released code yet. 9497d17c52bSAndrew Rybchenko */ 9507d17c52bSAndrew Rybchenko 9516d522ee0SAndrew Rybchenko #define TLV_TAG_TMP_CA_ROOT_CERT (0x10260000) /* DEPRECATED */ 9527d17c52bSAndrew Rybchenko 9537d17c52bSAndrew Rybchenko typedef struct tlv_ca_root_cert { 9547d17c52bSAndrew Rybchenko uint32_t tag; 9557d17c52bSAndrew Rybchenko uint32_t length; 9567d17c52bSAndrew Rybchenko uint8_t bytes[]; 9577d17c52bSAndrew Rybchenko } tlv_ca_root_cert_t; 9587d17c52bSAndrew Rybchenko 9594af6e4dfSAndrew Rybchenko /* Tx vFIFO Low latency configuration 9604af6e4dfSAndrew Rybchenko * 9614af6e4dfSAndrew Rybchenko * To keep the desired booting behaviour for the switch, it just requires to 9624af6e4dfSAndrew Rybchenko * know if the low latency mode is enabled. 9634af6e4dfSAndrew Rybchenko */ 9644af6e4dfSAndrew Rybchenko 9654af6e4dfSAndrew Rybchenko #define TLV_TAG_TX_VFIFO_ULL_MODE (0x10270000) 9664af6e4dfSAndrew Rybchenko struct tlv_tx_vfifo_ull_mode { 9674af6e4dfSAndrew Rybchenko uint32_t tag; 9684af6e4dfSAndrew Rybchenko uint32_t length; 9694af6e4dfSAndrew Rybchenko uint8_t mode; 9704af6e4dfSAndrew Rybchenko #define TLV_TX_VFIFO_ULL_MODE_DEFAULT 0 9714af6e4dfSAndrew Rybchenko }; 9724af6e4dfSAndrew Rybchenko 973*aed78107SAndrew Rybchenko /* BIU mode 974*aed78107SAndrew Rybchenko * 975*aed78107SAndrew Rybchenko * Medford2 tag for selecting VI window decode (see values below) 976*aed78107SAndrew Rybchenko */ 977*aed78107SAndrew Rybchenko #define TLV_TAG_BIU_VI_WINDOW_MODE (0x10280000) 978*aed78107SAndrew Rybchenko struct tlv_biu_vi_window_mode { 979*aed78107SAndrew Rybchenko uint32_t tag; 980*aed78107SAndrew Rybchenko uint32_t length; 981*aed78107SAndrew Rybchenko uint8_t mode; 982*aed78107SAndrew Rybchenko #define TLV_BIU_VI_WINDOW_MODE_8K 0 /* 8k per VI, CTPIO not mapped, medford/hunt compatible */ 983*aed78107SAndrew Rybchenko #define TLV_BIU_VI_WINDOW_MODE_16K 1 /* 16k per VI, CTPIO mapped */ 984*aed78107SAndrew Rybchenko #define TLV_BIU_VI_WINDOW_MODE_64K 2 /* 64k per VI, CTPIO mapped, POWER-friendly */ 985*aed78107SAndrew Rybchenko }; 986*aed78107SAndrew Rybchenko 987*aed78107SAndrew Rybchenko /* FastPD mode 988*aed78107SAndrew Rybchenko * 989*aed78107SAndrew Rybchenko * Medford2 tag for configuring the FastPD mode (see values below) 990*aed78107SAndrew Rybchenko */ 991*aed78107SAndrew Rybchenko #define TLV_TAG_FASTPD_MODE(port) (0x10290000 + (port)) 992*aed78107SAndrew Rybchenko struct tlv_fastpd_mode { 993*aed78107SAndrew Rybchenko uint32_t tag; 994*aed78107SAndrew Rybchenko uint32_t length; 995*aed78107SAndrew Rybchenko uint8_t mode; 996*aed78107SAndrew Rybchenko #define TLV_FASTPD_MODE_SOFT_ALL 0 /* All packets to the SoftPD */ 997*aed78107SAndrew Rybchenko #define TLV_FASTPD_MODE_FAST_ALL 1 /* All packets to the FastPD */ 998*aed78107SAndrew Rybchenko #define TLV_FASTPD_MODE_FAST_SUPPORTED 2 /* Supported packet types to the FastPD; everything else to the SoftPD */ 999*aed78107SAndrew Rybchenko }; 1000*aed78107SAndrew Rybchenko 1001*aed78107SAndrew Rybchenko /* L3xUDP datapath firmware UDP port configuration 1002*aed78107SAndrew Rybchenko * 1003*aed78107SAndrew Rybchenko * Sets the list of UDP ports on which the encapsulation will be handled. 1004*aed78107SAndrew Rybchenko * The number of ports in the list is implied by the length of the TLV item. 1005*aed78107SAndrew Rybchenko */ 1006*aed78107SAndrew Rybchenko #define TLV_TAG_L3XUDP_PORTS (0x102a0000) 1007*aed78107SAndrew Rybchenko struct tlv_l3xudp_ports { 1008*aed78107SAndrew Rybchenko uint32_t tag; 1009*aed78107SAndrew Rybchenko uint32_t length; 1010*aed78107SAndrew Rybchenko uint16_t ports[]; 1011*aed78107SAndrew Rybchenko #define TLV_TAG_L3XUDP_PORTS_MAX_NUM_PORTS 16 1012*aed78107SAndrew Rybchenko }; 1013*aed78107SAndrew Rybchenko 10143c838a9fSAndrew Rybchenko #endif /* CI_MGMT_TLV_LAYOUT_H */ 1015