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