Addressed review comments.

This commit is contained in:
Greg Savin 2019-04-18 14:44:22 -07:00
parent f63e9662e8
commit 5c9bea876e
3 changed files with 11 additions and 6 deletions

View File

@ -9482,6 +9482,11 @@ When utilizing version 0.11 of the RISC-V Debug Specification,
and DBUS registers, respectively.
@end deffn
@deffn Command {riscv use_bscan_tunnel} value
Enable or disable use of a BSCAN tunnel to reach DM. Supply the width of
the DM transport TAP's instruction register to enable. Supply a value of 0 to disable.
@end deffn
@subsection RISC-V Authentication Commands
The following commands can be used to authenticate to a RISC-V system. Eg. a

View File

@ -502,7 +502,7 @@ static dmi_status_t dmi_scan(struct target *target, uint32_t *address_in,
if (bscan_tunnel_ir_width != 0) {
jtag_add_ir_scan(target->tap, &select_user4, TAP_IDLE);
uint8_t tunneled_dr_width[4] = {num_bits};
uint8_t tunneled_dr_width = num_bits;
struct scan_field tunneled_dr[] = {
{
@ -512,7 +512,7 @@ static dmi_status_t dmi_scan(struct target *target, uint32_t *address_in,
},
{
.num_bits = 7,
.out_value = tunneled_dr_width,
.out_value = &tunneled_dr_width,
.in_value = NULL,
},
/* for BSCAN tunnel, there is a one-TCK skew between shift in and shift out, so

View File

@ -248,8 +248,6 @@ void select_dmi_via_bscan(struct target *target)
uint32_t dtmcontrol_scan_via_bscan(struct target *target, uint32_t out)
{
/* jtag_add_ir_scan(target->tap, &select_dtmcontrol, TAP_IDLE); */
/* On BSCAN TAP: Select IR=USER4, issue tunneled IR scan via BSCAN TAP's DR */
uint8_t tunneled_ir_width[4] = {bscan_tunnel_ir_width};
uint8_t tunneled_dr_width[4] = {32};
@ -2089,8 +2087,10 @@ static const struct command_registration riscv_exec_command_handlers[] = {
.name = "use_bscan_tunnel",
.handler = riscv_use_bscan_tunnel,
.mode = COMMAND_ANY,
.usage = "riscv use_bscan_tunnel dm_ir_width",
.help = "Enable or disable use of a BSCAN tunnel to reach DM. Supply value of 0 to disable."
.usage = "riscv use_bscan_tunnel value",
.help = "Enable or disable use of a BSCAN tunnel to reach DM. Supply "
"the width of the DM transport TAP's instruction register to "
"enable. Supply a value of 0 to disable."
},
COMMAND_REGISTRATION_DONE
};