Skip to content

Watchdog Test Issues When the Watchdog Counter Is Slower Than the System Counter #190

@sunnywang-arm

Description

@sunnywang-arm

Raise an issue to have a public record for partners' reference. The test might cause BSA 504 test or other watchdog tests exception.

Offline debugging watchdog tests' exception and unexpected FAILM, and we identified the following issues:

  1. The test hasn't considered the case where the watchdog counter runs slower than the system counter. In such case, the system-counter-based failsafe interrupt fires before the watchdog interrupt and breaks the watchdog tests. Note that the common system‐counter–to–watchdog‐counter frequency ratio could be 1x to 256x.
  2. The test suite sets a uint64 value to a 32 bit register (CNTHP_TVAL_EL2).
  3. A large timout value (-timeout x where x >= 2) may cause overflow.

Therefore, we're working on the solutions below:

  1. Use the system counter frequency value divided by 1024 as watchdog's counter frequency value, so that we can ensure the wathdog interrupt alwasy fires earlier than system-counter-based failsafe interrup.
  2. Change the type of all timer expire variables (such as timer_expire_val, timeout, and so on) from uint64 to uint32.
  3. Create a function that returns "val_get_counter_frequency() / 5" and use it instead of val_get_counter_frequency() to avoid the overflow caused by non-default timeout values (2-5).

Metadata

Metadata

Assignees

Labels

bsaBase System Architecture ACS specific issues/enhancements/questions.sbsaServer Base System Architecture ACS specific issues/enhancements/questions.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions