From: Roque Arcudia Hernandez <roqueh@google.com>
To: peter.maydell@linaro.org, farosas@suse.de, lvivier@redhat.com,
slongfield@google.com, komlodi@google.com, pbonzini@redhat.com,
venture@google.com
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
Roque Arcudia Hernandez <roqueh@google.com>
Subject: [PATCH 0/5] Make WDOGCONTROL.INTEN the counter enable of the CMSDK APB Watchdog
Date: Fri, 15 Nov 2024 16:03:23 +0000 [thread overview]
Message-ID: <20241115160328.1650269-1-roqueh@google.com> (raw)
The following patchset tries to address an issue where the watchdog
counter was running as soon as the device is out of reset. This
created a few problems with the firmware under test. It was pointed
out that the firmware under test was already working on an emulator
using the real RTL. Further review showed that the WDOGCONTROL.INTEN
is also expected to be the counter enable as it is defined in this
page from ARM:
https://developer.arm.com/documentation/ddi0479/d/apb-components/apb-watchdog/programmers-model?lang=en
| | Enable the interrupt event, WDOGINT. Set to 1 to
| | enable the counter and the interrupt, or to 0 to
[0] | INTEN | disable the counter and interrupt. Reloads the
| | counter from the value in WDOGLOAD when the interrupt
| | is enabled, after previously being disabled.
The second half of the patch is focused on adding tests for this
behavior. It was required to modify the test to be able to run some
test cases in the MPS2 since the the stellaris machine had 2 issues:
- The stellaris machine did not run the counter out of reset
because of the way it is reset. The function
ssys_calculate_system_clock is not called until the reset phase
stellaris_sys_reset_hold which is after the watchdog executes its
reset, so the watchdog would not start the counter due to the
clock not being set up at the time of reset.
- The Stellaris machine uses a derived watchdog and not the
original CMSDK one which has a special behavior where it cannot
be stopped.
The MPS2 machine on the other hand uses the standard CMSDK watchdog
and could expose the problems we were dealing with.
Roque Arcudia Hernandez (5):
hw/watchdog/cmsdk_apb_watchdog: Fix broken link
hw/watchdog/cmsdk_apb_watchdog: Fix INTEN issues
tests/qtest/cmsdk-apb-watchdog-test: Parameterize tests
tests/qtest/cmsdk-apb-watchdog-test: Don't abort on assertion failure
tests/qtest/cmsdk-apb-watchdog-test: Test INTEN as counter enable
hw/watchdog/cmsdk-apb-watchdog.c | 38 ++-
tests/qtest/cmsdk-apb-watchdog-test.c | 328 +++++++++++++++++++++++---
tests/qtest/meson.build | 3 +-
3 files changed, 329 insertions(+), 40 deletions(-)
--
2.47.0.338.g60cca15819-goog
next reply other threads:[~2024-11-15 16:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 16:03 Roque Arcudia Hernandez [this message]
2024-11-15 16:03 ` [PATCH 1/5] hw/watchdog/cmsdk_apb_watchdog: Fix broken link Roque Arcudia Hernandez
2024-11-15 16:36 ` Philippe Mathieu-Daudé
2024-11-15 16:03 ` [PATCH 2/5] hw/watchdog/cmsdk_apb_watchdog: Fix INTEN issues Roque Arcudia Hernandez
2024-11-15 16:03 ` [PATCH 3/5] tests/qtest/cmsdk-apb-watchdog-test: Parameterize tests Roque Arcudia Hernandez
2024-11-15 16:03 ` [PATCH 4/5] tests/qtest/cmsdk-apb-watchdog-test: Don't abort on assertion failure Roque Arcudia Hernandez
2024-11-15 16:03 ` [PATCH 5/5] tests/qtest/cmsdk-apb-watchdog-test: Test INTEN as counter enable Roque Arcudia Hernandez
2024-11-15 17:21 ` [PATCH 0/5] Make WDOGCONTROL.INTEN the counter enable of the CMSDK APB Watchdog Roque Arcudia Hernandez
2024-11-15 17:25 ` Peter Maydell
2024-11-18 13:20 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241115160328.1650269-1-roqueh@google.com \
--to=roqueh@google.com \
--cc=farosas@suse.de \
--cc=komlodi@google.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=slongfield@google.com \
--cc=venture@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.