summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/riscv/trap_handler.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/arch/riscv/trap_handler.c b/src/arch/riscv/trap_handler.c
index 4359ed9974..842e3eab3b 100644
--- a/src/arch/riscv/trap_handler.c
+++ b/src/arch/riscv/trap_handler.c
@@ -125,17 +125,19 @@ static void print_trap_information(const trapframe *tf)
static void gettimer(void)
{
- query_result res;
- const char *config;
+ /*
+ * FIXME: This hard-coded value (currently) works on spike, but we
+ * should really read it from the device tree.
+ */
+ uintptr_t clint = 0x02000000;
+
+ time = (void *)(clint + 0xbff8);
+ timecmp = (void *)(clint + 0x4000);
- config = configstring();
- query_rtc(config, (uintptr_t *)&time);
if (!time)
die("Got timer interrupt but found no timer.");
- res = query_config_string(config, "core{0{0{timecmp");
- timecmp = (void *)get_uint(res);
if (!timecmp)
- die("Got a timer interrupt but found no timecmp.");
+ die("Got timer interrupt but found no timecmp.");
}
static void interrupt_handler(trapframe *tf)