forked from auracaster/openocd
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>
34 lines
1.3 KiB
C
34 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/***************************************************************************
|
|
* Copyright (C) 2015 Oleksij Rempel *
|
|
* linux@rempel-privat.de *
|
|
***************************************************************************/
|
|
|
|
#ifndef OPENOCD_TARGET_ARM7A_CACHE_H
|
|
#define OPENOCD_TARGET_ARM7A_CACHE_H
|
|
|
|
#include "arm_jtag.h"
|
|
#include "armv7a_cache_l2x.h"
|
|
|
|
int armv7a_l1_d_cache_clean_virt(struct target *target, uint32_t virt,
|
|
unsigned int size);
|
|
int armv7a_l1_d_cache_inval_virt(struct target *target, uint32_t virt,
|
|
uint32_t size);
|
|
int armv7a_l1_d_cache_flush_virt(struct target *target, uint32_t virt,
|
|
unsigned int size);
|
|
int armv7a_l1_i_cache_inval_all(struct target *target);
|
|
int armv7a_l1_i_cache_inval_virt(struct target *target, uint32_t virt,
|
|
uint32_t size);
|
|
int armv7a_cache_flush_all_data(struct target *target);
|
|
int armv7a_cache_flush_virt(struct target *target, uint32_t virt,
|
|
uint32_t size);
|
|
extern const struct command_registration arm7a_cache_command_handlers[];
|
|
|
|
/* CLIDR cache types */
|
|
#define CACHE_LEVEL_HAS_UNIFIED_CACHE 0x4
|
|
#define CACHE_LEVEL_HAS_D_CACHE 0x2
|
|
#define CACHE_LEVEL_HAS_I_CACHE 0x1
|
|
|
|
#endif /* OPENOCD_TARGET_ARM7A_CACHE_H */
|