diff options
author | Achin Gupta <achin.gupta@arm.com> | 2012-05-16 12:03:00 +0100 |
---|---|---|
committer | Dietmar Eggemann <dietmar.eggemann@arm.com> | 2012-05-23 12:44:35 +0100 |
commit | bb6e7dea0af5acf65df6e407effb7a307393dced (patch) | |
tree | f0f741672248f0e2ce3f101448ed6560e328a8ce | |
parent | 7b4560d290263a34c72792867922306e353bc992 (diff) |
Debug S&R cp14: BUGFIX: Use correct data structure for context s&r
While saving and restoring the debug context the 'debug_registers_t'
data structure was being used instead of 'debug_context_t'. This
caused context to be saved at incorrect locations. It got manifested
by the corruption of the LR value for the IRQ mode while running the
baremetal stress test.
-rw-r--r-- | acsr/v7_c.c | 10 | ||||
-rw-r--r-- | big-little/include/context.h | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/acsr/v7_c.c b/acsr/v7_c.c index e45f400..543c71c 100644 --- a/acsr/v7_c.c +++ b/acsr/v7_c.c @@ -240,7 +240,7 @@ dbgreg_rw_ops dbgreg_rw_handlers[] = { }, }; -static void restore_bp_reg(debug_registers_t *dbg, unsigned index, unsigned type) +static void restore_bp_reg(debug_context_t *dbg, unsigned index, unsigned type) { switch (type) { case DBGREG_WP_VAL: @@ -265,7 +265,7 @@ static void restore_bp_reg(debug_registers_t *dbg, unsigned index, unsigned type return; } -static void save_bp_reg(debug_registers_t *dbg, unsigned index, unsigned type) +static void save_bp_reg(debug_context_t *dbg, unsigned index, unsigned type) { switch (type) { case DBGREG_WP_VAL: @@ -290,7 +290,7 @@ static void save_bp_reg(debug_registers_t *dbg, unsigned index, unsigned type) return; } -static void sr_bp_context(debug_registers_t *dbg, unsigned bp_type, unsigned op) +static void sr_bp_context(debug_context_t *dbg, unsigned bp_type, unsigned op) { unsigned num_bps, num_ctx_cmps, num_wps, didr; unsigned index = 0, max_index = 0; @@ -325,7 +325,7 @@ static void sr_bp_context(debug_registers_t *dbg, unsigned bp_type, unsigned op) static void save_v71_debug_cp14(unsigned * context) { - debug_registers_t *dbg = (void *) context; + debug_context_t *dbg = (void *) context; unsigned virtext_present = (read_dbg_devid() >> 16) & 0xf; /* @@ -355,7 +355,7 @@ static void save_v71_debug_cp14(unsigned * context) static void restore_v71_debug_cp14(unsigned * context) { - debug_registers_t *dbg = (void *) context; + debug_context_t *dbg = (void *) context; unsigned virtext_present; /* diff --git a/big-little/include/context.h b/big-little/include/context.h index 6a7ca0c..4620393 100644 --- a/big-little/include/context.h +++ b/big-little/include/context.h @@ -27,8 +27,13 @@ typedef struct { unsigned vcr; - unsigned dscr_e; unsigned eacr; + unsigned claim; + unsigned claimclr; + unsigned dtrrx_e; + unsigned dtrtx_e; + unsigned dscr_e; + unsigned wfar; unsigned bvr[16]; unsigned bcr[16]; unsigned wvr[16]; |