Visible to Intel only — GUID: ass1606327214197
Ixiasoft
Visible to Intel only — GUID: ass1606327214197
Ixiasoft
7.3.5.3. Corrupted Configuration Pointer Block
- Power up board, stop at U-Boot prompt.
- Run the rsu list command to display a detailed status, including all the partitions, to determine the location of the SPTs:
SOCFPGA # rsu list RSU: Remote System Update Status Current Image : 0x01000000 Last Fail Image : 0x00000000 State : 0x00000000 Version : 0x00000202 Error location : 0x00000000 Error details : 0x00000000 Retry counter : 0x00000000 RSU: Sub-partition table 0 offset 0x00910000 RSU: Sub-partition table 1 offset 0x00918000 SF: Detected mt25qu02g with page size 256 Bytes, erase size 4 KiB, total 256 MiB RSU: Sub-partition table content BOOT_INFO Offset: 0x0000000000000000 Length: 0x00210000 Flag : 0x00000003 FACTORY_IMAGE Offset: 0x0000000000210000 Length: 0x00700000 Flag : 0x00000003 P1 Offset: 0x0000000001000000 Length: 0x01000000 Flag : 0x00000000 SPT0 Offset: 0x0000000000910000 Length: 0x00008000 Flag : 0x00000001 SPT1 Offset: 0x0000000000918000 Length: 0x00008000 Flag : 0x00000001 CPB0 Offset: 0x0000000000920000 Length: 0x00008000 Flag : 0x00000001 CPB1 Offset: 0x0000000000928000 Length: 0x00008000 Flag : 0x00000001 P2 Offset: 0x0000000002000000 Length: 0x01000000 Flag : 0x00000000 P3 Offset: 0x0000000003000000 Length: 0x01000000 Flag : 0x00000000 RSU: CMF pointer block offset 0x00920000 RSU: CMF pointer block's image pointer list Priority 1 Offset: 0x0000000001000000 nslot: 0
- Corrupt CPB0 by erasing the corresponding flash area:
SOCFPGA # sf probe SF: Detected mt25qu02g with page size 256 Bytes, erase size 4 KiB, total 256 MiB SOCFPGA # sf erase 0x0920000 0x1000 SF: 4096 bytes @ 0x920000 Erased: OK
- Power cycle the board, the stop to U-Boot prompt and query the RSU status:
SOCFPGA # rsu status_log FW detects corrupted CPB0 but CPB1 is fine Restoring CPB0 Current Image : 0x01000000 Last Fail Image : 0x00000000 State : 0xf004d010 Version : 0x0dcf0202 Error location : 0x00000000 Error details : 0x00000000 Retry counter : 0x00000000
The State field has the special error code 0xf004d010 which indicates that CPB0 was corrupted. The Version field indicates that the error was reported by the decision firmware (0xDCF). The rsu_init function which is called first time an U-Boot RSU command is executed detected the CPB corruption and recovered CPB0 from CPB1.
- Save the CPB contents to a file, to be used later for recovery.
SOCFPGA # rsu save_cpb ${loadaddr} 4100 bytes CPB data saved SOCFPGA # fatwrite mmc 0:1 ${loadaddr} cpb-backup.bin ${filesize} 4100 bytes written
- Corrupt both CPBs by erasing the flash at their location:
SOCFPGA # sf probe SF: Detected mt25qu02g with page size 256 Bytes, erase size 4 KiB, total 256 MiB SOCFPGA # sf erase 0x0920000 0x1000 SF: 4096 bytes @ 0x920000 Erased: OK SOCFPGA # sf erase 0x0928000 0x1000 SF: 4096 bytes @ 0x928000 Erased: OK
- Power cycle the board, boot to U-Boot prompt and query RSU status:
SOCFPGA # rsu status_log FW detects both CPBs corrupted Current Image : 0x00210000 Last Fail Image : 0x00000000 State : 0xf004d011 Version : 0x0dcf0202 Error location : 0x00000000 Error details : 0x00000000 Retry counter : 0x00000000
The Current Image is reported as being the factory image, as expected. The State field has the special error code 0xf004d011 which indicates that both CPBs were corrupted. The Version field indicates that the error was reported by the decision firmware (0xDCF). The rsu_init function which is called first time an U-Boot RSU command is executed detected and reported that both CPBs are corrupted.
- Try to run a command which requires a valid CPB - it is rejected:
SOCFPGA # rsu slot_get_info 0 corrupted CPB --run rsu create_empty_cpb or rsu restore_cpb <address> first
- Restore the saved CPB from the backup file that we created:
SOCFPGA # fatload mmc 0:1 ${loadaddr} cpb-backup.bin 4100 bytes read in 3 ms (1.3 MiB/s) SOCFPGA # rsu restore_cpb ${loadaddr}
- Clear the errors reported by firmware, as the CPB was restored.
SOCFPGA # rsu clear_error_status
Alternatively you can also power cycle or assert nCONFIG to clear the errors reported by firmware. - Try again to run a command which require a valid CPB - it succeeds:
SOCFPGA # rsu slot_get_info 1 NAME: P2 OFFSET: 0x0000000002000000 SIZE: 0x01000000 PRIORITY: 1