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

ID 683184
Date 6/09/2023
Public

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

Document Table of Contents

7.3.5.1. Corrupted Decision Firmware

This example uses U-Boot commands to demonstrate detecting that a decision firmware copy is corrupted, and recovering it by running a decision firmware update image.
Note: The commands listed in this example assume the initial flash image (JIC) was written to flash, with no other changes.
  1. Power cycle the board, boot to U-Boot prompt.
  2. Display the RSU status:
    SOCFPGA # rsu status_log
    Current Image   : 0x01000000
    Last Fail Image : 0x00000000
    State           : 0x00000000
    Version         : 0x00000202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000000

    The top four bits of the state field are 0x0 which means the currently used decision firmware index is zero. There are no errors.

  3. Display the decision firmware status:
    SOCFPGA # rsu display_dcmf_status
    DCMF0: OK
    DCMF1: OK
    DCMF2: OK
    DCMF3: OK

    The command compares the currently used decision firmware copy 0 with the other copies, and displays that all decision firmware copies are fine.

  4. Corrupt decision firmware copies 0 and 2:
    SOCFPGA # sf probe
    SF: Detected mt25qu02g with page size 256 Bytes, erase size 4 KiB, total 256 MiB
    SOCFPGA # sf erase 0 0x1000
    SF: 4096 bytes @ 0x0 Erased: OK
    SOCFPGA # sf erase 0x100000 0x1000
    SF: 4096 bytes @ 0x100000 Erased: OK
  5. Power cycle the board, boot to U-Boot prompt, display the RSU status and decision firmware status:
    SOCFPGA # rsu status_log
    Current Image   : 0x01000000
    Last Fail Image : 0x00000000
    State           : 0x00000000
    Version         : 0x10000202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000000
    SOCFPGA # rsu display_dcmf_status
    DCMF0: Corrupted
    DCMF1: OK
    DCMF2: Corrupted
    DCMF3: OK

    The currently used copy of the decision firmware is 1, as indicated by top four bits of the version field. The decision firmware copies 0 and 2 are detected as corrupted.

  6. Erase an unused slot, add the decision firmware update image to the slot, verify it was written fine, and confirm it is now the highest priority slot:
    SOCFPGA # rsu slot_erase 2
    Slot 2 erased.
    SOCFPGA # fatload mmc 0:1 ${loadaddr} decision_firmware_update.rpd
    151552 bytes read in 9 ms (16.1 MiB/s)
    SOCFPGA # rsu slot_program_factory_update_buf 2 ${loadaddr} ${filesize}
    Slot 2 was programmed with buffer=0x0000000002000000 size=151552.
    SOCFPGA # rsu slot_verify_buf 2 ${loadaddr} ${filesize}
    Slot 2 was verified with buffer=0x0000000002000000 size=151552.
    SOCFPGA # rsu slot_get_info 2
    NAME: P3
    OFFSET: 0x0000000003000000
    SIZE: 0x01000000
    PRIORITY: 1
  7. Pass control to the devision firmware update image:
    SOCFPGA # rsu slot_load 2
  8. The decision firmware update image writes new decision firmware copies and new decision firmware data to flash, remove itself from CPB, then pass control to the highest priority image.
  9. Stop at U-Boot prompt and confirm the decision firmware copies are all good, the decision firmware update image was removed from CPB, and the highest priority image is running:
    SOCFPGA # rsu status_log 
    Current Image   : 0x01000000
    Last Fail Image : 0x00000000
    State           : 0x00000000
    Version         : 0x00000202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000000
    SOCFPGA # rsu display_dcmf_status
    DCMF0: OK
    DCMF1: OK
    DCMF2: OK
    DCMF3: OK
    SOCFPGA # rsu slot_get_info 2
    NAME: P3
    OFFSET: 0x0000000003000000
    SIZE: 0x01000000
    PRIORITY: [disabled]