From 4060b671d8182d568de11a98557ebabcbe4631fe Mon Sep 17 00:00:00 2001
From: Robert Morris <rtm@csail.mit.edu>
Date: Wed, 4 Sep 2024 15:21:52 -0400
Subject: [PATCH] change stimecmp to 0x14d

---
 kernel/riscv.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/riscv.h b/kernel/riscv.h
index 8732ed9..d80e78e 100644
--- a/kernel/riscv.h
+++ b/kernel/riscv.h
@@ -179,14 +179,16 @@ static inline uint64
 r_stimecmp()
 {
   uint64 x;
-  asm volatile("csrr %0, stimecmp" : "=r" (x) );
+  // asm volatile("csrr %0, stimecmp" : "=r" (x) );
+  asm volatile("csrr %0, 0x14d" : "=r" (x) );
   return x;
 }
 
 static inline void 
 w_stimecmp(uint64 x)
 {
-  asm volatile("csrw stimecmp, %0" : : "r" (x));
+  // asm volatile("csrw stimecmp, %0" : : "r" (x));
+  asm volatile("csrw 0x14d, %0" : : "r" (x));
 }
 
 // Machine Environment Configuration Register