X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Friscv%2Friscv.c;h=9a6b9389af62ee99966375c0cb9b5cb047a87c20;hp=02ba380553fb7057508a5c36da04126b07305d53;hb=57e30102ea440d77aa001e26eb901d0cbb305a30;hpb=85ba2dc4c6ab4c91f4461c2853660cc2cb9e2623 diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index 02ba380553..9a6b9389af 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -1560,6 +1560,11 @@ const struct command_registration riscv_command_handlers[] = { COMMAND_REGISTRATION_DONE }; +unsigned riscv_address_bits(struct target *target) +{ + return riscv_xlen(target); +} + struct target_type riscv_target = { .name = "riscv", @@ -1594,7 +1599,9 @@ struct target_type riscv_target = { .run_algorithm = riscv_run_algorithm, - .commands = riscv_command_handlers + .commands = riscv_command_handlers, + + .address_bits = riscv_address_bits }; /*** RISC-V Interface ***/