Skip to content

Commit

Permalink
target/riscv: Add CSR name in the CSR function table
Browse files Browse the repository at this point in the history
In preparation to generate the CSR register list for GDB stub
dynamically, let's add the CSR name in the CSR function table.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 1610427124-49887-3-git-send-email-bmeng.cn@gmail.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
  • Loading branch information
lbmeng authored and alistair23 committed Jan 16, 2021
1 parent 56118ee commit 8ceac5d
Show file tree
Hide file tree
Showing 2 changed files with 249 additions and 84 deletions.
1 change: 1 addition & 0 deletions target/riscv/cpu.h
Expand Up @@ -472,6 +472,7 @@ typedef int (*riscv_csr_op_fn)(CPURISCVState *env, int csrno,
target_ulong *ret_value, target_ulong new_value, target_ulong write_mask);

typedef struct {
const char *name;
riscv_csr_predicate_fn predicate;
riscv_csr_read_fn read;
riscv_csr_write_fn write;
Expand Down

0 comments on commit 8ceac5d

Please sign in to comment.