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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Enable system WDT with timeout of 8s #487

wants to merge 3 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 every ~8.1 seconds
  • 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
    2. Boot with WDT, other functions disabled? (recovery/emergency/crisis mode)
    3. Propagate error to system firmware, OS

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
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 <tcrawford@system76.com>
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