This is an automated email from Gerrit.

Matthias Welwarsky (matth...@welwarsky.de) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/3741

-- gerrit

commit f92e90142a1e3e66caa44b5d5fd4b958490f710b
Author: Matthias Welwarsky <matthias.welwar...@sysgo.com>
Date:   Sat Sep 3 17:12:18 2016 +0200

    target: add -ctibase config option in addition to -dbgbase
    
    Some vendors don't fully populate the ROM table, e.g. BCM2357 (used in
    Raspberry Pi 3) doesn't list CTI, however it is mandatory for halting
    an ARMv8 core and therefore it's always present (and required),
    regardless of the ROM table listing it or not.
    
    Change-Id: Ia18a4f1b5b931ccd19805b188ebf737c837c6b54
    Signed-off-by: Matthias Welwarsky <matthias.welwar...@sysgo.com>

diff --git a/src/target/target.c b/src/target/target.c
index 65f66ee..d512605 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -4412,6 +4412,7 @@ enum target_cfg_param {
        TCFG_COREID,
        TCFG_CHAIN_POSITION,
        TCFG_DBGBASE,
+       TCFG_CTIBASE,
        TCFG_RTOS,
 };
 
@@ -4426,6 +4427,7 @@ static Jim_Nvp nvp_config_opts[] = {
        { .name = "-coreid",           .value = TCFG_COREID },
        { .name = "-chain-position",   .value = TCFG_CHAIN_POSITION },
        { .name = "-dbgbase",          .value = TCFG_DBGBASE },
+       { .name = "-ctibase",          .value = TCFG_CTIBASE },
        { .name = "-rtos",             .value = TCFG_RTOS },
        { .name = NULL, .value = -1 }
 };
@@ -4691,7 +4693,20 @@ no_params:
                        Jim_SetResult(goi->interp, Jim_NewIntObj(goi->interp, 
target->dbgbase));
                        /* loop for more */
                        break;
-
+               case TCFG_CTIBASE:
+                       if (goi->isconfigure) {
+                               e = Jim_GetOpt_Wide(goi, &w);
+                               if (e != JIM_OK)
+                                       return e;
+                               target->ctibase = (uint32_t)w;
+                               target->ctibase_set = true;
+                       } else {
+                               if (goi->argc != 0)
+                                       goto no_params;
+                       }
+                       Jim_SetResult(goi->interp, Jim_NewIntObj(goi->interp, 
target->ctibase));
+                       /* loop for more */
+                       break;
                case TCFG_RTOS:
                        /* RTOS */
                        {
diff --git a/src/target/target.h b/src/target/target.h
index 599c3ca..4913ac7 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -181,6 +181,11 @@ struct target {
        uint32_t dbgbase;                                       /* Really a 
Cortex-A specific option, but there is no
                                                                                
 * system in place to support target specific options
                                                                                
 * currently. */
+
+        bool ctibase_set;                                       /* By default 
the debug base is not set */
+        uint32_t ctibase;                                       /* Really a 
Cortex-A specific option, but there is no
+                                                                               
  * system in place to support target specific options
+                                                                               
  * currently. */
        struct rtos *rtos;                                      /* Instance of 
Real Time Operating System support */
        bool rtos_auto_detect;                          /* A flag that 
indicates that the RTOS has been specified as "auto"
                                                                                
 * and must be detected when symbols are offered */

-- 

------------------------------------------------------------------------------
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to