On 10/1/25 12:33 AM, Anton Johansson wrote:
Convert riscv_csr_[read|write]() into target_ulong angnostic CSR access
functions that can be safely used from outside of target/ without
knowledge of the target register size. Replace the 4 existing CSR
accesses in hw/ and linux-user/.
Signed-off-by: Anton Johansson <[email protected]>
---
target/riscv/cpu.h | 7 ++++++-
target/riscv/csr.h | 13 -------------
hw/riscv/riscv_hart.c | 7 +++----
linux-user/riscv/signal.c | 5 +++--
target/riscv/csr.c | 17 +++++++++++++++++
5 files changed, 29 insertions(+), 20 deletions(-)
Reviewed-by: Pierrick Bouvier <[email protected]>