This is an automated email from Gerrit.

Alamy Liu ([email protected]) just uploaded a new patch set to Gerrit, which 
you can find at http://openocd.zylin.com/3277

-- gerrit

commit 1ccf35ec62af2688ca043abc82a0bcfa60a129e6
Author: Alamy Liu <[email protected]>
Date:   Wed Aug 12 15:48:36 2015 -0700

    aarch64: set armv8->debug_base
    
    Change-Id: If2039cde8943fe6db14aef527ef0744079615c50
    Signed-off-by: Alamy Liu <[email protected]>

diff --git a/src/target/aarch64.c b/src/target/aarch64.c
index 875d9a2..cd62549 100644
--- a/src/target/aarch64.c
+++ b/src/target/aarch64.c
@@ -2186,14 +2186,26 @@ static int aarch64_handle_target_request(void *priv)
        return ERROR_OK;
 }
 
+/*
+   Experience version to examine Juno r1 platform.
+   - Juno r1 has two TAPs
+     TAP0 - Cortex-M3 Versatile Express: System Power management ?
+
+     TAP1 - ARMv8
+         AP0 (IDR=0x14770004): Rev=1, JEP106(cont,code)=(4,3b), class=MEM-AP, 
ID(var,type)=(0,AXI-AP)
+         AP1 (IDR=0x44770002): Rev=4, JEP106(cont,code)=(4,3b), class=MEM-AP, 
ID(var,type)=(0,APB-AP)
+
+   - Skip dbgbase stuff (target CPU determination).
+
+*/
 static int aarch64_examine_first(struct target *target)
 {
        struct aarch64_common *aarch64 = target_to_aarch64(target);
        struct armv8_common *armv8 = &aarch64->armv8_common;
        struct adiv5_dap *swjdp = armv8->arm.dap;
-       int i;
        int retval = ERROR_OK;
        uint32_t pfr, debug, ctypr, ttypr, cpuid;
+       int i;
 
        /* We do one extra read to ensure DAP is configured,
         * we call ahbap_debugport_init(swjdp) instead
@@ -2223,7 +2235,7 @@ static int aarch64_examine_first(struct target *target)
        }
 #endif
 
-
+       /* Assign armv8->debug_base */
        if (!target->dbgbase_set) {
                uint32_t dbgbase;
                /* Get ROM Table base */
@@ -2242,6 +2254,12 @@ static int aarch64_examine_first(struct target *target)
        } else
                armv8->debug_base = target->dbgbase;
 
+       LOG_DEBUG("target(%p), debug_ap=%d, dbgbase=0x%x, coreidx=%d",
+               target,
+               armv8->debug_ap,
+               armv8->debug_base,
+               target->coreid);
+
        retval = mem_ap_sel_write_atomic_u32(swjdp, armv8->debug_ap,
                        armv8->debug_base + 0x300, 0);
        if (retval != ERROR_OK) {

-- 

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to