On Thu, 27 Aug 2026 17:20:50 +0200, Oleksii Kurochko 
<[email protected]> wrote:
> vstimecmp is a 64-bit CSR independently of XLEN, which is why it is
> written with csr_write64(). On RV32 that macro splits the value into
> the vstimecmp/vstimecmph pair, so passing ULONG_MAX (0xffffffff there)
> writes all ones to the low half and zero to the high half, leaving the
> CSR at 0x00000000ffffffff rather than at its maximum. A VS-timer irq
> would then become pending as soon as (time + htimedelta) reaches 2^32,
> which is exactly what the code is trying to avoid.
> 
> [...]

Reviewed-by: Baptiste Le Duc <[email protected]>

-- 
Baptiste Le Duc <[email protected]>

Reply via email to