This is an automated email from Gerrit.

"Daniel Goehring <[email protected]>" just uploaded a new patch 
set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9263

-- gerrit

commit 8b55996f6513dda53df8fd2a34c6de4ae196a59a
Author: Daniel Goehring <[email protected]>
Date:   Mon Jul 14 19:25:47 2025 -0600

    target/arm: add nested AP Cortex A target support
    
    For the Cortex A processor target, add nested AP support.
    
    Change-Id: Idfa7ad7f952119298e85aa3459a20c6ab60b6628
    Signed-off-by: Daniel Goehring <[email protected]>

diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c
index bc7550509c..0c1bf5c365 100644
--- a/src/target/cortex_a.c
+++ b/src/target/cortex_a.c
@@ -2958,7 +2958,11 @@ static int cortex_a_examine_first(struct target *target)
                                return retval;
                        }
                } else {
-                       armv7a->debug_ap = dap_get_ap(swjdp, pc->ap_num);
+                       if (pc->ap_num_gateway == DP_APSEL_INVALID)
+                               armv7a->debug_ap = dap_get_ap(swjdp, 
pc->ap_num);
+                       else
+                               armv7a->debug_ap = dap_get_ap_gateway(swjdp, 
pc->ap_num, pc->ap_num_gateway);
+
                        if (!armv7a->debug_ap) {
                                LOG_ERROR("Cannot get AP");
                                return ERROR_FAIL;
@@ -3118,6 +3122,10 @@ static int cortex_a_examine_first(struct target *target)
 
        /* select debug_ap as default */
        swjdp->apsel = armv7a->debug_ap->ap_num;
+       if (armv7a->debug_ap->ap_gateway)
+               swjdp->apsel_gateway = armv7a->debug_ap->ap_gateway->ap_num;
+       else
+               swjdp->apsel_gateway = DP_APSEL_INVALID;
 
        target_set_examined(target);
        return ERROR_OK;

-- 

Reply via email to