blob: b165181d5d4daa68cb7cfc3dcecf75d4511c1653 [file] [log] [blame]
Jacob Kellerff2e5c72020-03-11 18:58:17 -07001.. 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
Jacob Kellere961b672020-03-11 18:58:18 -070022 * - ``board.id``
23 - fixed
24 - K65390-000
25 - The Product Board Assembly (PBA) identifier of the board.
Jacob Kellerff2e5c72020-03-11 18:58:17 -070026 * - ``fw.mgmt``
27 - running
28 - 2.1.7
29 - 3-digit version number of the management firmware that controls the
30 PHY, link, etc.
31 * - ``fw.mgmt.api``
32 - running
33 - 1.5
34 - 2-digit version number of the API exported over the AdminQ by the
35 management firmware. Used by the driver to identify what commands
36 are supported.
37 * - ``fw.mgmt.build``
38 - running
39 - 0x305d955f
40 - Unique identifier of the source for the management firmware.
41 * - ``fw.undi``
42 - running
43 - 1.2581.0
44 - Version of the Option ROM containing the UEFI driver. The version is
45 reported in ``major.minor.patch`` format. The major version is
46 incremented whenever a major breaking change occurs, or when the
47 minor version would overflow. The minor version is incremented for
48 non-breaking changes and reset to 1 when the major version is
49 incremented. The patch version is normally 0 but is incremented when
50 a fix is delivered as a patch against an older base Option ROM.
51 * - ``fw.psid.api``
52 - running
53 - 0.80
54 - Version defining the format of the flash contents.
55 * - ``fw.bundle_id``
56 - running
57 - 0x80002ec0
58 - Unique identifier of the firmware image file that was loaded onto
59 the device. Also referred to as the EETRACK identifier of the NVM.
60 * - ``fw.app.name``
61 - running
62 - ICE OS Default Package
63 - The name of the DDP package that is active in the device. The DDP
Jacob Keller709e7152020-04-29 13:59:50 -070064 package is loaded by the driver during initialization. Each
65 variation of the DDP package has a unique name.
Jacob Kellerff2e5c72020-03-11 18:58:17 -070066 * - ``fw.app``
67 - running
68 - 1.3.1.0
69 - The version of the DDP package that is active in the device. Note
70 that both the name (as reported by ``fw.app.name``) and version are
71 required to uniquely identify the package.
Jacob Keller410d0682020-10-07 10:54:43 -070072 * - ``fw.app.bundle_id``
73 - 0xc0000001
74 - Unique identifier for the DDP package loaded in the device. Also
75 referred to as the DDP Track ID. Can be used to uniquely identify
76 the specific DDP package.
Jacob Kellerf45a6452020-05-05 15:55:37 -070077 * - ``fw.netlist``
78 - running
79 - 1.1.2000-6.7.0
80 - The version of the netlist module. This module defines the device's
81 Ethernet capabilities and default settings, and is used by the
82 management firmware as part of managing link and device
83 connectivity.
84 * - ``fw.netlist.build``
85 - running
86 - 0xee16ced7
87 - The first 4 bytes of the hash of the netlist module contents.
Jacob Kellerdce730f2020-03-26 11:37:18 -070088
Jacob Keller50db1bc2020-09-25 13:46:09 -070089Flash Update
90============
91
92The ``ice`` driver implements support for flash update using the
93``devlink-flash`` interface. It supports updating the device flash using a
94combined flash image that contains the ``fw.mgmt``, ``fw.undi``, and
95``fw.netlist`` components.
96
97.. list-table:: List of supported overwrite modes
98 :widths: 5 95
99
100 * - Bits
101 - Behavior
102 * - ``DEVLINK_FLASH_OVERWRITE_SETTINGS``
103 - Do not preserve settings stored in the flash components being
104 updated. This includes overwriting the port configuration that
105 determines the number of physical functions the device will
106 initialize with.
107 * - ``DEVLINK_FLASH_OVERWRITE_SETTINGS`` and ``DEVLINK_FLASH_OVERWRITE_IDENTIFIERS``
108 - Do not preserve either settings or identifiers. Overwrite everything
109 in the flash with the contents from the provided image, without
110 performing any preservation. This includes overwriting device
111 identifying fields such as the MAC address, VPD area, and device
112 serial number. It is expected that this combination be used with an
113 image customized for the specific device.
114
115The ice hardware does not support overwriting only identifiers while
116preserving settings, and thus ``DEVLINK_FLASH_OVERWRITE_IDENTIFIERS`` on its
117own will be rejected. If no overwrite mask is provided, the firmware will be
118instructed to preserve all settings and identifying fields when updating.
119
Jacob Kellerdce730f2020-03-26 11:37:18 -0700120Regions
121=======
122
Jacob Keller14f5d8e32020-07-06 14:53:41 -0700123The ``ice`` driver implements the following regions for accessing internal
124device data.
125
126.. list-table:: regions implemented
127 :widths: 15 85
128
129 * - Name
130 - Description
131 * - ``nvm-flash``
132 - The contents of the entire flash chip, sometimes referred to as
133 the device's Non Volatile Memory.
134 * - ``device-caps``
135 - The contents of the device firmware's capabilities buffer. Useful to
136 determine the current state and configuration of the device.
Jacob Kellerdce730f2020-03-26 11:37:18 -0700137
138Users can request an immediate capture of a snapshot via the
139``DEVLINK_CMD_REGION_NEW``
140
141.. code:: shell
142
143 $ devlink region new pci/0000:01:00.0/nvm-flash snapshot 1
144 $ devlink region dump pci/0000:01:00.0/nvm-flash snapshot 1
145
146 $ devlink region dump pci/0000:01:00.0/nvm-flash snapshot 1
147 0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30
148 0000000000000010 0000 0000 ffff ff04 0029 8c00 0028 8cc8
149 0000000000000020 0016 0bb8 0016 1720 0000 0000 c00f 3ffc
150 0000000000000030 bada cce5 bada cce5 bada cce5 bada cce5
151
Jacob Keller9c11cc72020-03-27 13:55:36 -0700152 $ devlink region read pci/0000:01:00.0/nvm-flash snapshot 1 address 0 length 16
Jacob Kellerdce730f2020-03-26 11:37:18 -0700153 0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30
154
155 $ devlink region delete pci/0000:01:00.0/nvm-flash snapshot 1
Jacob Keller14f5d8e32020-07-06 14:53:41 -0700156
157 $ devlink region new pci/0000:01:00.0/device-caps snapshot 1
158 $ devlink region dump pci/0000:01:00.0/device-caps snapshot 1
159 0000000000000000 01 00 01 00 00 00 00 00 01 00 00 00 00 00 00 00
160 0000000000000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
161 0000000000000020 02 00 02 01 32 03 00 00 0a 00 00 00 25 00 00 00
162 0000000000000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
163 0000000000000040 04 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
164 0000000000000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
165 0000000000000060 05 00 01 00 03 00 00 00 00 00 00 00 00 00 00 00
166 0000000000000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
167 0000000000000080 06 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
168 0000000000000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
169 00000000000000a0 08 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
170 00000000000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
171 00000000000000c0 12 00 01 00 01 00 00 00 01 00 01 00 00 00 00 00
172 00000000000000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
173 00000000000000e0 13 00 01 00 00 01 00 00 00 00 00 00 00 00 00 00
174 00000000000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
175 0000000000000100 14 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
176 0000000000000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
177 0000000000000120 15 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
178 0000000000000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
179 0000000000000140 16 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
180 0000000000000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
181 0000000000000160 17 00 01 00 06 00 00 00 00 00 00 00 00 00 00 00
182 0000000000000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
183 0000000000000180 18 00 01 00 01 00 00 00 01 00 00 00 08 00 00 00
184 0000000000000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
185 00000000000001a0 22 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
186 00000000000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
187 00000000000001c0 40 00 01 00 00 08 00 00 08 00 00 00 00 00 00 00
188 00000000000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
189 00000000000001e0 41 00 01 00 00 08 00 00 00 00 00 00 00 00 00 00
190 00000000000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
191 0000000000000200 42 00 01 00 00 08 00 00 00 00 00 00 00 00 00 00
192 0000000000000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
193
194 $ devlink region delete pci/0000:01:00.0/device-caps snapshot 1