OpenOCD
|
Go to the source code of this file.
Macros | |
#define | CP15_CTL 0x02 |
#define | CP15_CTL_DCACHE (1<<2) |
#define | CP15_CTL_ICACHE (1<<12) |
#define | GET_DCACHE_SIZE 18 |
#define | GET_ICACHE_SIZE 6 |
#define | NB_CACHE_WAYS 4 |
Functions | |
static uint32_t | arm946e_cp15_get_csize (struct target *target, int idsel) |
static void | arm946e_deinit_target (struct target *target) |
static int | arm946e_init_arch_info (struct target *target, struct arm946e_common *arm946e, struct jtag_tap *tap) |
static uint32_t | arm946e_invalidate_dcache (struct target *target, uint32_t address, uint32_t size, uint32_t count) |
static uint32_t | arm946e_invalidate_icache (struct target *target, uint32_t address, uint32_t size, uint32_t count) |
static uint32_t | arm946e_invalidate_whole_dcache (struct target *target) |
static uint32_t | arm946e_invalidate_whole_icache (struct target *target) |
static int | arm946e_post_debug_entry (struct target *target) |
static void | arm946e_pre_restore_context (struct target *target) |
static int | arm946e_read_cp15 (struct target *target, int reg_addr, uint32_t *value) |
static int | arm946e_read_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
static int | arm946e_target_create (struct target *target, Jim_Interp *interp) |
static void | arm946e_update_cp15_caches (struct target *target, uint32_t value) |
static int | arm946e_verify_pointer (struct command_invocation *cmd, struct arm946e_common *arm946e) |
static int | arm946e_write_cp15 (struct target *target, int reg_addr, uint32_t value) |
static int | arm946e_write_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
Writes a buffer, in the specified word size, with current MMU settings. More... | |
COMMAND_HANDLER (arm946e_handle_cp15) | |
COMMAND_HANDLER (arm946e_handle_idcache) | |
Variables | |
static const struct command_registration | arm946e_command_handlers [] |
static const struct command_registration | arm946e_exec_command_handlers [] |
static uint8_t | arm946e_preserve_cache |
flag to give info about cache manipulation during debug : "0" - cache lines are invalidated "on the fly", for affected addresses. More... | |
struct target_type | arm946e_target |
Holds methods for ARM946 targets. More... | |
|
static |
Definition at line 228 of file arm946e.c.
References arm946e_read_cp15(), arm946e_common::cp15_cache_info, ERROR_OK, and target_to_arm946().
Referenced by arm946e_invalidate_whole_dcache(), and arm946e_invalidate_whole_icache().
|
static |
Definition at line 91 of file arm946e.c.
References arm7_9_deinit(), arm_free_reg_cache(), target_to_arm(), and target_to_arm946().
|
static |
The ARM946E-S implements the ARMv5TE architecture which has the BKPT instruction, so we don't have to use a watchpoint comparator
disabling linefills leads to lockups, so keep them enabled for now this doesn't affect correctness, but might affect timing issues, if important data is evicted from the cache during the debug session
Definition at line 47 of file arm946e.c.
References arm946e_common::arm7_9_common, ARM946E_COMMON_MAGIC, arm946e_post_debug_entry(), arm946e_pre_restore_context(), arm946e_preserve_cache, arm9tdmi_init_arch_info(), arm7_9_common::arm_bkpt, ARMV5_BKPT, ARMV5_T_BKPT, arm946e_common::common_magic, ERROR_OK, arm7_9_common::post_debug_entry, arm7_9_common::pre_restore_context, and arm7_9_common::thumb_bkpt.
Referenced by arm946e_target_create().
|
static |
Find if the affected address is kept in the cache. Because JTAG Scan Chain 15 offers limited approach, we have to loop through all cache ways (segments) and read cache tags, then compare them with with address.
Definition at line 385 of file arm946e.c.
References arm946e_read_cp15(), arm946e_write_cp15(), count, ERROR_OK, LOG_DEBUG, NB_CACHE_WAYS, and size.
Referenced by arm946e_write_memory().
|
static |
Definition at line 450 of file arm946e.c.
References arm946e_read_cp15(), arm946e_write_cp15(), count, ERROR_OK, LOG_DEBUG, NB_CACHE_WAYS, and size.
Referenced by arm946e_write_memory().
|
static |
Definition at line 242 of file arm946e.c.
References arm946e_cp15_get_csize(), arm946e_read_cp15(), arm946e_write_cp15(), ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, GET_DCACHE_SIZE, LOG_DEBUG, and NB_CACHE_WAYS.
Referenced by arm946e_post_debug_entry().
|
static |
Invalidate (flush) I$ mcr 15, 0, r0, cr7, cr5, {0}
Definition at line 298 of file arm946e.c.
References arm946e_cp15_get_csize(), arm946e_write_cp15(), ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, GET_ICACHE_SIZE, and LOG_DEBUG.
Referenced by arm946e_post_debug_entry().
|
static |
Definition at line 319 of file arm946e.c.
References arm946e_invalidate_whole_dcache(), arm946e_invalidate_whole_icache(), arm946e_preserve_cache, arm946e_read_cp15(), arm946e_write_cp15(), arm946e_common::cp15_control_reg, CP15_CTL, CP15_CTL_DCACHE, CP15_CTL_ICACHE, ERROR_OK, LOG_DEBUG, and target_to_arm946().
Referenced by arm946e_init_arch_info().
|
static |
Read-modify-write CP15 control to reenable I/D-cache operation NOTE: It is not possible to disable cache by CP15. if arm946e_preserve_cache debugging flag enabled.
Definition at line 360 of file arm946e.c.
References arm946e_preserve_cache, arm946e_read_cp15(), arm946e_write_cp15(), arm946e_common::cp15_control_reg, CP15_CTL, CP15_CTL_DCACHE, CP15_CTL_ICACHE, ERROR_OK, LOG_DEBUG, and target_to_arm946().
Referenced by arm946e_init_arch_info().
|
static |
Definition at line 127 of file arm946e.c.
References arm_jtag_scann(), arm_jtag_set_instr(), arm_le_to_h_u32(), ERROR_OK, scan_field::in_value, arm_jtag::intest_instr, jtag_add_callback(), jtag_add_dr_scan(), jtag_execute_queue(), arm7_9_common::jtag_info, LOG_DEBUG, NULL, scan_field::num_bits, scan_field::out_value, arm_jtag::tap, TAP_IDLE, and target_to_arm7_9().
Referenced by arm946e_cp15_get_csize(), arm946e_invalidate_dcache(), arm946e_invalidate_icache(), arm946e_invalidate_whole_dcache(), arm946e_post_debug_entry(), arm946e_pre_restore_context(), and COMMAND_HANDLER().
|
static |
|
static |
Definition at line 82 of file arm946e.c.
References arm946e_init_arch_info(), ERROR_OK, and target::tap.
|
static |
Definition at line 114 of file arm946e.c.
References arm946e_common::cp15_control_reg, CP15_CTL_DCACHE, CP15_CTL_ICACHE, and target_to_arm946().
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 101 of file arm946e.c.
References ARM946E_COMMON_MAGIC, cmd, command_print(), arm946e_common::common_magic, ERROR_OK, and ERROR_TARGET_INVALID.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 176 of file arm946e.c.
References arm_jtag_scann(), arm_jtag_set_instr(), buf_set_u32(), ERROR_OK, scan_field::in_value, arm_jtag::intest_instr, jtag_add_dr_scan(), jtag_execute_queue(), arm7_9_common::jtag_info, LOG_DEBUG, NULL, scan_field::num_bits, scan_field::out_value, arm_jtag::tap, TAP_IDLE, and target_to_arm7_9().
Referenced by arm946e_invalidate_dcache(), arm946e_invalidate_icache(), arm946e_invalidate_whole_dcache(), arm946e_invalidate_whole_icache(), arm946e_post_debug_entry(), arm946e_pre_restore_context(), and COMMAND_HANDLER().
|
static |
Writes a buffer, in the specified word size, with current MMU settings.
Write memory
Definition at line 501 of file arm946e.c.
References arm7_9_write_memory_opt(), arm946e_invalidate_dcache(), arm946e_invalidate_icache(), arm946e_preserve_cache, buffer, count, arm946e_common::cp15_control_reg, CP15_CTL_DCACHE, CP15_CTL_ICACHE, ERROR_OK, LOG_DEBUG, size, and target_to_arm946().
COMMAND_HANDLER | ( | arm946e_handle_cp15 | ) |
Definition at line 563 of file arm946e.c.
References arm946e_read_cp15(), arm946e_update_cp15_caches(), arm946e_verify_pointer(), arm946e_write_cp15(), CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, CMD_NAME, COMMAND_PARSE_NUMBER, command_print(), CP15_CTL, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, ERROR_TARGET_NOT_HALTED, get_current_target(), jtag_execute_queue(), target::state, TARGET_HALTED, target_name(), and target_to_arm946().
|
static |
|
static |
|
static |
flag to give info about cache manipulation during debug : "0" - cache lines are invalidated "on the fly", for affected addresses.
This is preferred from performance point of view. "1" - cache is invalidated and switched off on debug_entry, and switched back on on restore. It is kept off during debugging.
Definition at line 41 of file arm946e.c.
Referenced by arm946e_init_arch_info(), arm946e_post_debug_entry(), arm946e_pre_restore_context(), and arm946e_write_memory().
struct target_type arm946e_target |