Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable system WDT with timeout of 8s #487

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Enable system WDT with timeout of 8s #487

wants to merge 4 commits into from

Conversation

crawfxrd
Copy link
Member

@crawfxrd crawfxrd commented Jul 16, 2024

Enable WDT to ensure the system:

  • Does not hang processing any task, such as previous cases of PECI
    commands never completing.
  • Does not take longer than the timeout period to complete all
    outstanding tasks.

A timeout of 8s is used to remain close to the existing use of the WDT
in scratch ROM, which was set to 10s.

Ref: #389

Testing

  • That it works as intended:
    1. Flash custom build with debug logging enabled and wdt_kick removed from main loop
    2. Plug in the unit
    3. Observe EC init message ("System76 EC board...") occurs after ~8 seconds
    4. A second behaves like normal
  • Standard firmware validation tasks do not result in unexpected power off

TODO

  • Allow user to still boot system in case of WDT being constantly triggered
    1. Determine if last reset source (RSTS[1:0]) is external WDT Done
    2. Boot with WDT, other functions disabled? (recovery/emergency/crisis mode)
    3. Propagate error to system firmware, OS

Enable WDT to ensure the system:

- Does not hang processing any task, such as previous cases of PECI
  commands never completing.
- Does not take longer than the timeout period to complete all
  outstanding tasks.

A timeout of 8s is used to remain close to the existing use of the WDT
in scratch ROM, which was set to 10s.

Signed-off-by: Tim Crawford <[email protected]>
Prevent a case where the board is unbootable due to WDT continuously
timing out. May allow recovery from OS depending on the cause.

Signed-off-by: Tim Crawford <[email protected]>
@crawfxrd crawfxrd marked this pull request as ready for review December 5, 2024 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant