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

ID 683184
Date 2/23/2024
Public
Document Table of Contents

2.6. Loading a Specific Image

The SDM firmware provides a command to load a specific image from flash. The image can be the factory image or one of the application images. You have access to this functionality from both U-Boot and LIBRSU.

When the requested image fails to load and the direct factory image fallback option is enabled, the factory image is loaded. When the direct factory image fallback option is not enabled and the requested image fails to load, the SDM tries to reload the image that was running at the time the command is issued. If this image also fails to load, the SDM then tries to load the highest priority image in the CPB. If the highest priority image in the CPB was the failing image, then it tries to load the second image in the CPB and continues to traverse the pointer table in priority order. If there are no more images left to try in the CPB, then the SDM tries to load the factory image.

For a description of the flow for requesting a specific image, refer to the Configuration Flow Diagrams appendix.

Enabling the max_retry feature allows each image to be tried multiple times. For more information, refer to the Retrying when Configuration Fails section.

Note: The effect of loading a new image on HPS is similar with a power on reset (POR). The SDM HPS_COLD_nRESET pin (if configured) is not asserted by SDM as it would be on a cold reset.
Calling the SDM command to load a specific image causes the following sticky fields from the state reported by SDM to be cleared:
  • failed_image
  • error_details
  • error_location
  • state

When U-Boot issues this SDM command, the SDM immediately resets and wipes both the FPGA and HPS, then it proceeds to load the specified image.

When LIBRSU APIs rsu_slot_load_after_reboot or rsu_slot_load_factory_after_reboot are called, the command is not immediately sent to SDM as this would cause Linux* to abruptly stop. Instead, these LIBRSU APIs cause the ATF SMC handler to make a note to call the SDM command with the specified address next time the reboot Linux* command is executed. This enables the kernel to shut down gracefully before the requested image is loaded.

Note: Unless the Linux* reboot command is issued, calling these LIBRSU APIs has no effect. If the Linux reboot command is configured to trigger a warm reset by passing the reboot=warm parameter to the kernel, calling these LIBRSU APIs has also no effect.7

For more information, refer to the RSU Status and Error Codes section.

7 This depends on the reset implementation in linux-socfpga.