summaryrefslogtreecommitdiff
path: root/src/target/cortex_a8.c
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-06-10 16:18:14 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-06-11 15:53:23 +0200
commit0538081246fafbfb74d554bb1b758412534aa254 (patch)
treec845abc278fa7483617669557d53b034aa17b90f /src/target/cortex_a8.c
parentecc8041c0f4c30a7310c0f8414a5261ee7a090ca (diff)
downloadopenocd+libswd-0538081246fafbfb74d554bb1b758412534aa254.tar.gz
openocd+libswd-0538081246fafbfb74d554bb1b758412534aa254.tar.bz2
openocd+libswd-0538081246fafbfb74d554bb1b758412534aa254.tar.xz
openocd+libswd-0538081246fafbfb74d554bb1b758412534aa254.zip
arm mmu: error propagation added for address translation
The return value for MMU translation was a mess, either error or value. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target/cortex_a8.c')
-rw-r--r--src/target/cortex_a8.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c
index aa0e030c..2edb9e3e 100644
--- a/src/target/cortex_a8.c
+++ b/src/target/cortex_a8.c
@@ -1817,8 +1817,11 @@ static int cortex_a8_virt2phys(struct target *target,
cortex_a8->current_address_mode = ARM_MODE_USR;
else /* Linux kernel */
cortex_a8->current_address_mode = ARM_MODE_SVC;
- uint32_t ret = armv4_5_mmu_translate_va(target,
- &armv7a->armv4_5_mmu, virt, &type, &cb, &domain, &ap);
+ uint32_t ret;
+ int retval = armv4_5_mmu_translate_va(target,
+ &armv7a->armv4_5_mmu, virt, &type, &cb, &domain, &ap, &ret);
+ if (retval != ERROR_OK)
+ return retval;
/* Reset the flag. We don't want someone else to use it by error */
cortex_a8->current_address_mode = ARM_MODE_ANY;