Provided by: mstflint_4.1.0+1.46.gb1cdaf7-1ubuntu3.1_amd64
NAME
mstflint - Flash Interface
SYNOPSIS
mstflint [OPTIONS] <command> [Parameters] [-d|--device <device>] [--guid <GUID>] [--guids <GUIDS...>] [--mac <MAC>] [--macs <MACs...>] [--uid <UID>] [--blank_guids] [--clear_semaphore] [-h|--help] [--hh] [-i|--image <image>] [--qq] [--nofs] [--allow_psid_change] [--allow_rom_change] [--override_cache_replacement] [--no_flash_verify] [-s|--silent] [-y|--yes] [--no] [--vsd <string>] [--use_image_ps] [--use_image_guids] [--use_image_rom] [--dual_image] [--ignore_dev_data] [--use_fw] [--striped_image] [--banks <bank>] [--log <log_file>] [--flash_params <type, log2size, num_of_flashes>] [-v|--version]
DESCRIPTION
mstflint [OPTIONS] <command> [Parameters] mstflint is a FW (firmware) burning and flash memory operations tool for Mellanox Infiniband HCAs, Ethernet NIC cards, and switch devices.
OPTIONS
mstflint [OPTIONS] <command> [Parameters] -d|--device <device> : Device flash is connected to. Commands affected: all --guid <GUID> : GUID base value. 4 GUIDs are automatically assigned to the following values: guid -> node GUID guid+1 -> port1 guid+2 -> port2 guid+3 -> system image GUID. Note: port2 guid will be assigned even for a single port HCA - The HCA ignores this value. Commands affected: burn, sg --guids <GUIDS...> : 4 GUIDs must be specified here. The specified GUIDs are assigned to the following fields, respectively: node, port1, port2 and system image GUID. Note: port2 guid must be specified even for a single port HCA - The HCA ignores this value. It can be set to 0x0. Commands affected: burn, sg --mac <MAC> : MAC address base value. 2 MACs are automatically assigned to the following values: mac -> port1 mac+1 -> port2 Commands affected: burn, sg --macs <MACs...> : 2 MACs must be specified here. The specified MACs are assigned to port1, port2, respectively. Commands affected: burn, sg Note: -mac/-macs flags are applicable only for Mellanox Technologies ethernet products. --uid <UID> : ConnectIB/SwitchIB only. Derive and set the device UIDs (GUIDs, MACs). UIDs are derived from the given base UID according to Mellanox Methodology Commands affected: burn, sg --blank_guids : Burn the image with blank GUIDs and MACs (where applicable). These values can be set later using the "sg" command (see details below). Commands affected: burn --clear_semaphore : Force clear the flash semaphore on the device. No command is allowed when this flag is used. NOTE: May result in system instability or flash corruption if the device or another application is currently using the flash. Exercise caution. -h|--help : Prints this message and exits --hh : Prints extended command help -i|--image <image> : Binary image file. Commands affected: burn, verify --qq : Run a quick query. When specified, mstflint will not perform full image integrity checks during the query operation. This may shorten execution time when running over slow interfaces (e.g., I2C, MTUSB-1). Commands affected: burn, query --nofs : Burn image in a non failsafe manner. --allow_psid_change : Allow burning a FW image with a different PSID (Parameter Set ID)than the one currently on flash. Note that changing a PSID may cause the device to malfunction. Use only if you know what you are doing --allow_rom_change : Allow burning/removing a ROM to/from FW image when product version is present. Use only if you know what you are doing --override_cache_replacement : On SwitchX/ConnectIB devices: Allow accessing the flash even if the cache replacement mode is enabled. NOTE: This flag is intended for advanced users only. Running in this mode may cause the firmware to hang. --no_flash_verify : Do not verify each write on the flash. -s|--silent : Do not print burn progress flyer. Commands affected: burn -y|--yes : Non interactive mode - assume answer "yes" to all questions. Commands affected: all --no : Non interactive mode - assume answer "no" to all questions. Commands affected: all --vsd <string> : Write this string, of up to 208 characters, to VSD when burn. --use_image_ps : Burn vsd as appears in the given image - do not keep existing VSD on flash. Commands affected: burn --use_image_guids : Burn (guids/uids/macs) as appears in the given image. Commands affected: burn --use_image_rom : Do not save the ROM which exists in the device. Commands affected: burn --ignore_dev_data : Do not attempt to take device data sections from device(sections will be taken from the image. FS3 Only). Commands affected: burn --use_fw : Access to flash using FW (ConnectX3/ConnectX3Pro Device Only) Commands affected: all --dual_image : Make the burn process burn two images on flash (previously default algorithm). Currentdefault failsafe burn process burns a single image (in alternating locations). Commands affected: burn --striped_image : Use this flag to indicate that the given image file is in a "striped image" format. Commands affected: query verify --banks <bank> : Set the number of attached flash devices (banks) --log <log_file> : Print the burning status to the specified log file --flash_params <type, log2size, num_of_flashes>: Use the given parameters to access the flash instead of reading them from the flash. Supported parameters: Type: The type of the flash, such as: M25PXxx, M25Pxx, N25Q0XX, SST25VFxx, W25QxxBV, W25Xxx, AT25DFxxx, S25FLXXXP. log2size: The log2 of the flash size.num_of_flashes: the number of the flashes connected to the device. -v|--version : Version info.
COMMANDS SUMMARY:
burn|b : Burn flash query|q [full] : Query misc. flash/firmware characteristics, use "full" to get more information. verify|v [showitoc] : Verify entire flash, use "showitoc" to see ITOC headers in FS3 image only. swreset : SW reset the target un-managed switch device. This command is supported only in the In-Band access method. brom <ROM-file> : Burn the specified ROM file on the flash. drom : Remove the ROM section from the flash. rrom <out-file> : Read the ROM section from the flash. bb : Burn Block - Burns the given image as is. No checks are done. sg [guids_num=<num> step_size=<size>] [nocrc] : Set GUIDs. set_vpd [vpd file] : Set read-only VPD (For FS3 image only). sv : Set the VSD. ri <out-file> : Read the fw image on the flash. dc [out-file] : Dump Configuration: print fw configuration file for the given image. dh [out-file] : Dump Hash: dump the hash if it is integrated in the FW image set_key [key] : Set/Update the HW access key which is used to enable/disable access to HW. The key can be provided in the command line or interactively typed after the command is given NOTE: The new key is activated only after the device is reset. hw_access <enable|disable> [key] : Enable/disable the access to the HW. The key can be provided in the command line or interactively typed after the command is given hw <query|set> [ATTR=VAL] : Set/query HW info and flash attributes. erase|e <addr> : Erases sector. rw <addr> : Read one dword from flash ww <addr> <data> : Write one dword to flash wwne <addr> <data> : Write one dword to flash without sector erase wbne <addr> <size> <data ...> : Write a data block to flash without sector erase. wb <data-file> <addr> : Write a data block to flash. rb <addr> <size> [out-file] : Read a data block from flash qrom : query rom in a given image.
COMMANDS DESCRIPTION:
Name: burn Description: Burn flash. Performs failsafe FW update from a raw binary image. Command: burn|b Parameters: None Examples: • mstflint -d 04:00.0 -i image1.bin burn • mstflint -d 04:00.0 -guid 0x2c9000100d050 -i image1.bin b Name: query Description: Query miscellaneous FW and flash parameters. Display FW Version, GUIDs, PSID, and other info. Command: query|q [full] Parameters: None Examples: • mstflint -d 04:00.0 query Name: verify Description: Verify entire flash. Command: verify|v [showitoc] Parameters: None Examples: • mstflint -d 04:00.0 v Name: swreset Description: SW reset the target un-managed switch device. This command is supported only in the In-Band access method. Command: swreset Parameters: None Examples: None Name: brom Description: Burn the specified exp-ROM on the flash. Command: brom <ROM-file> Parameters: file: The exp-ROM file. Examples: • mstflint -d 04:00.0 brom exp-rom.rom Name: drom Description: Remove the exp-ROM from the flash if it is existing. Command: drom Parameters: None Examples: • mstflint -d 04:00.0 drom Name: rrom Description: Read the exp-ROM from the flash if it is existing. Command: rrom <out-file> Parameters: file: filename to write the exp-ROM to. Examples: • mstflint -d 04:00.0 rrom exp-rom.rom Name: bb Description: Burns entire flash verbatim from raw binary image. No checks are done on the flash or on the given image file. No fields (such as VSD or Guids) are read from flash. Command: bb Parameters: None Examples: • mstflint -d 04:00.0 -i image1.bin bb Name: sg Description: Set GUIDs/MACs/UIDs in the given device/image. Use -guid(s), -mac(s) and -uid(s) flags to set the desired values. - On pre-ConnectX devices, the sg command is used in production to apply GUIDs/MACs values to cards that were pre-burnt with blank GUIDs. It is not meant for use in field. On 4th generation devices, this command can operate on both image file and image on flash. If the GUIDs/MACs/UIDs in the image on flash are non-blank, mstflint will re-burn the current image using the given GUIDs/MACs/UIDs. Command: sg [guids_num=<num> step_size=<size>] | [nocrc] Parameters: nocrc: (optional) When specified the mstflint would not update the full image crc after changing the guids num_of_guids: number of GUIDs to be allocated per physical port (FS3 Only) step_size: step size between GUIDs (FS3 Only) Examples: • mstflint -d 04:00.0 -guid 0x0002c9000100d050 sg • mstflint -d 08:00.0 -guid 0x0002c9000100d050 -mac 0x0002c900d050 sg Name: set vpd Description: Set Read-only VPD, Set VPD in the given FS3 image. Command: set_vpd [vpd file] Parameters: vpd file: bin file containing the vpd data Examples: • mstflint -i fw_image.bin set_vpd vpd.bin Name: sv Description: Set VSD in the given device/image. Use -vsd flag to set the desired VSD string. Command: sv Parameters: None Examples: • mstflint -d 04:00.0 -vsd VSD_STRING sv Name: ri Description: Read the FW image from flash and write it to a file. Command: ri <out-file> Parameters: file: filename to write the image to (raw binary). Examples: • mstflint -d 04:00.0 ri file.bin Name: dc Description:Print (to screen or to a file) the FW configuration text file used by the image generation process. This command would fail if the image does not contain a FW configuration section. Existence of this section depends on the version of the image generation tool. Command: dc [out-file] Parameters: file: (optional) filename to write the dumped configuration to. If not given, the data is printed to screen. Examples: • mstflint -d 04:00.0 dc Name: dh Description: Print (to screen or to a file) the HASH text file used by the FW. This command would fail if the image does not contain a Hash file. Command: dh [out-file] Parameters: file - (optional) filename to write the dumped tracer hash file to. If not given, the data is printed to screen. Examples: • mstflint -d 04:00.0 dh hash.csv Name: set_key Description: Set/Update the HW access key which is used to enable/disable access to HW. Command: set_key [key] Parameters: key: (optional) The new key you intend to set (in hex). Examples: • mstflint -d 04:00.0 set_key 1234deaf5678 Name: hw_access Description: Enable/disable the access to the HW. Command: hw_access <enable|disable> [key] Parameters: <enable/disable>: Specify if you intend to disable or enable the HW access. You will be asked to type a key when you try to enable HW access. key: (optional) The key you intend to use for enabling the HW access. Examples: • mstflint -d 04:00.0 hw_access enable Name: hw Description: Access HW info and flash attributes. Command: hw <query|set> [ATTR=VAL] Parameters: query: query HW info set [ATTR=VAL]: set flash attribure Supported attributes: QuadEn: can be 0 or 1 DummyCycles: can be [1..15] Flash[0|1|2|3].WriteProtected can be: <Top|Bottom>,<1|2|4|8|16|32|64>-<Sectors|SubSectors> Examples: • mstflint -d 04:00.0 hw query • mstflint -d 04:00.0 hw set QuadEn=1 • mstflint -d 04:00.0 hw set Flash1.WriteProtected=Top,1-SubSectors Name: erase Description: Erases a sector that contains specified address. Command: erase|e <addr> Parameters: addr - address of word in sector that you want to erase. Examples: • mstflint -d 04:00.0 erase 0x10000 Name: rw Description: Read one dword from flash. Command: rw <addr> Parameters: addr - address of word to read Examples: • mstflint -d 04:00.0 rw 0x20 Name: ww Description: Write one dword to flash. Note that the utility will read an entire flash sector, modify one word and write the sector back. This may take a few seconds. Command: ww <addr> <data> Parameters: addr - address of word data - value of word Examples: • mstflint -d 04:00.0 ww 0x10008 0x5a445a44 Name: wwne Description: Write one dword to flash without sector erase. Note that the result of operation is undefined and depends on flash type. Usually "bitwise AND" (&) between specified word and previous flash contents will be written to specified address. Command: wwne <addr> <data> Parameters: addr - address of word data - value of word Examples: • mstflint -d 04:00.0 wwne 0x10008 0x5a445a44 Name: wbne Description: Write a block of data to the flash without erasing. Command: wbne <addr> <size> <data ...> Parameters: addr - address of block size - size of data to write in bytes data - data to write - space separated dwords Examples: • mstflint -d 04:00.0 wbne 0x10000 12 0x30000 0x76800 0x5a445a44 Name: wb Description: Write a block of data to the flash. Command: wb <data-file> <addr> Parameters: data-file - file that contains the data to be written addr - address to write the block to Examples: • mstflint -d 04:00.0 wb myData.bin 0x0 Name: rb Description: Read a data block from the flash and write it to a file or to screen. Command: rb <addr> <size> [out-file] Parameters: addr - address of block size - size of data to read in bytes file - filename to write the block (raw binary). If not given, the data is printed to screen. Examples: • mstflint -d 04:00.0 rb 0x10000 100 file.bin Name: qrom Description: query rom in a given image. 'Command: qrom Parameters: None Examples: • mstflint -i fw_image.bin qrom Return values: 0 - Successful completion 1 - An error has occurred 7 - For burn command - FW already updated - burn was aborted. April 2015 mstflint(4.0.0)