aboutsummaryrefslogtreecommitdiff
path: root/src/pld
diff options
context:
space:
mode:
authorMatthias Welwarsky <matthias@welwarsky.de>2015-11-24 15:59:59 +0100
committerPaul Fertser <fercerpav@gmail.com>2015-11-30 10:07:54 +0000
commit8b140fd724e96392b5903f00eab24ec801c7dcc9 (patch)
treef9012e4c9195d3cbab2d1ce95530642445cab096 /src/pld
parent3683f8cef09f389ed840f2dbef5bd1749b60a16f (diff)
cortex_a: replace cortex_a_check_address function
When accessing memory through the ARM core, privilege levels and mmu access permissions observed. Thus it depends on the current mode of the ARM core whether an access is possible or not. the ARM in USR mode can not access memory mapped to a higher privilege level. This means, if the ARM core is halted while executing at PL0, the debugger would be prevented from setting a breakpoint at an address with a higher privilege level, e.g. in the OS kernel. This is not desirable. cortex_a_check_address() tried to work around this by predicting if an access would fail and switched the ARM core to SVC mode. However, the prediction was based on hardcoded address ranges and only worked for Linux and a 3G/1G user/kernel space split. This patch changes the policy to always switch to SVC mode for memory accesses. It introduces two functions cortex_a_prep_memaccess() and cortex_a_post_memaccess() which bracket memory reads and writes. These function encapsulate all actions necessary for preparation and cleanup. Change-Id: I4ccdb5fd17eadeb2b66ae28caaf0ccd2d014eaa9 Signed-off-by: Matthias Welwarsky <matthias@welwarsky.de> Reviewed-on: http://openocd.zylin.com/3119 Reviewed-by: Paul Fertser <fercerpav@gmail.com> Tested-by: jenkins
Diffstat (limited to 'src/pld')
0 files changed, 0 insertions, 0 deletions