mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-23 04:25:21 +00:00
base-hw: RISC-V save/restore 'x29' correctly
* register x29/t4 was not saved and therefore not restored correctly * change 'warning' to 'error' before '_die' is called issue #2423
This commit is contained in:
parent
7113c17100
commit
e17accb3ba
@ -61,7 +61,8 @@ _mt_kernel_entry_pic:
|
||||
addi x31, x31, 8
|
||||
|
||||
# save x30 in master
|
||||
sd x30, CPU_X1 + 8 * 28(x31)
|
||||
sd x29, CPU_X1 + 8 * 28(x31)
|
||||
sd x30, CPU_X1 + 8 * 29(x31)
|
||||
|
||||
# load kernel page table
|
||||
ld x30, CPU_SPTBR(x31)
|
||||
@ -149,7 +150,7 @@ _mt_user_entry_pic:
|
||||
|
||||
sfence.vm x0
|
||||
|
||||
# restore x29 - x31 from master context
|
||||
# restore x29 - x31 from master context
|
||||
.irp reg,31,30,29
|
||||
ld x\reg, CPU_X1 + 8 * (\reg - 1)(x29)
|
||||
.endr
|
||||
|
@ -35,8 +35,8 @@ void Thread::exception(unsigned const cpu)
|
||||
_mmu_exception();
|
||||
break;
|
||||
default:
|
||||
Genode::warning(*this, ": unhandled exception ", cpu_exception,
|
||||
" at ip=", (void*)ip, " addr=", Cpu::sbadaddr());
|
||||
Genode::error(*this, ": unhandled exception ", cpu_exception,
|
||||
" at ip=", (void*)ip, " addr=", Genode::Hex(Cpu::sbadaddr()));
|
||||
_die();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user