From dc98c64d714c3c2e04bb96400955864b59655575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Tue, 27 Oct 2009 13:43:42 +0100 Subject: arm11: check if target is halted before executing mrc/mcr commands. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øyvind Harboe --- src/target/arm11.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/target/arm11.c') diff --git a/src/target/arm11.c b/src/target/arm11.c index f1e062a..5411b04 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -2201,6 +2201,13 @@ int arm11_handle_mcr(struct command_context_s *cmd_ctx, char *cmd, char **args, static int arm11_mrc_inner(target_t *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t *value, bool read) { int retval; + + if (target->state != TARGET_HALTED) + { + LOG_ERROR("Target not halted"); + return ERROR_FAIL; + } + arm11_common_t * arm11 = target->arch_info; uint32_t instr = 0xEE000010 | -- cgit v1.1