On Mon, 22 Apr 2024 at 15:18, Peter Maydell <peter.mayd...@linaro.org> wrote: > I imagine that value gets written into CNTFRQ by TF-A somewhere > along the line (and then read by EDK2 later), though I haven't > quite found where. Plus I notice that the TF-A sbsa-watchdog-timer > assumes that the generic-timer frequency and the watchdog > timer frequency are the same, which is a bit dubious IMHO.
Checking the BSA spec, this is actually correct -- the system watchdog is supposed to run at the generic counter frequency, which will be the same as the one the CPU generic timers use. So we need on the QEMU side to make the sbsa-watchdog device be runtime configurable for frequency and arrange for it to be set the same as the CPU. (We could also arrange this by modelling the memory mapped system counter properly; I have some slightly half-baked patches to do that floating around somewhere. But I'm still not quite sure it's worth the effort needed to try to get them into a fully baked state :-)) thanks -- PMM