This is an automated email from Gerrit.

"Tomas Vanek <van...@fbl.cz>" just uploaded a new patch set to Gerrit, which 
you can find at https://review.openocd.org/c/openocd/+/7540

-- gerrit

commit ab3e23fcac59882f694275fc922ca1f5c12165e7
Author: Tomas Vanek <van...@fbl.cz>
Date:   Tue Mar 14 15:11:14 2023 +0100

    target/adi_v5_jtag: fix endianess error in transaction replay
    
    The code for JTAG WAIT recovery did not handle DP_SELECT
    endianess.
    
    While on it, mark missing ADIv6 DP SELECT1 handling as TODO.
    
    Change-Id: I44f3bc8fc9fd2483c0293b6d4f2c51a60ca01873
    Signed-off-by: Tomas Vanek <van...@fbl.cz>

diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c
index d510a9d8aa..afdc0e5775 100644
--- a/src/target/adi_v5_jtag.c
+++ b/src/target/adi_v5_jtag.c
@@ -566,14 +566,20 @@ static int jtagdp_overrun_check(struct adiv5_dap *dap)
                /* restore SELECT register first */
                if (!list_empty(&replay_list)) {
                        el = list_first_entry(&replay_list, struct dap_cmd, lh);
+
+                       uint8_t out_value_buf[4];
+                       buf_set_u32(out_value_buf, 0, 32, 
(uint32_t)(el->dp_select));
+
                        tmp = dap_cmd_new(dap, JTAG_DP_DPACC,
-                                         DP_SELECT, DPAP_WRITE, (uint8_t 
*)&el->dp_select, NULL, 0);
+                                         DP_SELECT, DPAP_WRITE, out_value_buf, 
NULL, 0);
                        if (!tmp) {
                                retval = ERROR_JTAG_DEVICE_ERROR;
                                goto done;
                        }
                        list_add(&tmp->lh, &replay_list);
 
+                       /* TODO: ADIv6 DP SELECT1 handling */
+
                        dap->select = DP_SELECT_INVALID;
                }
 

-- 

Reply via email to