Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 ===================
0004 ice devlink support
0005 ===================
0006 
0007 This document describes the devlink features implemented by the ``ice``
0008 device driver.
0009 
0010 Info versions
0011 =============
0012 
0013 The ``ice`` driver reports the following versions
0014 
0015 .. list-table:: devlink info versions implemented
0016     :widths: 5 5 5 90
0017 
0018     * - Name
0019       - Type
0020       - Example
0021       - Description
0022     * - ``board.id``
0023       - fixed
0024       - K65390-000
0025       - The Product Board Assembly (PBA) identifier of the board.
0026     * - ``fw.mgmt``
0027       - running
0028       - 2.1.7
0029       - 3-digit version number of the management firmware running on the
0030         Embedded Management Processor of the device. It controls the PHY,
0031         link, access to device resources, etc. Intel documentation refers to
0032         this as the EMP firmware.
0033     * - ``fw.mgmt.api``
0034       - running
0035       - 1.5.1
0036       - 3-digit version number (major.minor.patch) of the API exported over
0037         the AdminQ by the management firmware. Used by the driver to
0038         identify what commands are supported. Historical versions of the
0039         kernel only displayed a 2-digit version number (major.minor).
0040     * - ``fw.mgmt.build``
0041       - running
0042       - 0x305d955f
0043       - Unique identifier of the source for the management firmware.
0044     * - ``fw.undi``
0045       - running
0046       - 1.2581.0
0047       - Version of the Option ROM containing the UEFI driver. The version is
0048         reported in ``major.minor.patch`` format. The major version is
0049         incremented whenever a major breaking change occurs, or when the
0050         minor version would overflow. The minor version is incremented for
0051         non-breaking changes and reset to 1 when the major version is
0052         incremented. The patch version is normally 0 but is incremented when
0053         a fix is delivered as a patch against an older base Option ROM.
0054     * - ``fw.psid.api``
0055       - running
0056       - 0.80
0057       - Version defining the format of the flash contents.
0058     * - ``fw.bundle_id``
0059       - running
0060       - 0x80002ec0
0061       - Unique identifier of the firmware image file that was loaded onto
0062         the device. Also referred to as the EETRACK identifier of the NVM.
0063     * - ``fw.app.name``
0064       - running
0065       - ICE OS Default Package
0066       - The name of the DDP package that is active in the device. The DDP
0067         package is loaded by the driver during initialization. Each
0068         variation of the DDP package has a unique name.
0069     * - ``fw.app``
0070       - running
0071       - 1.3.1.0
0072       - The version of the DDP package that is active in the device. Note
0073         that both the name (as reported by ``fw.app.name``) and version are
0074         required to uniquely identify the package.
0075     * - ``fw.app.bundle_id``
0076       - running
0077       - 0xc0000001
0078       - Unique identifier for the DDP package loaded in the device. Also
0079         referred to as the DDP Track ID. Can be used to uniquely identify
0080         the specific DDP package.
0081     * - ``fw.netlist``
0082       - running
0083       - 1.1.2000-6.7.0
0084       - The version of the netlist module. This module defines the device's
0085         Ethernet capabilities and default settings, and is used by the
0086         management firmware as part of managing link and device
0087         connectivity.
0088     * - ``fw.netlist.build``
0089       - running
0090       - 0xee16ced7
0091       - The first 4 bytes of the hash of the netlist module contents.
0092 
0093 Flash Update
0094 ============
0095 
0096 The ``ice`` driver implements support for flash update using the
0097 ``devlink-flash`` interface. It supports updating the device flash using a
0098 combined flash image that contains the ``fw.mgmt``, ``fw.undi``, and
0099 ``fw.netlist`` components.
0100 
0101 .. list-table:: List of supported overwrite modes
0102    :widths: 5 95
0103 
0104    * - Bits
0105      - Behavior
0106    * - ``DEVLINK_FLASH_OVERWRITE_SETTINGS``
0107      - Do not preserve settings stored in the flash components being
0108        updated. This includes overwriting the port configuration that
0109        determines the number of physical functions the device will
0110        initialize with.
0111    * - ``DEVLINK_FLASH_OVERWRITE_SETTINGS`` and ``DEVLINK_FLASH_OVERWRITE_IDENTIFIERS``
0112      - Do not preserve either settings or identifiers. Overwrite everything
0113        in the flash with the contents from the provided image, without
0114        performing any preservation. This includes overwriting device
0115        identifying fields such as the MAC address, VPD area, and device
0116        serial number. It is expected that this combination be used with an
0117        image customized for the specific device.
0118 
0119 The ice hardware does not support overwriting only identifiers while
0120 preserving settings, and thus ``DEVLINK_FLASH_OVERWRITE_IDENTIFIERS`` on its
0121 own will be rejected. If no overwrite mask is provided, the firmware will be
0122 instructed to preserve all settings and identifying fields when updating.
0123 
0124 Reload
0125 ======
0126 
0127 The ``ice`` driver supports activating new firmware after a flash update
0128 using ``DEVLINK_CMD_RELOAD`` with the ``DEVLINK_RELOAD_ACTION_FW_ACTIVATE``
0129 action.
0130 
0131 .. code:: shell
0132 
0133     $ devlink dev reload pci/0000:01:00.0 reload action fw_activate
0134 
0135 The new firmware is activated by issuing a device specific Embedded
0136 Management Processor reset which requests the device to reset and reload the
0137 EMP firmware image.
0138 
0139 The driver does not currently support reloading the driver via
0140 ``DEVLINK_RELOAD_ACTION_DRIVER_REINIT``.
0141 
0142 Regions
0143 =======
0144 
0145 The ``ice`` driver implements the following regions for accessing internal
0146 device data.
0147 
0148 .. list-table:: regions implemented
0149     :widths: 15 85
0150 
0151     * - Name
0152       - Description
0153     * - ``nvm-flash``
0154       - The contents of the entire flash chip, sometimes referred to as
0155         the device's Non Volatile Memory.
0156     * - ``device-caps``
0157       - The contents of the device firmware's capabilities buffer. Useful to
0158         determine the current state and configuration of the device.
0159 
0160 Users can request an immediate capture of a snapshot via the
0161 ``DEVLINK_CMD_REGION_NEW``
0162 
0163 .. code:: shell
0164 
0165     $ devlink region show
0166     pci/0000:01:00.0/nvm-flash: size 10485760 snapshot [] max 1
0167     pci/0000:01:00.0/device-caps: size 4096 snapshot [] max 10
0168 
0169     $ devlink region new pci/0000:01:00.0/nvm-flash snapshot 1
0170     $ devlink region dump pci/0000:01:00.0/nvm-flash snapshot 1
0171 
0172     $ devlink region dump pci/0000:01:00.0/nvm-flash snapshot 1
0173     0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30
0174     0000000000000010 0000 0000 ffff ff04 0029 8c00 0028 8cc8
0175     0000000000000020 0016 0bb8 0016 1720 0000 0000 c00f 3ffc
0176     0000000000000030 bada cce5 bada cce5 bada cce5 bada cce5
0177 
0178     $ devlink region read pci/0000:01:00.0/nvm-flash snapshot 1 address 0 length 16
0179     0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30
0180 
0181     $ devlink region delete pci/0000:01:00.0/nvm-flash snapshot 1
0182 
0183     $ devlink region new pci/0000:01:00.0/device-caps snapshot 1
0184     $ devlink region dump pci/0000:01:00.0/device-caps snapshot 1
0185     0000000000000000 01 00 01 00 00 00 00 00 01 00 00 00 00 00 00 00
0186     0000000000000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0187     0000000000000020 02 00 02 01 32 03 00 00 0a 00 00 00 25 00 00 00
0188     0000000000000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0189     0000000000000040 04 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
0190     0000000000000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0191     0000000000000060 05 00 01 00 03 00 00 00 00 00 00 00 00 00 00 00
0192     0000000000000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0193     0000000000000080 06 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
0194     0000000000000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0195     00000000000000a0 08 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
0196     00000000000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0197     00000000000000c0 12 00 01 00 01 00 00 00 01 00 01 00 00 00 00 00
0198     00000000000000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0199     00000000000000e0 13 00 01 00 00 01 00 00 00 00 00 00 00 00 00 00
0200     00000000000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0201     0000000000000100 14 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
0202     0000000000000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0203     0000000000000120 15 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
0204     0000000000000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0205     0000000000000140 16 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
0206     0000000000000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0207     0000000000000160 17 00 01 00 06 00 00 00 00 00 00 00 00 00 00 00
0208     0000000000000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0209     0000000000000180 18 00 01 00 01 00 00 00 01 00 00 00 08 00 00 00
0210     0000000000000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0211     00000000000001a0 22 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
0212     00000000000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0213     00000000000001c0 40 00 01 00 00 08 00 00 08 00 00 00 00 00 00 00
0214     00000000000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0215     00000000000001e0 41 00 01 00 00 08 00 00 00 00 00 00 00 00 00 00
0216     00000000000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0217     0000000000000200 42 00 01 00 00 08 00 00 00 00 00 00 00 00 00 00
0218     0000000000000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0219 
0220     $ devlink region delete pci/0000:01:00.0/device-caps snapshot 1