]> git.sur5r.net Git - openocd/commit
target/cortex_a: remove unused code controlled by "fast_reg_read"
authorAntonio Borneo <borneo.antonio@gmail.com>
Wed, 31 Oct 2018 16:57:59 +0000 (17:57 +0100)
committerMatthias Welwarsky <matthias@welwarsky.de>
Tue, 6 Nov 2018 12:17:48 +0000 (12:17 +0000)
commite63dab08986e7ec28acdb0bcc592305239810a48
tree274b648231e55f8e3b288f456c499c21c8d1a986
parentcea40152f82f52bfc718c7bda9fa4a9d70bf9cfd
target/cortex_a: remove unused code controlled by "fast_reg_read"

The variable fast_reg_read is always zero, causing some code to
never be executed.
Such code try to read the target registers by dumping them in
memory and then reading back the memory through the debugger. But
it is broken due to lack of cache and MMU management.
This code also uses the broken memory_ap access that is going to
be removed soon.

Remove all the code that depends on fast_reg_read not zero.
Add a missing check on arm_dpm_read_current_registers() return.
Keep the unused function cortex_a_dap_write_coreregister_u32()
to balance the used "read" version.

Change-Id: If2ff28a8c49eb0a87dc85207f5431978efd158db
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4746
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
src/target/cortex_a.c
src/target/cortex_a.h