From 234e47a7c5226bf04c23f7708057d7298687d864 Mon Sep 17 00:00:00 2001 From: David Harris Date: Fri, 15 Nov 2024 15:37:25 -0800 Subject: [PATCH] MTIMECMP should reset to maximum value for RV32, not just for RV64 --- src/uncore/clint_apb.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uncore/clint_apb.sv b/src/uncore/clint_apb.sv index 76735aaa6..e03745194 100644 --- a/src/uncore/clint_apb.sv +++ b/src/uncore/clint_apb.sv @@ -115,7 +115,7 @@ module clint_apb import cvw::*; #(parameter cvw_t P) ( always_ff @(posedge PCLK) if (~PRESETn) begin MSIP <= 1'b0; - MTIMECMP <= '0; + MTIMECMP <= 64'hFFFFFFFFFFFFFFFF; // Spec says MTIMECMP is not reset, but we reset to maximum value to prevent spurious timer interrupts end else if (memwrite) begin if (entry == 16'h0000) MSIP <= PWDATA[0]; if (entry == 16'h4000)