This is an automated email from Gerrit. "Jerry Zhang Jian <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9803
-- gerrit commit 429408db7931c8bc6e8d3b174b564d1851b261c5 Author: Jerry Zhang Jian <[email protected]> Date: Tue Jul 21 15:32:50 2026 +0800 target/riscv: add Smctr/Ssctr CSRs Add Control Transfer Records CSRs from Smctr/Ssctr: sctrctl, sctrstatus, sctrdepth, vsctrctl, and mctrctl. Addresses follow the RISC-V privileged CSR listing. Change-Id: Id87ece33c286636807731ef9ca7ce3d368dfce41 Signed-off-by: Jerry Zhang Jian <[email protected]> diff --git a/src/target/riscv/encoding.h b/src/target/riscv/encoding.h index 3ac537c377..a1829fc5c1 100644 --- a/src/target/riscv/encoding.h +++ b/src/target/riscv/encoding.h @@ -2847,9 +2847,12 @@ #define CSR_STVAL 0x143 #define CSR_SIP 0x144 #define CSR_STIMECMP 0x14d +#define CSR_SCTRCTL 0x14e +#define CSR_SCTRSTATUS 0x14f #define CSR_SISELECT 0x150 #define CSR_SIREG 0x151 #define CSR_STOPEI 0x15c +#define CSR_SCTRDEPTH 0x15f #define CSR_SATP 0x180 #define CSR_SCONTEXT 0x5a8 #define CSR_VSSTATUS 0x200 @@ -2861,6 +2864,7 @@ #define CSR_VSTVAL 0x243 #define CSR_VSIP 0x244 #define CSR_VSTIMECMP 0x24d +#define CSR_VSCTRCTL 0x24e #define CSR_VSISELECT 0x250 #define CSR_VSIREG 0x251 #define CSR_VSTOPEI 0x25c @@ -2928,6 +2932,7 @@ #define CSR_MIP 0x344 #define CSR_MTINST 0x34a #define CSR_MTVAL2 0x34b +#define CSR_MCTRCTL 0x34e #define CSR_MISELECT 0x350 #define CSR_MIREG 0x351 #define CSR_MTOPEI 0x35c @@ -4604,9 +4609,12 @@ DECLARE_CSR(scause, CSR_SCAUSE) DECLARE_CSR(stval, CSR_STVAL) DECLARE_CSR(sip, CSR_SIP) DECLARE_CSR(stimecmp, CSR_STIMECMP) +DECLARE_CSR(sctrctl, CSR_SCTRCTL) +DECLARE_CSR(sctrstatus, CSR_SCTRSTATUS) DECLARE_CSR(siselect, CSR_SISELECT) DECLARE_CSR(sireg, CSR_SIREG) DECLARE_CSR(stopei, CSR_STOPEI) +DECLARE_CSR(sctrdepth, CSR_SCTRDEPTH) DECLARE_CSR(satp, CSR_SATP) DECLARE_CSR(scontext, CSR_SCONTEXT) DECLARE_CSR(vsstatus, CSR_VSSTATUS) @@ -4618,6 +4626,7 @@ DECLARE_CSR(vscause, CSR_VSCAUSE) DECLARE_CSR(vstval, CSR_VSTVAL) DECLARE_CSR(vsip, CSR_VSIP) DECLARE_CSR(vstimecmp, CSR_VSTIMECMP) +DECLARE_CSR(vsctrctl, CSR_VSCTRCTL) DECLARE_CSR(vsiselect, CSR_VSISELECT) DECLARE_CSR(vsireg, CSR_VSIREG) DECLARE_CSR(vstopei, CSR_VSTOPEI) @@ -4685,6 +4694,7 @@ DECLARE_CSR(mtval, CSR_MTVAL) DECLARE_CSR(mip, CSR_MIP) DECLARE_CSR(mtinst, CSR_MTINST) DECLARE_CSR(mtval2, CSR_MTVAL2) +DECLARE_CSR(mctrctl, CSR_MCTRCTL) DECLARE_CSR(miselect, CSR_MISELECT) DECLARE_CSR(mireg, CSR_MIREG) DECLARE_CSR(mtopei, CSR_MTOPEI) --
