cortex_a: drop the command 'cache auto'
The command 'cache auto' was introduced with commit cd440bd32a
("add armv7a_cache handlers") in 2015 to allow disabling the cache
handling done automatically by OpenOCD.
This was probably a way to test the cache handling when there were
still the two independent accesses for APB-AP CPU debug and for
AHB-AP memory bus.
The handling of cache for cortex_a is robust and there is no more
reason to disable it.
The command 'cache auto' is not used in any upstream script.
On target aarch64 this command has never been introduced as the
cache is always handled automatically by OpenOCD.
Drop the command 'cache auto' and add it in the deprecated list.
Drop the flag 'auto_cache_enabled' by considering it as true.
Rename the function 'armv7a_cache_auto_flush_all_data()' as
'armv7a_cache_flush_all_data()' and, while there, fix the error
propagation in SMP case.
Change-Id: I0399f1081b08c4929e0795b76f4a686630f41d56
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8230
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
This commit is contained in:
@@ -1362,10 +1362,8 @@ static int cortex_a_set_breakpoint(struct target *target,
|
||||
return retval;
|
||||
|
||||
/* make sure data cache is cleaned & invalidated down to PoC */
|
||||
if (!armv7a->armv7a_mmu.armv7a_cache.auto_cache_enabled) {
|
||||
armv7a_cache_flush_virt(target, breakpoint->address,
|
||||
armv7a_cache_flush_virt(target, breakpoint->address,
|
||||
breakpoint->length);
|
||||
}
|
||||
|
||||
retval = target_write_memory(target,
|
||||
breakpoint->address & 0xFFFFFFFE,
|
||||
@@ -1600,10 +1598,8 @@ static int cortex_a_unset_breakpoint(struct target *target, struct breakpoint *b
|
||||
} else {
|
||||
|
||||
/* make sure data cache is cleaned & invalidated down to PoC */
|
||||
if (!armv7a->armv7a_mmu.armv7a_cache.auto_cache_enabled) {
|
||||
armv7a_cache_flush_virt(target, breakpoint->address,
|
||||
armv7a_cache_flush_virt(target, breakpoint->address,
|
||||
breakpoint->length);
|
||||
}
|
||||
|
||||
/* restore original instruction (kept in target endianness) */
|
||||
if (breakpoint->length == 4) {
|
||||
|
||||
Reference in New Issue
Block a user