Firmware Update Tool

The firmware update tool, hl-fw-loader, updates the firmware of the device from the host side. By default, the tool updates the firmware of all available devices. You can update a specific device by using -d flag.

Updating the Firmware

To update the firmware, follow the below steps:

  1. Remove drivers in this order - habanalabs, habanalabs_cn, habanalabs_en:

    $ sudo modprobe -r <driver name>
    
  2. Reset the device.

  3. Update the new firmware:

    $ hl-fw-loader [<options>]
    
  4. Load the drivers in this order - habanalabs_en, habanalabs_cn, habanalabs:

    $ sudo modprobe <driver name>
    

See Firmware Update Options for the full list of hl-fw-loader options and their description. The below is an example of the tool command line:

$ hl-fw-loader -f <fw file>

Low Level Access to Burn FW

In case the standard method of the FW update fails, you can run a recovery (direct) flash burn by using -r flag:

$ sudo hl-fw-loader –r –f <fw file>

Note

This option is not available for secured OAM.

Firmware Update Options

For the supported options of the firmware update tool, use -h argument. The below table presents all the options available and their description.

Option

Description

-f <fw file>

Path to the firmware file. The default agent file is /lib/firmware/habanalabs/ gaudi/gaudi-agent- fw_loader-fit.itb

Make sure to use the default agent file.

If the default agent file does not exist and no file is specified, f flag allows the hl-fw-loader to use /lib/firmware/habanalabs/ gaudi/gaudi-boot-fit.itb

-d, –device <pci addr>

-d, –device <i2c bus>

The PCI address of the Intel Gaudi device (e.g. 01:00.0). The flag is optional. The default method is to program all the devices in the system.

When running from BMC, the transport is I2C and the device is selected by I2C bus number.

-R

Sends request to reset the device.

-s

Prints the device status.

-r, –recover

Recovery mode. Updates the firmware file directly to flash or EEPROM and starts using the new firmware. Only the primary image is updated. Not operational on secured device.

-p, –prog-only

Program only - depends on recovery mode. Use this option when manual host reboot is needed.

-y, –yes

Answers ‘yes’ to all questions.

Disabled in recovery mode (-r switch).

-h, –help

Prints this help message.

-v, –version

Prints version information and the utility termination.

-t, –timeout <seconds>

Timeout for waiting for device readiness (in seconds).

Default value: 25 seconds

-n, –nvread [[offset]:size]

Reads media raw content such as flash. Offset and size are optional. By default, read the first 1M of the media into an external file.

Applicable only in recovery mode.

–otp

The operation is associated with the OTP. When combining with --nvread, it reads the OTP area in flash.

-T, –trans-force <name>

Forces a specific transport.

–burn-tb

Writes the OTP TB (Top/Bottom) bit register of the Macronix SPI flash.

–debug

Enables debug log level. Default value: Critical

–trace

Enables debug trace level. Default value: Critical

-D, –device-type <device type>n

Enforces specifying device types. Devices not matching the type on PCI/I2C will be ignored. For I2C recovery, the specified type aids detection.

Firmware Update Closure

Gaudi device is open by default for firmware updates via in-band (host or PCI interface). However, there is an option to disable in-band firmware updates. This option does not affect out-of-band updates executed from the BMC.

  1. To execute firmware update closure via in-band, use the following command:

    $ hl-fw_loader -f gaudi3-fw_upd_closure.itb
    
  2. To apply the changes, power cycle the device.

Note

Updating the firmware from out-of-band is always available using PLDM.

  1. To execute firmware update closure from either in-band or out-of-band using the gaudi2-fw_upd_closure.itb file:

    $ hl-fw_loader -f gaudi2-fw_upd_closure.itb
    
  2. To apply the changes, either power cycle the device or use gaudi2-fw_upd_open.itb from out-of-band only (BMC):

    $ hl-fw_loader -f gaudi2-fw_upd_open.itb
    

Note

Updating firmware from out-of-band is always available using the hl-fw-loader tool running on the BMC.