target: add -ctibase config option in addition to -dbgbase 41/3741/5
authorMatthias Welwarsky <matthias.welwarsky@sysgo.com>
Sat, 3 Sep 2016 15:12:18 +0000 (17:12 +0200)
committerMatthias Welwarsky <matthias.welwarsky@sysgo.com>
Fri, 10 Feb 2017 13:01:38 +0000 (14:01 +0100)
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.welwarsky@sysgo.com>
src/target/target.c
src/target/target.h

index 5c2164f7a19d5903c9416f4086ca7a0f86052ffd..ee302ee47c7a3673108ae2e9e9f4fe8d31318241 100644 (file)
@@ -4445,6 +4445,7 @@ enum target_cfg_param {
        TCFG_COREID,
        TCFG_CHAIN_POSITION,
        TCFG_DBGBASE,
        TCFG_COREID,
        TCFG_CHAIN_POSITION,
        TCFG_DBGBASE,
+       TCFG_CTIBASE,
        TCFG_RTOS,
        TCFG_DEFER_EXAMINE,
 };
        TCFG_RTOS,
        TCFG_DEFER_EXAMINE,
 };
@@ -4460,6 +4461,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 = "-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 = "-defer-examine",    .value = TCFG_DEFER_EXAMINE },
        { .name = NULL, .value = -1 }
        { .name = "-rtos",             .value = TCFG_RTOS },
        { .name = "-defer-examine",    .value = TCFG_DEFER_EXAMINE },
        { .name = NULL, .value = -1 }
@@ -4726,7 +4728,20 @@ no_params:
                        Jim_SetResult(goi->interp, Jim_NewIntObj(goi->interp, target->dbgbase));
                        /* loop for more */
                        break;
                        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 */
                        {
                case TCFG_RTOS:
                        /* RTOS */
                        {
index 41c9333ec72f3f57a7534e0f317e5c82f7f76489..76630b973fe0d20de05cb352f792851121e09807 100644 (file)
@@ -185,6 +185,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. */
        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 */
        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 */

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)