This is an automated email from Gerrit.

"Daniel Goehring <dgoeh...@os.amperecomputing.com>" just uploaded a new patch 
set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7245

-- gerrit

commit 5f8e0708d34c6e929bbe9f4802f9120950945f56
Author: Daniel Goehring <dgoeh...@os.amperecomputing.com>
Date:   Tue Oct 4 00:03:42 2022 -0700

    target/adiv5: 64-bit TAR setup bugfix
    
    For 64-bit TAR setup, if 'tar_valid == false' perform the upper 32-bit
    write even if the cached copy matches the upper TAR value to be written.
    
    Signed-off-by: Daniel Goehring <dgoeh...@os.amperecomputing.com>
    Change-Id: I320377dc90a9d1d7b64cbb281b2527e56c7621ee

diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
index c44642825e..da5da3197d 100644
--- a/src/target/arm_adi_v5.c
+++ b/src/target/arm_adi_v5.c
@@ -113,7 +113,7 @@ static int mem_ap_setup_tar(struct adiv5_ap *ap, 
target_addr_t tar)
                int retval = dap_queue_ap_write(ap, MEM_AP_REG_TAR(ap->dap), 
(uint32_t)(tar & 0xffffffffUL));
                if (retval == ERROR_OK && is_64bit_ap(ap)) {
                        /* See if bits 63:32 of tar is different from last 
setting */
-                       if ((ap->tar_value >> 32) != (tar >> 32))
+                       if (!ap->tar_valid || (ap->tar_value >> 32) != (tar >> 
32))
                                retval = dap_queue_ap_write(ap, 
MEM_AP_REG_TAR64(ap->dap), (uint32_t)(tar >> 32));
                }
                if (retval != ERROR_OK) {

-- 

Reply via email to