diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2017-09-26 01:44:45 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2017-11-07 12:30:07 +0000 |
commit | c90f1d7be0bb41e1e74b5a6f7c4ceb4a2fceada8 (patch) | |
tree | ede153e106fffe01687fe91352d9a5d5f15cd17c /src/arch | |
parent | 140a827daa5d878d7b34853dd2b15c64c8d501d1 (diff) |
arch/riscv: gettimer: Don't use the config string
Accessing the config string doesn't work anymore on current versions of
spike. Thus return dummy pointers until we have a better solution.
Change-Id: I684fc51dc0916f2235e57e36b913d363e1cb02b1
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/21687
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/riscv/trap_handler.c | 16 |
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) |