Intel® Stratix® 10 Hard Processor System Remote System Update User Guide

ID 683021
Date 4/05/2023
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.1. Absolute Application Image Layout

This section presents the layout of an absolute application image. Starting with Quartus version 21.1 relative images were introduced, and the absolute images are now deprecated. It is recommended to only use relative images.

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 by passing the “-o start_address=0x0” option to the Programming File Generator, then update the pointers to match the actual location.

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.
Note: The absolute factory update image and the absolute decision firmware update image have 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 absolute factory update image and the absolute decision firmware update image.
Note: The combined application image is always relative, with no pointers that need to be relocated. The image can be placed unmodified in flash at any address.