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