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

ID 683021
Date 11/10/2021
Public

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

Document Table of Contents

7.5.5.1. Corrupted Decision Firmware

This example uses the RSU client to demonstrate detecting that some decision firmware copies are corrupted, and recovering them by running a decision firmware update image. The task uses U-Boot to corrupt flash, as it is the only component which has direct access to decision firmware.
Note: The commands listed in this example assume the initial flash image (JIC) was written to flash, with no other changes.
Note: The rsu display_dcmf_version command is called automatically by current U-Boot before booting Linux. This is requried to have the status availabe in Linux.
  1. Power cycle the board, boot up to Linux.
  2. Query RSU status:
    root@linux:~# ./rsu_client --log
          VERSION: 0x00000202
            STATE: 0x00000000
    CURRENT IMAGE: 0x0000000001000000
       FAIL IMAGE: 0x0000000000000000
        ERROR LOC: 0x00000000
    ERROR DETAILS: 0x00000000
    RETRY COUNTER: 0x00000000
    Operation completed

    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 decision firmware status, it shows no corruptions:
    root@linux:~# ./rsu_client --display-dcmf-status
    DCMF0: OK
    DCMF1: OK
    DCMF2: OK
    DCMF3: OK
    Operation completed
  4. Power cycle board, stop to U-Boot, 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 0x80000 0x1000
    SF: 4096 bytes @ 0x80000 Erased: OK
  5. Power cycle the board, boot to Linux, query the RSU status and decision firmware status:
    root@linux:~# ./rsu_client --log
          VERSION: 0x10000202
            STATE: 0x00000000
    CURRENT IMAGE: 0x0000000001000000
       FAIL IMAGE: 0x0000000000000000
        ERROR LOC: 0x00000000
    ERROR DETAILS: 0x00000000
    RETRY COUNTER: 0x00000000
    Operation completed
    root@linux:~# ./rsu_client --display-dcmf-status
    DCMF0: Corrupted
    DCMF1: OK
    DCMF2: Corrupted
    DCMF3: OK
    Operation completed

    The currently used copy of the decision firmware is 1, as indicated by top four bits of the version field. There are no errors reported by firmware. 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 running slot:
    root@linux:~# ./rsu_client --erase 2
    Operation completed
    root@linux:~# ./rsu_client --add-factory-update decision_firmware_update.rpd --slot 2
    Operation completed
    root@linux:~# ./rsu_client --verify decision_firmware_update.rpd --slot 2
    Operation completed
    root@linux:~# ./rsu_client --list 2
          NAME: P3
        OFFSET: 0x0000000003000000
          SIZE: 0x01000000
      PRIORITY: 1
    Operation completed
  7. Pass control to the devision firmware update image:
    root@linux:~# ./rsu_client --request 2
    Operation completed
    root@linux:~# reboot
  8. Linux shuts down, then 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. Let it boot to Linux.
  9. In Linux, query the RSU status and display the DCMF status:
    root@linux:~# ./rsu_client --log
          VERSION: 0x00000202
            STATE: 0x00000000
    CURRENT IMAGE: 0x0000000001000000
       FAIL IMAGE: 0x0000000000000000
        ERROR LOC: 0x00000000
    ERROR DETAILS: 0x00000000
    RETRY COUNTER: 0x00000000
    Operation completed
    root@linux:~# ./rsu_client --display-dcmf-status
    DCMF0: OK
    DCMF1: OK
    DCMF2: OK
    DCMF3: OK
    Operation completed

    All decision firmware copies are reported as fine, and copy 0 is the one currently used, as expected.