1 .. SPDX-License-Identifier: GPL-2.0 2 3 ==================== 4 iosm devlink support 5 ==================== 6 7 This document describes the devlink features implemented by the ``iosm`` 8 device driver. 9 10 Parameters 11 ========== 12 13 The ``iosm`` driver implements the following driver-specific parameters. 14 15 .. list-table:: Driver-specific parameters implemented 16 :widths: 5 5 5 85 17 18 * - Name 19 - Type 20 - Mode 21 - Description 22 * - ``erase_full_flash`` 23 - u8 24 - runtime 25 - erase_full_flash parameter is used to check if full erase is required for 26 the device during firmware flashing. 27 If set, Full nand erase command will be sent to the device. By default, 28 only conditional erase support is enabled. 29 30 31 Flash Update 32 ============ 33 34 The ``iosm`` driver implements support for flash update using the 35 ``devlink-flash`` interface. 36 37 It supports updating the device flash using a combined flash image which contains 38 the Bootloader images and other modem software images. 39 40 The driver uses DEVLINK_SUPPORT_FLASH_UPDATE_COMPONENT to identify type of 41 firmware image that need to be flashed as requested by user space application. 42 Supported firmware image types. 43 44 .. list-table:: Firmware Image types 45 :widths: 15 85 46 47 * - Name 48 - Description 49 * - ``PSI RAM`` 50 - Primary Signed Image 51 * - ``EBL`` 52 - External Bootloader 53 * - ``FLS`` 54 - Modem Software Image 55 56 PSI RAM and EBL are the RAM images which are injected to the device when the 57 device is in BOOT ROM stage. Once this is successful, the actual modem firmware 58 image is flashed to the device. The modem software image contains multiple files 59 each having one secure bin file and at least one Loadmap/Region file. For flashing 60 these files, appropriate commands are sent to the modem device along with the 61 data required for flashing. The data like region count and address of each region 62 has to be passed to the driver using the devlink param command. 63 64 If the device has to be fully erased before firmware flashing, user application 65 need to set the erase_full_flash parameter using devlink param command. 66 By default, conditional erase feature is supported. 67 68 Flash Commands: 69 =============== 70 1) When modem is in Boot ROM stage, user can use below command to inject PSI RAM 71 image using devlink flash command. 72 73 $ devlink dev flash pci/0000:02:00.0 file <PSI_RAM_File_name> 74 75 2) If user want to do a full erase, below command need to be issued to set the 76 erase full flash param (To be set only if full erase required). 77 78 $ devlink dev param set pci/0000:02:00.0 name erase_full_flash value true cmode runtime 79 80 3) Inject EBL after the modem is in PSI stage. 81 82 $ devlink dev flash pci/0000:02:00.0 file <EBL_File_name> 83 84 4) Once EBL is injected successfully, then the actual firmware flashing takes 85 place. Below is the sequence of commands used for each of the firmware images. 86 87 a) Flash secure bin file. 88 89 $ devlink dev flash pci/0000:02:00.0 file <Secure_bin_file_name> 90 91 b) Flashing the Loadmap/Region file 92 93 $ devlink dev flash pci/0000:02:00.0 file <Load_map_file_name> 94 95 Regions 96 ======= 97 98 The ``iosm`` driver supports dumping the coredump logs. 99 100 In case a firmware encounters an exception, a snapshot will be taken by the 101 driver. Following regions are accessed for device internal data. 102 103 .. list-table:: Regions implemented 104 :widths: 15 85 105 106 * - Name 107 - Description 108 * - ``report.json`` 109 - The summary of exception details logged as part of this region. 110 * - ``coredump.fcd`` 111 - This region contains the details related to the exception occurred in the 112 device (RAM dump). 113 * - ``cdd.log`` 114 - This region contains the logs related to the modem CDD driver. 115 * - ``eeprom.bin`` 116 - This region contains the eeprom logs. 117 * - ``bootcore_trace.bin`` 118 - This region contains the current instance of bootloader logs. 119 * - ``bootcore_prev_trace.bin`` 120 - This region contains the previous instance of bootloader logs. 121 122 123 Region commands 124 =============== 125 126 $ devlink region show 127 128 $ devlink region new pci/0000:02:00.0/report.json 129 130 $ devlink region dump pci/0000:02:00.0/report.json snapshot 0 131 132 $ devlink region del pci/0000:02:00.0/report.json snapshot 0 133 134 $ devlink region new pci/0000:02:00.0/coredump.fcd 135 136 $ devlink region dump pci/0000:02:00.0/coredump.fcd snapshot 1 137 138 $ devlink region del pci/0000:02:00.0/coredump.fcd snapshot 1 139 140 $ devlink region new pci/0000:02:00.0/cdd.log 141 142 $ devlink region dump pci/0000:02:00.0/cdd.log snapshot 2 143 144 $ devlink region del pci/0000:02:00.0/cdd.log snapshot 2 145 146 $ devlink region new pci/0000:02:00.0/eeprom.bin 147 148 $ devlink region dump pci/0000:02:00.0/eeprom.bin snapshot 3 149 150 $ devlink region del pci/0000:02:00.0/eeprom.bin snapshot 3 151 152 $ devlink region new pci/0000:02:00.0/bootcore_trace.bin 153 154 $ devlink region dump pci/0000:02:00.0/bootcore_trace.bin snapshot 4 155 156 $ devlink region del pci/0000:02:00.0/bootcore_trace.bin snapshot 4 157 158 $ devlink region new pci/0000:02:00.0/bootcore_prev_trace.bin 159 160 $ devlink region dump pci/0000:02:00.0/bootcore_prev_trace.bin snapshot 5 161 162 $ devlink region del pci/0000:02:00.0/bootcore_prev_trace.bin snapshot 5
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.