xref: /linux/Documentation/networking/devlink/ixgbe.rst (revision 1b98f357dadd6ea613a435fbaef1a5dd7b35fd21)
1a0285236SJedrzej Jagielski.. SPDX-License-Identifier: GPL-2.0
2a0285236SJedrzej Jagielski
3a0285236SJedrzej Jagielski=====================
4a0285236SJedrzej Jagielskiixgbe devlink support
5a0285236SJedrzej Jagielski=====================
6a0285236SJedrzej Jagielski
7a0285236SJedrzej JagielskiThis document describes the devlink features implemented by the ``ixgbe``
8a0285236SJedrzej Jagielskidevice driver.
9f6b588afSJedrzej Jagielski
10f6b588afSJedrzej JagielskiInfo versions
11f6b588afSJedrzej Jagielski=============
12f6b588afSJedrzej Jagielski
138210ff73SJedrzej JagielskiAny of the versions dealing with the security presented by ``devlink-info``
148210ff73SJedrzej Jagielskiis purely informational. Devlink does not use a secure channel to communicate
158210ff73SJedrzej Jagielskiwith the device.
168210ff73SJedrzej Jagielski
17f6b588afSJedrzej JagielskiThe ``ixgbe`` driver reports the following versions
18f6b588afSJedrzej Jagielski
19f6b588afSJedrzej Jagielski.. list-table:: devlink info versions implemented
20f6b588afSJedrzej Jagielski    :widths: 5 5 5 90
21f6b588afSJedrzej Jagielski
22f6b588afSJedrzej Jagielski    * - Name
23f6b588afSJedrzej Jagielski      - Type
24f6b588afSJedrzej Jagielski      - Example
25f6b588afSJedrzej Jagielski      - Description
26f6b588afSJedrzej Jagielski    * - ``board.id``
27f6b588afSJedrzej Jagielski      - fixed
28f6b588afSJedrzej Jagielski      - H49289-000
29f6b588afSJedrzej Jagielski      - The Product Board Assembly (PBA) identifier of the board.
30f6b588afSJedrzej Jagielski    * - ``fw.undi``
31f6b588afSJedrzej Jagielski      - running
32f6b588afSJedrzej Jagielski      - 1.1937.0
33f6b588afSJedrzej Jagielski      - Version of the Option ROM containing the UEFI driver. The version is
34f6b588afSJedrzej Jagielski        reported in ``major.minor.patch`` format. The major version is
35f6b588afSJedrzej Jagielski        incremented whenever a major breaking change occurs, or when the
36f6b588afSJedrzej Jagielski        minor version would overflow. The minor version is incremented for
37f6b588afSJedrzej Jagielski        non-breaking changes and reset to 1 when the major version is
38f6b588afSJedrzej Jagielski        incremented. The patch version is normally 0 but is incremented when
39f6b588afSJedrzej Jagielski        a fix is delivered as a patch against an older base Option ROM.
408210ff73SJedrzej Jagielski    * - ``fw.undi.srev``
418210ff73SJedrzej Jagielski      - running
428210ff73SJedrzej Jagielski      - 4
438210ff73SJedrzej Jagielski      - Number indicating the security revision of the Option ROM.
44f6b588afSJedrzej Jagielski    * - ``fw.bundle_id``
45f6b588afSJedrzej Jagielski      - running
46f6b588afSJedrzej Jagielski      - 0x80000d0d
47f6b588afSJedrzej Jagielski      - Unique identifier of the firmware image file that was loaded onto
48f6b588afSJedrzej Jagielski        the device. Also referred to as the EETRACK identifier of the NVM.
498210ff73SJedrzej Jagielski    * - ``fw.mgmt.api``
508210ff73SJedrzej Jagielski      - running
518210ff73SJedrzej Jagielski      - 1.5.1
528210ff73SJedrzej Jagielski      - 3-digit version number (major.minor.patch) of the API exported over
538210ff73SJedrzej Jagielski        the AdminQ by the management firmware. Used by the driver to
548210ff73SJedrzej Jagielski        identify what commands are supported. Historical versions of the
558210ff73SJedrzej Jagielski        kernel only displayed a 2-digit version number (major.minor).
568210ff73SJedrzej Jagielski    * - ``fw.mgmt.build``
578210ff73SJedrzej Jagielski      - running
588210ff73SJedrzej Jagielski      - 0x305d955f
598210ff73SJedrzej Jagielski      - Unique identifier of the source for the management firmware.
608210ff73SJedrzej Jagielski    * - ``fw.mgmt.srev``
618210ff73SJedrzej Jagielski      - running
628210ff73SJedrzej Jagielski      - 3
638210ff73SJedrzej Jagielski      - Number indicating the security revision of the firmware.
648210ff73SJedrzej Jagielski    * - ``fw.psid.api``
658210ff73SJedrzej Jagielski      - running
668210ff73SJedrzej Jagielski      - 0.80
678210ff73SJedrzej Jagielski      - Version defining the format of the flash contents.
688210ff73SJedrzej Jagielski    * - ``fw.netlist``
698210ff73SJedrzej Jagielski      - running
708210ff73SJedrzej Jagielski      - 1.1.2000-6.7.0
718210ff73SJedrzej Jagielski      - The version of the netlist module. This module defines the device's
728210ff73SJedrzej Jagielski        Ethernet capabilities and default settings, and is used by the
738210ff73SJedrzej Jagielski        management firmware as part of managing link and device
748210ff73SJedrzej Jagielski        connectivity.
758210ff73SJedrzej Jagielski    * - ``fw.netlist.build``
768210ff73SJedrzej Jagielski      - running
778210ff73SJedrzej Jagielski      - 0xee16ced7
788210ff73SJedrzej Jagielski      - The first 4 bytes of the hash of the netlist module contents.
79a0f45672SJedrzej Jagielski
80a0f45672SJedrzej JagielskiFlash Update
81a0f45672SJedrzej Jagielski============
82a0f45672SJedrzej Jagielski
83a0f45672SJedrzej JagielskiThe ``ixgbe`` driver implements support for flash update using the
84a0f45672SJedrzej Jagielski``devlink-flash`` interface. It supports updating the device flash using a
85a0f45672SJedrzej Jagielskicombined flash image that contains the ``fw.mgmt``, ``fw.undi``, and
86a0f45672SJedrzej Jagielski``fw.netlist`` components.
87a0f45672SJedrzej Jagielski
88a0f45672SJedrzej Jagielski.. list-table:: List of supported overwrite modes
89a0f45672SJedrzej Jagielski   :widths: 5 95
90a0f45672SJedrzej Jagielski
91a0f45672SJedrzej Jagielski   * - Bits
92a0f45672SJedrzej Jagielski     - Behavior
93a0f45672SJedrzej Jagielski   * - ``DEVLINK_FLASH_OVERWRITE_SETTINGS``
94a0f45672SJedrzej Jagielski     - Do not preserve settings stored in the flash components being
95a0f45672SJedrzej Jagielski       updated. This includes overwriting the port configuration that
96a0f45672SJedrzej Jagielski       determines the number of physical functions the device will
97a0f45672SJedrzej Jagielski       initialize with.
98a0f45672SJedrzej Jagielski   * - ``DEVLINK_FLASH_OVERWRITE_SETTINGS`` and ``DEVLINK_FLASH_OVERWRITE_IDENTIFIERS``
99a0f45672SJedrzej Jagielski     - Do not preserve either settings or identifiers. Overwrite everything
100a0f45672SJedrzej Jagielski       in the flash with the contents from the provided image, without
101a0f45672SJedrzej Jagielski       performing any preservation. This includes overwriting device
102a0f45672SJedrzej Jagielski       identifying fields such as the MAC address, Vital product Data (VPD) area,
103a0f45672SJedrzej Jagielski       and device serial number. It is expected that this combination be used with an
104a0f45672SJedrzej Jagielski       image customized for the specific device.
105a0f45672SJedrzej Jagielski
106c9e563caSJedrzej JagielskiReload
107c9e563caSJedrzej Jagielski======
108c9e563caSJedrzej Jagielski
109c9e563caSJedrzej JagielskiThe ``ixgbe`` driver supports activating new firmware after a flash update
110c9e563caSJedrzej Jagielskiusing ``DEVLINK_CMD_RELOAD`` with the ``DEVLINK_RELOAD_ACTION_FW_ACTIVATE``
111c9e563caSJedrzej Jagielskiaction.
112c9e563caSJedrzej Jagielski
113c9e563caSJedrzej Jagielski.. code:: shell
114c9e563caSJedrzej Jagielski
115c9e563caSJedrzej Jagielski    $ devlink dev reload pci/0000:01:00.0 reload action fw_activate
116c9e563caSJedrzej Jagielski
117c9e563caSJedrzej JagielskiThe new firmware is activated by issuing a device specific Embedded
118c9e563caSJedrzej JagielskiManagement Processor reset which requests the device to reset and reload the
119c9e563caSJedrzej JagielskiEMP firmware image.
120c9e563caSJedrzej Jagielski
121c9e563caSJedrzej JagielskiThe driver does not currently support reloading the driver via
122c9e563caSJedrzej Jagielski``DEVLINK_RELOAD_ACTION_DRIVER_REINIT``.
123*fe259a1bSSlawomir Mrozowicz
124*fe259a1bSSlawomir MrozowiczRegions
125*fe259a1bSSlawomir Mrozowicz=======
126*fe259a1bSSlawomir Mrozowicz
127*fe259a1bSSlawomir MrozowiczThe ``ixgbe`` driver implements the following regions for accessing internal
128*fe259a1bSSlawomir Mrozowiczdevice data.
129*fe259a1bSSlawomir Mrozowicz
130*fe259a1bSSlawomir Mrozowicz.. list-table:: regions implemented
131*fe259a1bSSlawomir Mrozowicz    :widths: 15 85
132*fe259a1bSSlawomir Mrozowicz
133*fe259a1bSSlawomir Mrozowicz    * - Name
134*fe259a1bSSlawomir Mrozowicz      - Description
135*fe259a1bSSlawomir Mrozowicz    * - ``nvm-flash``
136*fe259a1bSSlawomir Mrozowicz      - The contents of the entire flash chip, sometimes referred to as
137*fe259a1bSSlawomir Mrozowicz        the device's Non Volatile Memory.
138*fe259a1bSSlawomir Mrozowicz    * - ``shadow-ram``
139*fe259a1bSSlawomir Mrozowicz      - The contents of the Shadow RAM, which is loaded from the beginning
140*fe259a1bSSlawomir Mrozowicz        of the flash. Although the contents are primarily from the flash,
141*fe259a1bSSlawomir Mrozowicz        this area also contains data generated during device boot which is
142*fe259a1bSSlawomir Mrozowicz        not stored in flash.
143*fe259a1bSSlawomir Mrozowicz    * - ``device-caps``
144*fe259a1bSSlawomir Mrozowicz      - The contents of the device firmware's capabilities buffer. Useful to
145*fe259a1bSSlawomir Mrozowicz        determine the current state and configuration of the device.
146*fe259a1bSSlawomir Mrozowicz
147*fe259a1bSSlawomir MrozowiczBoth the ``nvm-flash`` and ``shadow-ram`` regions can be accessed without a
148*fe259a1bSSlawomir Mrozowiczsnapshot. The ``device-caps`` region requires a snapshot as the contents are
149*fe259a1bSSlawomir Mrozowiczsent by firmware and can't be split into separate reads.
150*fe259a1bSSlawomir Mrozowicz
151*fe259a1bSSlawomir MrozowiczUsers can request an immediate capture of a snapshot for all three regions
152*fe259a1bSSlawomir Mrozowiczvia the ``DEVLINK_CMD_REGION_NEW`` command.
153*fe259a1bSSlawomir Mrozowicz
154*fe259a1bSSlawomir Mrozowicz.. code:: shell
155*fe259a1bSSlawomir Mrozowicz
156*fe259a1bSSlawomir Mrozowicz    $ devlink region show
157*fe259a1bSSlawomir Mrozowicz    pci/0000:01:00.0/nvm-flash: size 10485760 snapshot [] max 1
158*fe259a1bSSlawomir Mrozowicz    pci/0000:01:00.0/device-caps: size 4096 snapshot [] max 10
159*fe259a1bSSlawomir Mrozowicz
160*fe259a1bSSlawomir Mrozowicz    $ devlink region new pci/0000:01:00.0/nvm-flash snapshot 1
161*fe259a1bSSlawomir Mrozowicz
162*fe259a1bSSlawomir Mrozowicz    $ devlink region dump pci/0000:01:00.0/nvm-flash snapshot 1
163*fe259a1bSSlawomir Mrozowicz    0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30
164*fe259a1bSSlawomir Mrozowicz    0000000000000010 0000 0000 ffff ff04 0029 8c00 0028 8cc8
165*fe259a1bSSlawomir Mrozowicz    0000000000000020 0016 0bb8 0016 1720 0000 0000 c00f 3ffc
166*fe259a1bSSlawomir Mrozowicz    0000000000000030 bada cce5 bada cce5 bada cce5 bada cce5
167*fe259a1bSSlawomir Mrozowicz
168*fe259a1bSSlawomir Mrozowicz    $ devlink region read pci/0000:01:00.0/nvm-flash snapshot 1 address 0 length 16
169*fe259a1bSSlawomir Mrozowicz    0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30
170*fe259a1bSSlawomir Mrozowicz
171*fe259a1bSSlawomir Mrozowicz    $ devlink region delete pci/0000:01:00.0/device-caps snapshot 1
172