aboutsummaryrefslogtreecommitdiff
path: root/src/target/armv8.c
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2018-08-10 12:01:17 +0200
committerMatthias Welwarsky <matthias@welwarsky.de>2018-08-22 08:23:08 +0100
commit2a3b709aa5d1ab83faed1dc7c296ffc117022d62 (patch)
tree44b0a3a1ed05872b2786928c46ce4dda6aeef34e /src/target/armv8.c
parent704d7ac2d0551514b81650addd76e35327c7beb0 (diff)
downloadriscv-openocd-2a3b709aa5d1ab83faed1dc7c296ffc117022d62.zip
riscv-openocd-2a3b709aa5d1ab83faed1dc7c296ffc117022d62.tar.gz
riscv-openocd-2a3b709aa5d1ab83faed1dc7c296ffc117022d62.tar.bz2
target: armv8: Ensure target is halted for virt2phys
Othewise the error reported as Timeout waiting for dpm prepare Change-Id: Ieed2fdcd94ae4e877a749df3eec07a01dbf80b10 Closes: https://sourceforge.net/p/openocd/tickets/201/ Found-by: Matthias Welwarsky <matthias@welwarsky.de> Signed-off-by: Guido Günther <guido.gunther@puri.sm> Reviewed-on: http://openocd.zylin.com/4647 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src/target/armv8.c')
-rw-r--r--src/target/armv8.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/target/armv8.c b/src/target/armv8.c
index dfa2c67..75ada89 100644
--- a/src/target/armv8.c
+++ b/src/target/armv8.c
@@ -936,6 +936,11 @@ int armv8_mmu_translate_va_pa(struct target *target, target_addr_t va,
"Secure", "Not Secure"
};
+ if (target->state != TARGET_HALTED) {
+ LOG_WARNING("target %s not halted", target_name(target));
+ return ERROR_TARGET_NOT_HALTED;
+ }
+
retval = dpm->prepare(dpm);
if (retval != ERROR_OK)
return retval;