diff options
author | Bin Meng <bin.meng@windriver.com> | 2021-01-12 12:52:01 +0800 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2021-01-16 10:57:21 -0800 |
commit | 56118ee88ddf0498e0c8c4c81ef91d793c76866f (patch) | |
tree | ba062da720a30a0fcff7d7e4cd8a48c39628593a /target/riscv/cpu.h | |
parent | 29b5fe0dcd512f9829475e3eb3f6fdc5e293b8f0 (diff) |
target/riscv: Make csr_ops[CSR_TABLE_SIZE] external
In preparation to generate the CSR register list for GDB stub
dynamically, change csr_ops[] to non-static so that it can be
referenced externally.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 1610427124-49887-2-git-send-email-bmeng.cn@gmail.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/cpu.h')
-rw-r--r-- | target/riscv/cpu.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 6339e84819..464653d70d 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -478,6 +478,14 @@ typedef struct { riscv_csr_op_fn op; } riscv_csr_operations; +/* CSR function table constants */ +enum { + CSR_TABLE_SIZE = 0x1000 +}; + +/* CSR function table */ +extern riscv_csr_operations csr_ops[]; + void riscv_get_csr_ops(int csrno, riscv_csr_operations *ops); void riscv_set_csr_ops(int csrno, riscv_csr_operations *ops); |