Visible to Intel only — GUID: dai1571159481955
Ixiasoft
Visible to Intel only — GUID: dai1571159481955
Ixiasoft
7.5.2. Watchdog Timeout and max retry Operation
- RSU handling of watchdog timeouts.
- max retry feature, which allows each image up to three times to load.
- RSU notify, which allows the HPS software state to be reported and retrieved after a watchdog timeout.
- Clearing the RSU status error fields.
- Resetting the current retry counter value.
- Power cycle the board, boot Linux*, and display the status – it shows the P2 image running, as it is the highest priority:
root@linux:~# ./rsu_client --log VERSION: 0x00000202 STATE: 0x00000000 CURRENT IMAGE: 0x0000000002000000 FAIL IMAGE: 0x0000000000000000 ERROR LOC: 0x00000000 ERROR DETAILS: 0x00000000 RETRY COUNTER: 0x00000000 Operation completed
What do the version 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:
root@linux:~# ./rsu_client --display-max-retry max_retry = 3 Operation completed
Note: The max_retry option must be queried from U-Boot first, in order for it to be available on Linux. - Enable the watchdog but do not service it, as this produces a timeout, and restarts Linux:
root@linux:~# echo "something" > /dev/watchdog [ 603.649746] watchdog: watchdog0: watchdog did not stop!
- Wait for Linux* to restart after the watchdog timeout, then display the log:
root@linux:~# ./rsu_client --log VERSION: 0x0ACF0202 STATE: 0xF0060002 CURRENT IMAGE: 0x0000000002000000 FAIL IMAGE: 0x0000000002000000 ERROR LOC: 0x00000000 ERROR DETAILS: 0x00000000 RETRY COUNTER: 0x00000001 Operation completed
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 U-Boot loading Linux (0x0002).
- Clear the error status so we can see the next errors. Query the status to show the errors were cleared:
root@linux:~# ./rsu_client --clear-error-status Operation completed root@linux:~# ./rsu_client --log VERSION: 0x00000202 STATE: 0x00000000 CURRENT IMAGE: 0x0000000002000000 FAIL IMAGE: 0x0000000000000000 ERROR LOC: 0x00000000 ERROR DETAILS: 0x00000000 RETRY COUNTER: 0x00000001 Operation completed
- Cause another watchdog timeout and wait for Linux* to restart. After the restart, query the RSU log and observe that the retry counter is now two:
root@linux:~# ./rsu_client --log VERSION: 0x0ACF0202 STATE: 0xF0060002 CURRENT IMAGE: 0x0000000002000000 FAIL IMAGE: 0x0000000002000000 ERROR LOC: 0x00000000 ERROR DETAILS: 0x00000000 RETRY COUNTER: 0x00000002 Operation completed
- Clear the error status so we can see the next errors.
- Notify the SDM of the HPS execution stage as a 16bit number:
root@linux:~# ./rsu_client --notify 0x1234 Operation completed
- Cause another watchdog timeout and watch for Linux* to restart. After the restart, query the RSU log:
root@linux:~# ./rsu_client --log VERSION: 0x0ACF0202 STATE: 0xF0061234 CURRENT IMAGE: 0x0000000001000000 FAIL IMAGE: 0x0000000002000000 ERROR LOC: 0x00000000 ERROR DETAILS: 0x00000000 RETRY COUNTER: 0x00000000 Operation completed
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 the 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 error status so we can see the next errors.
- Cause a watchdog timeout and display the status - it shows a retry counter value of one:
root@linux:~# ./rsu_client --log VERSION: 0x0ACF0202 STATE: 0xF0060002 CURRENT IMAGE: 0x0000000001000000 FAIL IMAGE: 0x0000000001000000 ERROR LOC: 0x00000000 ERROR DETAILS: 0x00000000 RETRY COUNTER: 0x00000001 Operation completed
- Use the RSU client to reset the current retry counter value to zero, and query the status again to confirm it:
rroot@linux:~# ./rsu_client --reset-retry-counter Operation completed root@linux:~# ./rsu_client --log VERSION: 0x0ACF0202 STATE: 0xF0060002 CURRENT IMAGE: 0x0000000001000000 FAIL IMAGE: 0x0000000001000000 ERROR LOC: 0x00000000 ERROR DETAILS: 0x00000000 RETRY COUNTER: 0x00000000 Operation completed