riscv: sbadaddr -> stval

This was renamed a few days after priv-1.10 was released and llvm only
understands the new name.

Signed-off-by: Stefan O'Rear <sorear@fastmail.com>
This commit is contained in:
Stefan O'Rear 2020-08-01 23:48:25 -04:00 committed by G. Branden Robinson
parent 5a341610c4
commit e1c5674d36
2 changed files with 3 additions and 3 deletions

View file

@ -125,10 +125,10 @@ static inline void write_stvec(word_t value)
asm volatile("csrw stvec, %0" :: "rK"(value));
}
static inline word_t read_sbadaddr(void)
static inline word_t read_stval(void)
{
word_t temp;
asm volatile("csrr %0, sbadaddr" : "=r"(temp));
asm volatile("csrr %0, stval" : "=r"(temp));
return temp;
}

View file

@ -394,7 +394,7 @@ exception_t handleVMFault(tcb_t *thread, vm_fault_type_t vm_faultType)
{
uint64_t addr;
addr = read_sbadaddr();
addr = read_stval();
switch (vm_faultType) {
case RISCVLoadPageFault: