cortex_a: do not try to use MMU for translation if it wasn't enabled on target stop
authorPaul Fertser <fercerpav@gmail.com>
Tue, 29 Oct 2013 09:45:07 +0000 (13:45 +0400)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Thu, 6 Feb 2014 22:21:57 +0000 (22:21 +0000)
commitddef36905cc3e4493960ce0ad6bf6ac113148c29
tree5b510365fa03a3794140f77d49f6edc788594346
parente4125d136c72b1225c4547e670db102f88cf6efc
cortex_a: do not try to use MMU for translation if it wasn't enabled on target stop

On a target where AHB AP memory access is unavailable, care should be
taken to avoid treating addresses as virtual if the MMU was disabled
at the time the target was stopped.

Without this it's impossible to peek memory with Gdb when debugging
e.g. a bootloader because cortex_a8_read_memory() unconditionally
tried (and failed because of a sanity check in cortex_a8_mmu_modify)
to enable MMU.

Change-Id: Id7c63f4912920fb71a6104226ec6428d18c96a56
Reported-by: mbm@openwrt.org
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1787
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
src/target/cortex_a.c