target/riscv: Preliminary textra trigger CSR writting support
authorAlvin Chang <alvinga@andestech.com>
Mon, 26 Aug 2024 02:46:56 +0000 (10:46 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Wed, 2 Oct 2024 05:11:51 +0000 (15:11 +1000)
commitc4db48cc24a5e254697a3d4d9201f0e5227fce02
tree833007f3c9531196507961f9ef1e4177d9be0e8d
parentc5757f808bd74db7ef1a90ee28334f3b5afb8179
target/riscv: Preliminary textra trigger CSR writting support

This commit allows program to write textra trigger CSR for type 2, 3, 6
triggers. In this preliminary patch, the textra.MHVALUE and the
textra.MHSELECT fields are allowed to be configured. Other fields, such
as textra.SBYTEMASK, textra.SVALUE, and textra.SSELECT, are hardwired to
zero for now.

For textra.MHSELECT field, the only legal values are 0 (ignore) and 4
(mcontext). Writing 1~3 into textra.MHSELECT will be changed to 0, and
writing 5~7 into textra.MHSELECT will be changed to 4. This behavior is
aligned to RISC-V SPIKE simulator.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240826024657.262553-2-alvinga@andestech.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu_bits.h
target/riscv/debug.c