Intel® Agilex™ Hard Processor System Remote System Update User Guide

ID 683184
Date 7/13/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

3.2.4. Application Image Layout

The application image comprises SDM firmware and the configuration data. The configuration data includes up to four sections. The SDM firmware contains pointers to those sections. The table below shows the location of the number of sections and the section pointers in a application image.

Table 8.  Application Image Section Pointers
Offset Size (in bytes) Description
0x1F00 4 Number of sections
   
0x1F08 8 Address of 1st section
0x1F10 8 Address of 2nd section
0x1F18 8 Address of 3rd section
0x1F20 8 Address of 4th section
   
0x1FFC 4 CRC32 of 0x1000 to 0x1FFB

The section pointers must match the actual location of the FPGA image in flash. Two options are available to meet this requirement:

  • You can generate the application image to match the actual location in quad SPI flash memory. This option may not be practical as different systems may have a different set of updates applied, which may result in different slots being suitable to store the new application image.
  • You can generate the application image as if it is located at address zero, then update the pointers to match the actual location.
    • In Intel® Quartus® Prime software version 21.1 or later, a Use relative address option is the default option to generate a single application bitstream. You do not have to specify the start address since you can program the image to any available location in the QSPI flash memory. To load the image, you must correctly point to the starting address of the stored image in the flash memory.

      If you choose to disable this option, unselect the Use relative address checkbox and provide the Start address for the image in flash memory. For more information, refer to Generating an Application Image in the Intel® Stratix® 10 Configuration User Guide.

When using the HPS to manage RSU, both U-Boot and LIBRSU clients implement the below procedure to relocate application images targeting address zero in the actual destination slot address.

The procedure to update the pointers from an application image created for INITIAL_ADDRESS to NEW_ADDRESS is:
  1. Create the application image, targeting the INITIAL_ADDRESS.
  2. Read the 32-bit value from offset 0x1F00 of the application image to determine the number of sections.
  3. For <s>= 1 to number_of_sections:
    1. section_pointer = read the 64-bit section pointer from 0x1F00 + (s * 8)
    2. Subtract INITIAL_ADDRESS from section_pointer
    3. Add NEW_ADDRESS to section_pointer
    4. Store updated section_pointer
  4. Recompute the CRC32 for addresses 0x1000 to 0x1FFB. Store the new value at offset 0x1FFC. The CRC32 value must be computed on a copy of the data using the following procedure:
    1. Swap the bits of each byte so that the bits occur in reverse order and compute the CRC.
    2. Swap the bytes of the computed CRC32 value to appear in reverse order.
    3. Swap the bits in each byte of the CRC32 value.
    4. Write the CRC32 value to flash.

For more information, refer to Creating the Application Image.

Note: The factory update image has a different format, which requires a different procedure for the pointer updates. When using the HPS to manage RSU, both U-Boot and LIBRSU clients implement this procedure for relocating the factory update image.
Note: The combined application image has a different format, with no pointers that need to be relocated. The image can be placed unmodified in flash at any address.