CSR registers is import system control registers, it had better to dump
all CSR registers when VM is running in system mode, rather than dump
part of those, since guest OS uses these CSR registers. And it is very
useful to debug guest OS.
---
v1 .. v2:
1. Fix compiling issue on user mode only emulation
2. Add flag to present unused CSR register for LA464 CPU
3. Add human friendly output format, CSR register output is aligned.
---
Bibo Mao (6):
target/loongarch: Add dynamic function access with CSR register
target/loongarch: Remove static CSR function setting
target/loongarch: Add common header file for CSR register
target/loongarch: Add common source file for CSR register
target/loongarch: Set unused flag with CSR registers
target/loongarch: Dump all generic CSR registers
target/loongarch/cpu.c | 92 ++++++++--
target/loongarch/csr.c | 129 ++++++++++++++
target/loongarch/csr.h | 29 ++++
target/loongarch/meson.build | 1 +
.../tcg/insn_trans/trans_privileged.c.inc | 161 +++++-------------
target/loongarch/tcg/tcg_loongarch.h | 12 ++
target/loongarch/tcg/translate.c | 5 +
7 files changed, 290 insertions(+), 139 deletions(-)
create mode 100644 target/loongarch/csr.c
create mode 100644 target/loongarch/csr.h
create mode 100644 target/loongarch/tcg/tcg_loongarch.h
base-commit: 3214bec13d8d4c40f707d21d8350d04e4123ae97
--
2.39.3