OSDN Git Service

target/riscv: set tval for triggered watchpoints
authorSergey Matyukevich <sergey.matyukevich@syntacore.com>
Tue, 31 Jan 2023 17:09:55 +0000 (20:09 +0300)
committerAlistair Francis <alistair.francis@wdc.com>
Mon, 6 Feb 2023 22:19:23 +0000 (08:19 +1000)
commit26934f9a95264221ed8e6d603b8099508fbd2a5e
tree5966712ae7b1754cc85e35162a94cd36186965b8
parent606a2439babb7d676af32e15232e94159d67bbeb
target/riscv: set tval for triggered watchpoints

According to privileged spec, if [sm]tval is written with a nonzero
value when a breakpoint exception occurs, then [sm]tval will contain
the faulting virtual address. Set tval to hit address when breakpoint
exception is triggered by hardware watchpoint.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich@syntacore.com>
Reviewed-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230131170955.752743-1-geomatsi@gmail.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu_helper.c
target/riscv/debug.c