Visible to Intel only — GUID: jto1540272334080
Ixiasoft
Visible to Intel only — GUID: jto1540272334080
Ixiasoft
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.
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.
- 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.
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.
- Create the application image, targeting the INITIAL_ADDRESS.
- Read the 32-bit value from offset 0x1F00 of the application image to determine the number of sections.
- For <s>= 1 to number_of_sections:
- section_pointer = read the 64-bit section pointer from 0x1F00 + (s * 8)
- Subtract INITIAL_ADDRESS from section_pointer
- Add NEW_ADDRESS to section_pointer
- Store updated section_pointer
- 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:
- Swap the bits of each byte so that the bits occur in reverse order and compute the CRC.
- Swap the bytes of the computed CRC32 value to appear in reverse order.
- Swap the bits in each byte of the CRC32 value.
- Write the CRC32 value to flash.
For more information, refer to Creating the Application Image.