hal/armv7r/zynqmp/zynqmp.c: update reboot reason lockstep and wdt#432
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds support for storing and clearing latched PMU error status registers during initialization on ZynqMP, specifically for RPU lockstep and LPD watchdog errors. The review feedback identifies two critical issues: first, a duplicate read of crl_apb_reset_reason overwrites and erases the previously retrieved reset flags; second, the watchdog timeout check uses the incorrect constant (ZYNQ_RESET_REASON_LPD_SWDT instead of PMU_ERR_LPD_SWDT) and hardcodes the flag value 0x20000 instead of using the defined macro.
damianloew
left a comment
There was a problem hiding this comment.
Please address the comments, they seem to be valid
damianloew
left a comment
There was a problem hiding this comment.
The current commit message is readable, but let's follow the rules from Git Commit Message Guidelines [YT]
|
@damianloew I fixed issues raised in review and also update the commit message so it complies now with Git Commit Message Guidelines [YT] |
c633efb to
8dd2097
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for reading, storing, and clearing latched PMU error status registers during ZynqMP initialization, specifically for RPU lockstep and LPD watchdog timer errors. The review feedback notes that using an else if condition prevents both independent error flags from being captured if they occur simultaneously, and suggests using separate if statements instead.
damianloew
left a comment
There was a problem hiding this comment.
LGTM, thanks for all of the changes
julianuziemblo
left a comment
There was a problem hiding this comment.
LGTM, please rebase
PMU_ERROR_STATUS registers are examined during reboot reason investigation. Once read both regs are clear to ensure erroneous reset is not trigger during lock step or watchdog configuration. Functional working has been confirmed on ZCU104 board with watchdog and soft reset. YT: DO-836
8dd2097 to
3b88ec4
Compare


This PR introduces better reboot reason investigation for ZynqMP RPU (ARMV7r) target.
Description
PMU_ERROR_STATUS registers are examined during reboot reason investigation.
Once read both regs are clear to ensure erroneous reset is not trigger during lock step or watchdog configuration.
Motivation and Context
Change is introduced to ensure Watchdog handlers for ZynqMP RPU are properly configures.
There was also intention to ensure the lock step vs watchdog reboot info is also available to user.
Types of changes
How Has This Been Tested?
Tests are described in:
phoenix-rtos/phoenix-rtos-kernel#789
Checklist:
Special treatment
phoenix-rtos/phoenix-rtos-kernel#789