OSDN Git Service

target/riscv: Allow debugger to access {h, s}stateen CSRs
authorBin Meng <bmeng@tinylab.org>
Tue, 28 Feb 2023 13:45:32 +0000 (21:45 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 2 Mar 2023 00:40:23 +0000 (16:40 -0800)
commit0308fc621914ba424705d188dc4a58006edb3472
tree27ab9359e0d200378a15d14226cd241d37e086dc
parentddb10742f1acce17dbb8f3551af01bf5bfc4fa14
target/riscv: Allow debugger to access {h, s}stateen CSRs

At present {h,s}stateen CSRs are not reported in the CSR XML
hence gdb cannot access them.

Fix it by adjusting their predicate() routine logic so that the
static config check comes before the run-time check, as well as
adding a debugger check.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn>
Message-ID: <20230228104035.1879882-16-bmeng@tinylab.org>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
target/riscv/csr.c