1.. SPDX-License-Identifier: GPL-2.0 2 3=================== 4ice devlink support 5=================== 6 7This document describes the devlink features implemented by the ``ice`` 8device driver. 9 10Info versions 11============= 12 13The ``ice`` driver reports the following versions 14 15.. list-table:: devlink info versions implemented 16 :widths: 5 5 5 90 17 18 * - Name 19 - Type 20 - Example 21 - Description 22 * - ``board.id`` 23 - fixed 24 - K65390-000 25 - The Product Board Assembly (PBA) identifier of the board. 26 * - ``fw.mgmt`` 27 - running 28 - 2.1.7 29 - 3-digit version number of the management firmware running on the 30 Embedded Management Processor of the device. It controls the PHY, 31 link, access to device resources, etc. Intel documentation refers to 32 this as the EMP firmware. 33 * - ``fw.mgmt.api`` 34 - running 35 - 1.5.1 36 - 3-digit version number (major.minor.patch) of the API exported over 37 the AdminQ by the management firmware. Used by the driver to 38 identify what commands are supported. Historical versions of the 39 kernel only displayed a 2-digit version number (major.minor). 40 * - ``fw.mgmt.build`` 41 - running 42 - 0x305d955f 43 - Unique identifier of the source for the management firmware. 44 * - ``fw.undi`` 45 - running 46 - 1.2581.0 47 - Version of the Option ROM containing the UEFI driver. The version is 48 reported in ``major.minor.patch`` format. The major version is 49 incremented whenever a major breaking change occurs, or when the 50 minor version would overflow. The minor version is incremented for 51 non-breaking changes and reset to 1 when the major version is 52 incremented. The patch version is normally 0 but is incremented when 53 a fix is delivered as a patch against an older base Option ROM. 54 * - ``fw.psid.api`` 55 - running 56 - 0.80 57 - Version defining the format of the flash contents. 58 * - ``fw.bundle_id`` 59 - running 60 - 0x80002ec0 61 - Unique identifier of the firmware image file that was loaded onto 62 the device. Also referred to as the EETRACK identifier of the NVM. 63 * - ``fw.app.name`` 64 - running 65 - ICE OS Default Package 66 - The name of the DDP package that is active in the device. The DDP 67 package is loaded by the driver during initialization. Each 68 variation of the DDP package has a unique name. 69 * - ``fw.app`` 70 - running 71 - 1.3.1.0 72 - The version of the DDP package that is active in the device. Note 73 that both the name (as reported by ``fw.app.name``) and version are 74 required to uniquely identify the package. 75 * - ``fw.app.bundle_id`` 76 - running 77 - 0xc0000001 78 - Unique identifier for the DDP package loaded in the device. Also 79 referred to as the DDP Track ID. Can be used to uniquely identify 80 the specific DDP package. 81 * - ``fw.netlist`` 82 - running 83 - 1.1.2000-6.7.0 84 - The version of the netlist module. This module defines the device's 85 Ethernet capabilities and default settings, and is used by the 86 management firmware as part of managing link and device 87 connectivity. 88 * - ``fw.netlist.build`` 89 - running 90 - 0xee16ced7 91 - The first 4 bytes of the hash of the netlist module contents. 92 93Flash Update 94============ 95 96The ``ice`` driver implements support for flash update using the 97``devlink-flash`` interface. It supports updating the device flash using a 98combined flash image that contains the ``fw.mgmt``, ``fw.undi``, and 99``fw.netlist`` components. 100 101.. list-table:: List of supported overwrite modes 102 :widths: 5 95 103 104 * - Bits 105 - Behavior 106 * - ``DEVLINK_FLASH_OVERWRITE_SETTINGS`` 107 - Do not preserve settings stored in the flash components being 108 updated. This includes overwriting the port configuration that 109 determines the number of physical functions the device will 110 initialize with. 111 * - ``DEVLINK_FLASH_OVERWRITE_SETTINGS`` and ``DEVLINK_FLASH_OVERWRITE_IDENTIFIERS`` 112 - Do not preserve either settings or identifiers. Overwrite everything 113 in the flash with the contents from the provided image, without 114 performing any preservation. This includes overwriting device 115 identifying fields such as the MAC address, VPD area, and device 116 serial number. It is expected that this combination be used with an 117 image customized for the specific device. 118 119The ice hardware does not support overwriting only identifiers while 120preserving settings, and thus ``DEVLINK_FLASH_OVERWRITE_IDENTIFIERS`` on its 121own will be rejected. If no overwrite mask is provided, the firmware will be 122instructed to preserve all settings and identifying fields when updating. 123 124Reload 125====== 126 127The ``ice`` driver supports activating new firmware after a flash update 128using ``DEVLINK_CMD_RELOAD`` with the ``DEVLINK_RELOAD_ACTION_FW_ACTIVATE`` 129action. 130 131.. code:: shell 132 133 $ devlink dev reload pci/0000:01:00.0 reload action fw_activate 134 135The new firmware is activated by issuing a device specific Embedded 136Management Processor reset which requests the device to reset and reload the 137EMP firmware image. 138 139The driver does not currently support reloading the driver via 140``DEVLINK_RELOAD_ACTION_DRIVER_REINIT``. 141 142Regions 143======= 144 145The ``ice`` driver implements the following regions for accessing internal 146device data. 147 148.. list-table:: regions implemented 149 :widths: 15 85 150 151 * - Name 152 - Description 153 * - ``nvm-flash`` 154 - The contents of the entire flash chip, sometimes referred to as 155 the device's Non Volatile Memory. 156 * - ``device-caps`` 157 - The contents of the device firmware's capabilities buffer. Useful to 158 determine the current state and configuration of the device. 159 160Users can request an immediate capture of a snapshot via the 161``DEVLINK_CMD_REGION_NEW`` 162 163.. code:: shell 164 165 $ devlink region show 166 pci/0000:01:00.0/nvm-flash: size 10485760 snapshot [] max 1 167 pci/0000:01:00.0/device-caps: size 4096 snapshot [] max 10 168 169 $ devlink region new pci/0000:01:00.0/nvm-flash snapshot 1 170 $ devlink region dump pci/0000:01:00.0/nvm-flash snapshot 1 171 172 $ devlink region dump pci/0000:01:00.0/nvm-flash snapshot 1 173 0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30 174 0000000000000010 0000 0000 ffff ff04 0029 8c00 0028 8cc8 175 0000000000000020 0016 0bb8 0016 1720 0000 0000 c00f 3ffc 176 0000000000000030 bada cce5 bada cce5 bada cce5 bada cce5 177 178 $ devlink region read pci/0000:01:00.0/nvm-flash snapshot 1 address 0 length 16 179 0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30 180 181 $ devlink region delete pci/0000:01:00.0/nvm-flash snapshot 1 182 183 $ devlink region new pci/0000:01:00.0/device-caps snapshot 1 184 $ devlink region dump pci/0000:01:00.0/device-caps snapshot 1 185 0000000000000000 01 00 01 00 00 00 00 00 01 00 00 00 00 00 00 00 186 0000000000000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 187 0000000000000020 02 00 02 01 32 03 00 00 0a 00 00 00 25 00 00 00 188 0000000000000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 189 0000000000000040 04 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 190 0000000000000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 191 0000000000000060 05 00 01 00 03 00 00 00 00 00 00 00 00 00 00 00 192 0000000000000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 193 0000000000000080 06 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 194 0000000000000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 195 00000000000000a0 08 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 196 00000000000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 197 00000000000000c0 12 00 01 00 01 00 00 00 01 00 01 00 00 00 00 00 198 00000000000000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 199 00000000000000e0 13 00 01 00 00 01 00 00 00 00 00 00 00 00 00 00 200 00000000000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 201 0000000000000100 14 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 202 0000000000000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 203 0000000000000120 15 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 204 0000000000000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 205 0000000000000140 16 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 206 0000000000000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 207 0000000000000160 17 00 01 00 06 00 00 00 00 00 00 00 00 00 00 00 208 0000000000000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 209 0000000000000180 18 00 01 00 01 00 00 00 01 00 00 00 08 00 00 00 210 0000000000000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 211 00000000000001a0 22 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 212 00000000000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 213 00000000000001c0 40 00 01 00 00 08 00 00 08 00 00 00 00 00 00 00 214 00000000000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 215 00000000000001e0 41 00 01 00 00 08 00 00 00 00 00 00 00 00 00 00 216 00000000000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 217 0000000000000200 42 00 01 00 00 08 00 00 00 00 00 00 00 00 00 00 218 0000000000000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 219 220 $ devlink region delete pci/0000:01:00.0/device-caps snapshot 1 221