aboutsummaryrefslogtreecommitdiff
path: root/src/target/target.c
diff options
context:
space:
mode:
authorMatthias Welwarsky <matthias.welwarsky@sysgo.com>2016-09-03 17:12:18 +0200
committerMatthias Welwarsky <matthias.welwarsky@sysgo.com>2017-02-10 14:01:38 +0100
commitdf32af234cae1f24b0a0f3abf4b50859f9d26740 (patch)
tree70ed2c0af04b5f515926fdd25e558f9b8b94f1dd /src/target/target.c
parentf2a271e2643e8a57881d5db7aceb21fc36140bc2 (diff)
downloadriscv-openocd-df32af234cae1f24b0a0f3abf4b50859f9d26740.zip
riscv-openocd-df32af234cae1f24b0a0f3abf4b50859f9d26740.tar.gz
riscv-openocd-df32af234cae1f24b0a0f3abf4b50859f9d26740.tar.bz2
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.welwarsky@sysgo.com>
Diffstat (limited to 'src/target/target.c')
-rw-r--r--src/target/target.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/target/target.c b/src/target/target.c
index 5c2164f..ee302ee 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -4445,6 +4445,7 @@ enum target_cfg_param {
TCFG_COREID,
TCFG_CHAIN_POSITION,
TCFG_DBGBASE,
+ TCFG_CTIBASE,
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 = "-ctibase", .value = TCFG_CTIBASE },
{ .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;
-
+ 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 */
{