25 unsigned int ind, uint32_t *ccsidr)
64 while (((
size.way << i) & 0x80000000) == 0)
105 "ctr=0x%" PRIx32
" ctr.i_min_line_len=%" PRIu32
" ctr.d_min_line_len=%" PRIu32,
110 "clidr=0x%" PRIx32
" Number of cache levels to PoC=%" PRIu32,
114 uint32_t d_u_ccsidr[8], i_ccsidr[8];
115 for (
unsigned int cl = 0; cl < cache->
loc; cl++) {
148 for (
unsigned int cl = 0; cl < cache->
loc; cl++) {
149 unsigned int ctype = cache->
arch[cl].
ctype;
157 "data/unified cache index %" PRIu32
" << %" PRIu32
", way %" PRIu32
" << %" PRIu32,
164 "cache line %" PRIu32
" bytes %" PRIu32
" KBytes asso %" PRIu32
" ways",
175 "instruction cache index %" PRIu32
" << %" PRIu32
", way %" PRIu32
" << %" PRIu32,
182 "cache line %" PRIu32
" bytes %" PRIu32
" KBytes asso %" PRIu32
" ways",
207 while (addr_line < addr_end) {
211 addr_line += line_len;
231 while (addr_line < addr_end) {
235 addr_line += line_len;
258 for (
unsigned int cl = 0; cl < cache->
loc; cl++) {
263 "L%d I-Cache: line length %" PRIu32
", associativity %" PRIu32
264 ", num sets %" PRIu32
", cache size %" PRIu32
" KBytes",
273 "L%d %c-Cache: line length %" PRIu32
", associativity %" PRIu32
274 ", num sets %" PRIu32
", cache size %" PRIu32
" KBytes",
int mem_ap_read_u32(struct adiv5_ap *ap, target_addr_t address, uint32_t *value)
Asynchronous (queued) read of a word from memory or a system register.
int mem_ap_write_u32(struct adiv5_ap *ap, target_addr_t address, uint32_t value)
Asynchronous (queued) write of a word to memory or a system register.
int mem_ap_read_atomic_u32(struct adiv5_ap *ap, target_addr_t address, uint32_t *value)
Synchronous read of a word from memory or a system register.
int mem_ap_write_atomic_u32(struct adiv5_ap *ap, target_addr_t address, uint32_t value)
Synchronous write of a word to memory or a system register.
This defines formats and data structures used to talk to ADIv5 entities.
static int dap_run(struct adiv5_dap *dap)
Perform all queued DAP operations, and clear any errors posted in the CTRL_STAT register when they ar...
static struct armv7m_common * target_to_armv7m(struct target *target)
int armv7m_handle_cache_info_command(struct command_invocation *cmd, struct target *target)
int armv7m_i_cache_inval(struct target *target, uint32_t address, unsigned int length)
int armv7m_d_cache_flush(struct target *target, uint32_t address, unsigned int length)
static int get_cache_info(struct adiv5_ap *ap, unsigned int cl, unsigned int ind, uint32_t *ccsidr)
static int get_i_cache_info(struct adiv5_ap *ap, unsigned int cl, uint32_t *ccsidr)
int armv7m_identify_cache(struct target *target)
static struct armv7m_cache_size decode_ccsidr(uint32_t ccsidr)
static int get_d_u_cache_info(struct adiv5_ap *ap, unsigned int cl, uint32_t *ccsidr)
#define FIELD_GET(_mask, _value)
FIELD_GET(_mask, _value) - Extract a value from a bitfield @_mask: Bitfield mask @_value: Bitfield va...
#define FIELD_PREP(_mask, _value)
FIELD_PREP(_mask, _value) - Prepare a value for insertion into a bitfield @_mask: Bitfield mask @_val...
void command_print(struct command_invocation *cmd, const char *format,...)
#define CLIDR_CTYPE_UNIFIED_CACHE
#define CLIDR_CTYPE_D_CACHE
#define CTR_IMINLINE_MASK
#define CSSELR_IND_INSTRUCTION_CACHE
#define CSSELR_LEVEL_MASK
#define CLIDR_CTYPE_I_CACHE
#define CCSIDR_NUMSETS_MASK
#define CSSELR_IND_DATA_OR_UNIFIED_CACHE
#define CTR_DMINLINE_MASK
#define CLIDR_CTYPE_MASK(i)
#define CTR_FORMAT_PROVIDED
#define CCSIDR_LINESIZE_MASK
#define CCSIDR_ASSOCIATIVITY_MASK
uint32_t size
Size of dw_spi_transaction::buffer.
uint32_t address
Starting address. Sector aligned.
#define LOG_TARGET_DEBUG(target, fmt_str,...)
#define LOG_ERROR(expr ...)
This represents an ARM Debug Interface (v5) Access Port (AP).
struct adiv5_dap * dap
DAP this AP belongs to.
struct armv7m_cache_size i_size
struct armv7m_cache_size d_u_size
struct armv7m_arch_cache arch[6]
struct adiv5_ap * debug_ap
struct armv7m_cache_common armv7m_cache
When run_command is called, a new instance will be created on the stack, filled with the proper value...
static bool target_was_examined(const struct target *target)