Files
sw_openocd/src/target
Tomas Vanek 4553abf906 arm_adi_v5: fix wrong addressing after change of CSW_ADDRINC
Problem: If the same memory location is accessed alternatively
by MEM-AP banked data registers without autoincrement and by standard
autoincremented read/write, TAR register is not updated correctly.

How to replicate: On a Cortex-M issue
    mdw 0xe000edf0
multiple times. When poll is on (poll reads the same memory location)
only the first read is correct.
0xe000edf0: 01000000
0xe000edf0: 00000000
0xe000edf0: 20002640
0xe000edf0: 01000000
0xe000edf0: 00000000
0xe000edf0: 00000000

No problems with poll off.
0xe000edf0: 01000000
0xe000edf0: 01000000
0xe000edf0: 01000000

mem_ap_setup_tar() writes to MEM_AP_REG_TAR if requested TAR value
changed or CSW_ADDRINC_... is currently active.
However if an autoincremented access has been issued and autoinc
switched off in CSW afterwards, TAR does not get updated.

The change introduces mem_ap_update_tar_cache() which is called
after queuing of any access to MEM_AP_REG_DRW. It simulates
TAR increment to keep tar_value in sync with MEM_AP.
Crossing tar autoincrement block boundary invalidates cached value.

mem_ap_write() and mem_ap_read() do not check tar autoincrement
block boundary, mem_ap_setup_tar() is called before each transfer instead.

dap_invalidate_cache() is introduced to ensure invalidation
of all cached values during dap_dp_init() and swd_connect()

Change-Id: I815c2283d2989cffd6ea9a4100ce2f29dc3fb7b4
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/4162
Tested-by: jenkins
Reviewed-by: Christopher Head <chead@zaber.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2018-01-05 10:06:30 +00:00
..
2016-07-19 10:45:16 +01:00
2016-05-24 22:30:55 +01:00
2016-05-24 22:30:01 +01:00
2017-03-06 09:58:43 +00:00
2017-02-10 14:18:34 +01:00
2016-05-24 22:30:01 +01:00
2017-10-03 11:19:58 +01:00
2017-02-24 09:50:14 +00:00
2017-02-24 09:31:52 +00:00
2017-05-02 16:43:20 +01:00
2017-02-24 09:31:52 +00:00
2016-05-24 22:30:55 +01:00
2016-05-24 22:30:01 +01:00
2016-05-24 22:30:55 +01:00
2016-05-24 22:30:01 +01:00
2016-05-24 22:30:55 +01:00
2016-05-24 22:30:01 +01:00
2017-12-07 07:53:13 +00:00
2017-05-08 18:04:56 +01:00
2017-05-08 18:04:56 +01:00
2017-05-08 18:04:56 +01:00
2016-05-24 22:30:01 +01:00
2017-10-18 08:35:42 +01:00
2016-12-08 12:34:53 +00:00
2016-05-24 22:30:55 +01:00
2017-12-07 07:53:13 +00:00
2017-12-07 07:53:13 +00:00
2016-05-24 22:30:01 +01:00
2016-05-24 22:30:01 +01:00
2016-05-24 22:30:55 +01:00
2016-05-24 22:30:55 +01:00