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>
This commit is contained in:
Jonathan Neuschäfer 2017-09-26 01:44:45 +02:00 committed by Patrick Georgi
parent 140a827daa
commit c90f1d7be0
1 changed files with 9 additions and 7 deletions

View File

@ -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)