Visible to Intel only — GUID: vmm1571167469620
Ixiasoft
Visible to Intel only — GUID: vmm1571167469620
Ixiasoft
7.4.2. Watchdog and Max Retry Operation
- RSU handling of watchdog timeouts.
- max retry feature, which allows each image to be tried to be loaded up to three times.
- RSU notify, which allows the HPS software state to be reported before and retrieved after a watchdog timeout.
- Clearing the RSU status error fields.
- Resetting the current retry counter value.
- Power-cycle the board, stop U-Boot and check the RSU status log:
SOCFPGA # rsu status_log Current Image : 0x02000000 Last Fail Image : 0x00000000 State : 0x00000000 Version : 0x00000202 Error location : 0x00000000 Error details : 0x00000000 Retry counter : 0x00000000
The application image from slot 1 (partition P2) was loaded, since it is marked as the highest priority in the CPB.
What do the fields mean:- Version field is 0x00000202 —both decision firmware and application firmware RSU interface versions are 2, and the system supports the max retry feature.
- Retry counter is 0x00000000 —first attempt to load this image.
- State is 0x00000000 —No errors to report
- Query and display the max_retry value:
SOCFPGA # rsu display_max_retry max_retry = 3
- Cause a watchdog timeout by setting the timeout value to lowes possible. This prevents U-Boot from being able to service it in time:
SOCFPGA # mw.l 0xffd00204 0
- The watchdog immediately times out, and SDM reloads the same application image, since the max retry parameter is set to three. Look at the U-Boot console and check the status log:
SOCFPGA # rsu status_log Current Image : 0x02000000 Last Fail Image : 0x02000000 State : 0xf0060001 Version : 0x0acf0202 Error location : 0x00000000 Error details : 0x00000000 Retry counter : 0x00000001
The same P2 image is loaded, but the retry counter value is now one, which means this is the second retry for this image to be loaded. The version field shows the last failure was by an application image (0xACF). The state field shows the last error was a watchdog timeout (0xF006) and that the latest notify value from HPS software was from SPL loading U-Boot (0x0001).
- Clear the error status so we can see the next errors. Query the status to show the errors were cleared:
SOCFPGA # rsu clear_error_status SOCFPGA # rsu status_log Current Image : 0x02000000 Last Fail Image : 0x00000000 State : 0x00000000 Version : 0x00000202 Error location : 0x00000000 Error details : 0x00000000 Retry counter : 0x00000001
- Cause another watchdog timeout. At the U-Boot prompt, query the RSU log and observe that the retry counter is now two:
SOCFPGA # rsu status_log Current Image : 0x02000000 Last Fail Image : 0x02000000 State : 0xf0060001 Version : 0x0acf0202 Error location : 0x00000000 Error details : 0x00000000 Retry counter : 0x00000002
- Clear the error status so we can see the next errors.
- Use the notify command to let SDM know the state of HPS software as a 16bit value:
SOCFPGA0 # rsu notify 0x1234
- Cause a watchdog timeout one more time and display the RSU status log after the restart:
SOCFPGA # rsu status_log Current Image : 0x01000000 Last Fail Image : 0x02000000 State : 0xf0061234 Version : 0x0acf0202 Error location : 0x00000000 Error details : 0x00000000 Retry counter : 0x00000000
The SDM loaded the next application image in the CPB (P1), and it reports that the image P2 failed. The state indicates that a watchdog timeout occurred (upper 16 bits = 0xF006) and that the notify value reported by HPS software was 0x1234. The upper 16 bits of version are set to 0x0ACF which means the previous error was reported by the application image firmware. For more information, refer to RSU Status and Error Codes .
- Clear the errors and display the status - it shows no errors:
SOCFPGA # rsu clear_error_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
- Cause a watchdog timeout, boot to U-Boot, and display the status - it shows the retry counter is one:
SOCFPGA # rsu status_log Current Image : 0x01000000 Last Fail Image : 0x01000000 State : 0xf0060001 Version : 0x0acf0202 Error location : 0x00000000 Error details : 0x00000000 Retry counter : 0x00000001
- Reset the current retry counter value to zero and query the status again to confirm it:
SOCFPGA # rsu reset_retry_counter SOCFPGA # rsu status_log Current Image : 0x01000000 Last Fail Image : 0x01000000 State : 0xf0060001 Version : 0x0acf0202 Error location : 0x00000000 Error details : 0x00000000 Retry counter : 0x00000000