On Mon, 18 May 2026 at 08:34, Corvin Köhne <[email protected]> wrote:
>
> From: YannickV <[email protected]>
>
> Add a clock input to a9gtimer, arm_mptimer and a9mpcore. a9mpcore
> distributes the clock to the other timers. If no clock is
> connected, falls back to 100 MHz for backward compatibility with
> existing machine types.
>
> Frequency calculation now uses the input clock and prescaler
> values according to ARM Cortex-A9 MPCore Technical Reference Manual.
>
> More information about the A9MPCore timers can be found here:
> https://developer.arm.com/documentation/ddi0407/c/timers-and-watchdog-registers?lang=en
>
> Signed-off-by: YannickV <[email protected]>

> -/* Return conversion factor from mpcore timer ticks to qemu timer ticks.  */
> -static inline uint32_t timerblock_scale(uint32_t control)
> +static inline uint32_t timerblock_scale(TimerBlock *tb, uint32_t control)
>  {
> -    return (((control >> 8) & 0xff) + 1) * 10;
> +    uint64_t prescale = (((control >> 8) & 0xff) + 1);
> +    uint64_t clk_hz = clock_get_hz(tb->clk);
> +    assert(clk_hz != 0);
> +    return muldiv64(prescale, NANOSECONDS_PER_SECOND, clk_hz);
>  }


This causes "make check" to fail, because we hit the assertion
in various of the qtests. Could you investigate, please, and make
sure you have a clean pass of "make check" and "make check-functional"?

thanks
-- PMM

Reply via email to