OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | aarch64_private_config |
Enumerations | |
enum | aarch64_cfg_param { CFG_CTI } |
enum | halt_mode { HALT_LAZY , HALT_SYNC } |
enum | restart_mode { RESTART_LAZY , RESTART_SYNC } |
Functions | |
static int | aarch64_add_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | aarch64_add_context_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | aarch64_add_hybrid_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | aarch64_add_watchpoint (struct target *target, struct watchpoint *watchpoint) |
static int | aarch64_assert_reset (struct target *target) |
static int | aarch64_check_state_one (struct target *target, uint32_t mask, uint32_t val, int *p_result, uint32_t *p_prsr) |
static int | aarch64_clear_reset_catch (struct target *target) |
static int | aarch64_dap_write_memap_register_u32 (struct target *target, target_addr_t address, uint32_t value) |
static int | aarch64_deassert_reset (struct target *target) |
static int | aarch64_debug_entry (struct target *target) |
static void | aarch64_deinit_target (struct target *target) |
static int | aarch64_do_restart_one (struct target *target, enum restart_mode mode) |
static int | aarch64_dpm_setup (struct aarch64_common *a8, uint64_t debug) |
static int | aarch64_enable_reset_catch (struct target *target, bool enable) |
static int | aarch64_examine (struct target *target) |
static int | aarch64_examine_first (struct target *target) |
static int | aarch64_halt (struct target *target) |
static int | aarch64_halt_one (struct target *target, enum halt_mode mode) |
static int | aarch64_halt_smp (struct target *target, bool exc_target) |
static int | aarch64_handle_target_request (void *priv) |
static int | aarch64_hit_watchpoint (struct target *target, struct watchpoint **hit_watchpoint) |
find out which watchpoint hits get exception address and compare the address to watchpoints More... | |
static int | aarch64_init_arch_info (struct target *target, struct aarch64_common *aarch64, struct adiv5_dap *dap) |
static int | aarch64_init_debug_access (struct target *target) |
static int | aarch64_init_target (struct command_context *cmd_ctx, struct target *target) |
static int | aarch64_jim_configure (struct target *target, struct jim_getopt_info *goi) |
static int | aarch64_mmu (struct target *target, int *enabled) |
static int | aarch64_mmu_modify (struct target *target, int enable) |
static int | aarch64_poll (struct target *target) |
static int | aarch64_post_debug_entry (struct target *target) |
static int | aarch64_prep_restart_smp (struct target *target, int handle_breakpoints, struct target **p_first) |
static int | aarch64_prepare_halt_smp (struct target *target, bool exc_target, struct target **p_first) |
static int | aarch64_prepare_restart_one (struct target *target) |
prepare single target for restart More... | |
static int | aarch64_read_cpu_memory (struct target *target, uint64_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
static int | aarch64_read_cpu_memory_fast (struct target *target, uint32_t count, uint8_t *buffer, uint32_t *dscr) |
static int | aarch64_read_cpu_memory_slow (struct target *target, uint32_t size, uint32_t count, uint8_t *buffer, uint32_t *dscr) |
static int | aarch64_read_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
static int | aarch64_read_phys_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
static int | aarch64_remove_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | aarch64_remove_watchpoint (struct target *target, struct watchpoint *watchpoint) |
static int | aarch64_restart_one (struct target *target, enum restart_mode mode) |
static int | aarch64_restore_context (struct target *target, bool bpwp) |
static int | aarch64_restore_one (struct target *target, int current, uint64_t *address, int handle_breakpoints, int debug_execution) |
static int | aarch64_restore_system_control_reg (struct target *target) |
static int | aarch64_resume (struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution) |
static int | aarch64_set_breakpoint (struct target *target, struct breakpoint *breakpoint, uint8_t matchmode) |
static int | aarch64_set_context_breakpoint (struct target *target, struct breakpoint *breakpoint, uint8_t matchmode) |
static int | aarch64_set_dscr_bits (struct target *target, unsigned long bit_mask, unsigned long value) |
static int | aarch64_set_hybrid_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | aarch64_set_watchpoint (struct target *target, struct watchpoint *watchpoint) |
static int | aarch64_step (struct target *target, int current, target_addr_t address, int handle_breakpoints) |
static int | aarch64_step_restart_smp (struct target *target) |
static int | aarch64_target_create (struct target *target, Jim_Interp *interp) |
static int | aarch64_unset_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | aarch64_unset_watchpoint (struct target *target, struct watchpoint *watchpoint) |
static int | aarch64_virt2phys (struct target *target, target_addr_t virt, target_addr_t *phys) |
static int | aarch64_wait_halt_one (struct target *target) |
static int | aarch64_write_cpu_memory (struct target *target, uint64_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
static int | aarch64_write_cpu_memory_fast (struct target *target, uint32_t count, const uint8_t *buffer, uint32_t *dscr) |
static int | aarch64_write_cpu_memory_slow (struct target *target, uint32_t size, uint32_t count, const uint8_t *buffer, uint32_t *dscr) |
static int | aarch64_write_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
static int | aarch64_write_phys_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
COMMAND_HANDLER (aarch64_handle_cache_info_command) | |
COMMAND_HANDLER (aarch64_handle_dbginit_command) | |
COMMAND_HANDLER (aarch64_handle_disassemble_command) | |
COMMAND_HANDLER (aarch64_mask_interrupts_command) | |
static int | jim_mcrmrc (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | update_halt_gdb (struct target *target, enum target_debug_reason debug_reason) |
Variables | |
static const struct command_registration | aarch64_command_handlers [] |
static const struct command_registration | aarch64_exec_command_handlers [] |
struct target_type | aarch64_target |
static const struct jim_nvp | nvp_config_opts [] |
enum aarch64_cfg_param |
enum restart_mode |
|
static |
Definition at line 1607 of file aarch64.c.
References aarch64_set_breakpoint(), BKPT_HARD, aarch64_common::brp_num_available, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_INFO, target_to_aarch64(), and breakpoint::type.
|
static |
Definition at line 1623 of file aarch64.c.
References aarch64_set_context_breakpoint(), BKPT_HARD, aarch64_common::brp_num_available, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_INFO, target_to_aarch64(), and breakpoint::type.
|
static |
Definition at line 1639 of file aarch64.c.
References aarch64_set_hybrid_breakpoint(), BKPT_HARD, aarch64_common::brp_num_available, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_INFO, target_to_aarch64(), and breakpoint::type.
|
static |
Definition at line 1805 of file aarch64.c.
References aarch64_set_watchpoint(), ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_INFO, target_to_aarch64(), and aarch64_common::wp_num_available.
|
static |
Definition at line 1919 of file aarch64.c.
References aarch64_enable_reset_catch(), adapter_assert_reset(), armv8_common::arm, arm::core_cache, CPUV8_DBG_DRCR, armv8_common::debug_ap, armv8_common::debug_base, DRCR_CSE, ERROR_FAIL, ERROR_OK, jtag_get_reset_config(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, mem_ap_write_atomic_u32(), reg_cache::next, register_cache_invalidate(), target::reset_halt, RESET_HAS_SRST, RESET_SRST_NO_GATING, RESET_SRST_PULLS_TRST, srst_asserted, target::state, TARGET_EVENT_RESET_ASSERT, target_handle_event(), target_has_event_action(), target_name(), TARGET_RESET, target_to_armv8(), and target_was_examined().
|
static |
Definition at line 278 of file aarch64.c.
References CPUV8_DBG_PRSR, armv8_common::debug_ap, armv8_common::debug_base, ERROR_OK, mask, mem_ap_read_atomic_u32(), and target_to_armv8().
Referenced by aarch64_do_restart_one(), aarch64_halt_smp(), aarch64_poll(), aarch64_resume(), aarch64_step(), aarch64_step_restart_smp(), and aarch64_wait_halt_one().
|
static |
Definition at line 1890 of file aarch64.c.
References CPUV8_DBG_EDESR, armv8_common::debug_ap, armv8_common::debug_base, ERROR_OK, ESR_RC, LOG_DEBUG, mem_ap_read_atomic_u32(), mem_ap_write_atomic_u32(), and target_to_armv8().
Referenced by aarch64_deassert_reset().
|
static |
Definition at line 245 of file aarch64.c.
References armv8_common::debug_ap, mem_ap_write_atomic_u32(), and target_to_armv8().
Referenced by aarch64_set_breakpoint(), aarch64_set_context_breakpoint(), aarch64_set_hybrid_breakpoint(), aarch64_set_watchpoint(), aarch64_unset_breakpoint(), and aarch64_unset_watchpoint().
|
static |
Definition at line 1981 of file aarch64.c.
References aarch64_clear_reset_catch(), aarch64_enable_reset_catch(), aarch64_halt_one(), aarch64_init_debug_access(), aarch64_poll(), adapter_deassert_reset(), ERROR_OK, HALT_LAZY, LOG_DEBUG, LOG_WARNING, target::reset_halt, target::state, TARGET_HALTED, target_name(), TARGET_UNKNOWN, and target_was_examined().
|
static |
Definition at line 942 of file aarch64.c.
References arm_cti_ack_events(), arm_cti_write_reg(), ARM_STATE_AARCH64, armv8_dpm_get_core_state(), armv8_dpm_read_current_registers(), armv8_dpm_report_dscr(), armv8_select_opcodes(), armv8_select_reg_access(), CPUV8_DBG_DRCR, CPUV8_DBG_DSCR, CPUV8_DBG_EDWAR0, CPUV8_DBG_EDWAR1, armv8_common::cti, CTI_GATE, CTI_TRIG, DBG_REASON_WATCHPOINT, armv8_common::debug_ap, armv8_common::debug_base, target::debug_reason, armv8_common::dpm, DRCR_CSE, arm_dpm::dscr, ERROR_OK, arm_dpm::instr_cpsr_sync, LOG_DEBUG, mem_ap_read_atomic_u32(), mem_ap_write_atomic_u32(), armv8_common::post_debug_entry, target_name(), target_to_armv8(), and arm_dpm::wp_addr.
Referenced by aarch64_poll().
|
static |
Definition at line 2746 of file aarch64.c.
References aarch64_common::armv8_common, armv8_free_reg_cache(), aarch64_common::brp_list, dap_put_ap(), arm_dpm::dbp, armv8_common::debug_ap, armv8_common::dpm, arm_dpm::dwp, target::private_config, and target_to_aarch64().
|
static |
Definition at line 670 of file aarch64.c.
References aarch64_check_state_one(), arm_cti_pulse_channel(), armv8_common::cti, DBG_REASON_NOTHALTED, target::debug_reason, ERROR_OK, ERROR_TARGET_TIMEOUT, LOG_DEBUG, LOG_ERROR, mode, NULL, PRSR_SDR, RESTART_SYNC, target::state, target_name(), TARGET_RUNNING, target_to_armv8(), and timeval_ms().
Referenced by aarch64_restart_one(), aarch64_resume(), and aarch64_step_restart_smp().
|
static |
Definition at line 257 of file aarch64.c.
References arm_dpm::arm, armv8_common::arm, aarch64_common::armv8_common, armv8_dpm_initialize(), armv8_dpm_setup(), arm_dpm::didr, armv8_common::dpm, and ERROR_OK.
Referenced by aarch64_examine_first().
|
static |
Definition at line 1869 of file aarch64.c.
References CPUV8_DBG_EDECR, armv8_common::debug_ap, armv8_common::debug_base, ECR_RCE, ERROR_OK, LOG_DEBUG, mem_ap_read_atomic_u32(), mem_ap_write_atomic_u32(), and target_to_armv8().
Referenced by aarch64_assert_reset(), and aarch64_deassert_reset().
|
static |
Definition at line 2680 of file aarch64.c.
References aarch64_examine_first(), aarch64_init_debug_access(), ERROR_OK, and target_was_examined().
|
static |
Definition at line 2533 of file aarch64.c.
References aarch64_dpm_setup(), AARCH64_ISRMASK_ON, aarch64_private_config::adiv5_config, adiv5_private_config::ap_num, AP_TYPE_APB_AP, armv8_common::arm, ARM_CS_C9_DEVTYPE_CORE_DEBUG, aarch64_common::armv8_common, BRP_CONTEXT, aarch64_common::brp_list, BRP_NORMAL, aarch64_common::brp_num, aarch64_common::brp_num_available, aarch64_common::brp_num_context, aarch64_brp::brpn, aarch64_brp::control, target::coreid, CPUV8_DBG_DBGFEATURE0, CPUV8_DBG_MAINID0, CPUV8_DBG_MEMFEATURE0, CPUV8_DBG_OSLAR, aarch64_private_config::cti, armv8_common::cti, arm::dap, adiv5_ap::dap, dap_find_get_ap(), dap_get_ap(), dap_lookup_cs_component(), dap_run(), DBG_REASON_NOTHALTED, target::dbgbase, target::dbgbase_set, armv8_common::debug_ap, armv8_common::debug_base, target::debug_reason, DP_APSEL_INVALID, ERROR_FAIL, ERROR_OK, aarch64_common::isrmasking_mode, LOG_DEBUG, LOG_ERROR, LOG_TARGET_ERROR, mem_ap_init(), mem_ap_read_u32(), mem_ap_write_atomic_u32(), adiv5_ap::memaccess_tck, target::private_config, target::state, TARGET_ADDR_FMT, target_name(), target_set_examined(), target_to_aarch64(), TARGET_UNKNOWN, aarch64_brp::type, aarch64_brp::used, aarch64_brp::value, aarch64_common::wp_list, aarch64_common::wp_num, and aarch64_common::wp_num_available.
Referenced by aarch64_examine().
|
static |
Definition at line 552 of file aarch64.c.
References aarch64_halt_one(), aarch64_halt_smp(), ARMV8_RUNCONTROL_HALT, HALT_SYNC, armv8_common::last_run_control_op, target::smp, and target_to_armv8().
Definition at line 366 of file aarch64.c.
References aarch64_set_dscr_bits(), aarch64_wait_halt_one(), arm_cti_pulse_channel(), armv8_common::cti, DSCR_HDE, ERROR_OK, ERROR_TARGET_TIMEOUT, HALT_SYNC, LOG_DEBUG, LOG_ERROR, mode, target_name(), and target_to_armv8().
Referenced by aarch64_deassert_reset(), aarch64_halt(), aarch64_halt_smp(), and aarch64_step().
|
static |
Definition at line 395 of file aarch64.c.
References aarch64_check_state_one(), aarch64_halt_one(), aarch64_prepare_halt_smp(), ERROR_OK, ERROR_TARGET_TIMEOUT, foreach_smp_target, HALT_LAZY, halted(), target::next, NULL, PRSR_HALT, target::smp_targets, target, target_list::target, target_was_examined(), and timeval_ms().
Referenced by aarch64_halt(), and update_halt_gdb().
|
static |
Definition at line 2501 of file aarch64.c.
References CPUV8_DBG_DSCR, CPUV8_DBG_DTRTX, target::dbg_msg_enabled, armv8_common::debug_ap, armv8_common::debug_base, DSCR_DTR_TX_FULL, ERROR_OK, mem_ap_read_atomic_u32(), priv, target::state, target_request(), TARGET_RUNNING, target_to_armv8(), and target_was_examined().
Referenced by aarch64_init_arch_info().
|
static |
find out which watchpoint hits get exception address and compare the address to watchpoints
Definition at line 1840 of file aarch64.c.
References watchpoint::address, DBG_REASON_WATCHPOINT, target::debug_reason, armv8_common::dpm, ERROR_FAIL, ERROR_OK, watchpoint::length, watchpoint::next, target_to_armv8(), target::watchpoints, and arm_dpm::wp_addr.
|
static |
Definition at line 2707 of file aarch64.c.
References AARCH64_COMMON_MAGIC, aarch64_handle_target_request(), aarch64_post_debug_entry(), aarch64_read_phys_memory(), armv8_common::arm, aarch64_common::armv8_common, armv8_init_arch_info(), armv8_common::armv8_mmu, aarch64_common::common_magic, arm::dap, ERROR_OK, armv8_common::examine_debug_reason, NULL, armv8_common::post_debug_entry, armv8_common::pre_restore_context, armv8_mmu_common::read_physical_memory, target_register_timer_callback(), and TARGET_TIMER_TYPE_PERIODIC.
Referenced by aarch64_target_create().
|
static |
Definition at line 196 of file aarch64.c.
References arm_cti_enable(), arm_cti_write_reg(), CPUV8_DBG_OSLAR, CPUV8_DBG_PRSR, armv8_common::cti, CTI_CHNL, CTI_GATE, CTI_OUTEN0, CTI_OUTEN1, armv8_common::debug_ap, armv8_common::debug_base, dummy, ERROR_OK, LOG_DEBUG, mem_ap_read_atomic_u32(), mem_ap_write_atomic_u32(), target_name(), and target_to_armv8().
Referenced by aarch64_deassert_reset(), aarch64_examine(), and COMMAND_HANDLER().
|
static |
Definition at line 2699 of file aarch64.c.
References arm_semihosting_init(), and ERROR_OK.
|
static |
Definition at line 2792 of file aarch64.c.
References aarch64_private_config::adiv5_config, adiv5_jim_configure(), adiv5_private_config::ap_num, jim_getopt_info::argc, jim_getopt_info::argv, arm_cti_name(), CFG_CTI, aarch64_private_config::cti, cti_instance_by_jim_obj(), DP_APSEL_INVALID, jim_getopt_info::interp, jim_getopt_info::isconfigure, jim_getopt_obj(), jim_nvp_name2value_obj(), NULL, nvp_config_opts, target::private_config, and jim_nvp::value.
|
static |
Definition at line 2763 of file aarch64.c.
References aarch64_common::armv8_common, armv8_common::armv8_mmu, ERROR_OK, ERROR_TARGET_INVALID, LOG_ERROR, armv8_mmu_common::mmu_enabled, target::state, TARGET_HALTED, target_name(), and target_to_aarch64().
Referenced by aarch64_read_memory(), and aarch64_write_memory().
|
static |
Definition at line 121 of file aarch64.c.
References armv8_common::arm, ARM_MODE_ABT, ARM_MODE_ANY, ARM_MODE_FIQ, ARM_MODE_HYP, ARM_MODE_IRQ, ARM_MODE_SVC, ARM_MODE_SYS, ARM_MODE_UND, ARMV4_5_MCR, ARMV8_64_EL0T, ARMV8_64_EL1H, ARMV8_64_EL1T, ARMV8_64_EL2H, ARMV8_64_EL2T, ARMV8_64_EL3H, ARMV8_64_EL3T, armv8_mmu_common::armv8_cache, aarch64_common::armv8_common, armv8_dpm_modeswitch(), armv8_common::armv8_mmu, ARMV8_MSR_GP, arm::core_mode, armv8_common::dpm, ERROR_FAIL, ERROR_OK, armv8_cache_common::flush_all_data_cache, arm_dpm::instr_write_data_r0, LOG_DEBUG, LOG_ERROR, aarch64_common::system_control_reg, aarch64_common::system_control_reg_curr, SYSTEM_SCTLR_EL1, SYSTEM_SCTLR_EL2, SYSTEM_SCTLR_EL3, and target_to_aarch64().
Referenced by aarch64_read_memory(), aarch64_read_phys_memory(), aarch64_write_memory(), and aarch64_write_phys_memory().
|
static |
Definition at line 504 of file aarch64.c.
References aarch64_check_state_one(), aarch64_debug_entry(), arm_semihosting(), target::debug_reason, ERROR_OK, halted(), LOG_DEBUG, NULL, PRSR_HALT, target::smp, target::state, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_DEBUG_HALTED, TARGET_EVENT_HALTED, TARGET_HALTED, target_name(), TARGET_RESET, TARGET_RUNNING, TARGET_UNKNOWN, and update_halt_gdb().
Referenced by aarch64_deassert_reset(), and update_halt_gdb().
|
static |
Definition at line 1011 of file aarch64.c.
References armv8_common::arm, ARM_MODE_ABT, ARM_MODE_ANY, ARM_MODE_FIQ, ARM_MODE_HYP, ARM_MODE_IRQ, ARM_MODE_SVC, ARM_MODE_SYS, ARM_MODE_UND, ARMV4_5_MRC, ARMV8_64_EL0T, ARMV8_64_EL1H, ARMV8_64_EL1T, ARMV8_64_EL2H, ARMV8_64_EL2T, ARMV8_64_EL3H, ARMV8_64_EL3T, armv8_mmu_common::armv8_cache, aarch64_common::armv8_common, armv8_dpm_modeswitch(), armv8_identify_cache(), armv8_common::armv8_mmu, armv8_mode_name(), ARMV8_MRS, armv8_read_mpidr(), arm::core_mode, armv8_cache_common::d_u_cache_enabled, armv8_common::dpm, ERROR_FAIL, ERROR_OK, armv8_cache_common::i_cache_enabled, armv8_cache_common::info, arm_dpm::instr_read_data_r0, LOG_DEBUG, LOG_ERROR, armv8_mmu_common::mmu_enabled, aarch64_common::system_control_reg, aarch64_common::system_control_reg_curr, SYSTEM_SCTLR_EL1, SYSTEM_SCTLR_EL2, SYSTEM_SCTLR_EL3, and target_to_aarch64().
Referenced by aarch64_init_arch_info().
|
static |
Definition at line 728 of file aarch64.c.
References aarch64_prepare_restart_one(), aarch64_restore_one(), ERROR_OK, foreach_smp_target, LOG_ERROR, NULL, target::smp_targets, target::state, target_list::target, TARGET_HALTED, target_name(), and target_was_examined().
Referenced by aarch64_resume(), and aarch64_step_restart_smp().
|
static |
Definition at line 321 of file aarch64.c.
References aarch64_set_dscr_bits(), arm_cti_ungate_channel(), armv8_common::cti, DBG_REASON_DBGRQ, target::debug_reason, DSCR_HDE, ERROR_OK, foreach_smp_target, LOG_DEBUG, NULL, target::smp_targets, target::state, target, target_list::target, target_name(), TARGET_RUNNING, target_to_armv8(), and target_was_examined().
Referenced by aarch64_halt_smp().
|
static |
prepare single target for restart
Definition at line 623 of file aarch64.c.
References arm_cti_ack_events(), arm_cti_gate_channel(), arm_cti_ungate_channel(), CPUV8_DBG_DSCR, CPUV8_DBG_PRSR, armv8_common::cti, CTI_TRIG, armv8_common::debug_ap, armv8_common::debug_base, DSCR_ERR, DSCR_HDE, DSCR_ITE, ERROR_OK, LOG_DEBUG, LOG_ERROR, mem_ap_read_atomic_u32(), mem_ap_write_atomic_u32(), target_name(), and target_to_armv8().
Referenced by aarch64_prep_restart_smp(), and aarch64_restart_one().
|
static |
Definition at line 2337 of file aarch64.c.
References aarch64_read_cpu_memory_fast(), aarch64_read_cpu_memory_slow(), armv8_common::arm, ARM_STATE_AARCH64, ARMV4_5_MRC, armv8_dpm_handle_exception(), ARMV8_MRS, armv8_reg_current(), buffer, arm::core_state, count, CPUV8_DBG_DSCR, armv8_common::debug_ap, armv8_common::debug_base, reg::dirty, arm::dpm, armv8_common::dpm, arm_dpm::dscr, DSCR_ERR, DSCR_MA, DSCR_SYS_ERROR_PEND, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, arm_dpm::instr_write_data_dcc, arm_dpm::instr_write_data_dcc_64, LOG_DEBUG, LOG_ERROR, LOG_WARNING, mem_ap_read_atomic_u32(), mem_ap_write_atomic_u32(), size, target::state, SYSTEM_DBG_DBGDTR_EL0, TARGET_HALTED, and target_to_armv8().
Referenced by aarch64_read_memory(), and aarch64_read_phys_memory().
|
static |
Definition at line 2268 of file aarch64.c.
References armv8_common::arm, ARM_STATE_AARCH64, ARMV4_5_MCR, ARMV8_MSR_GP, armv8_reg_current(), buffer, arm::core_state, count, CPUV8_DBG_DSCR, CPUV8_DBG_DTRTX, armv8_common::debug_ap, armv8_common::debug_base, reg::dirty, arm::dpm, armv8_common::dpm, DSCR_MA, ERROR_OK, arm_dpm::instr_execute, mem_ap_read_atomic_u32(), mem_ap_read_buf_noincr(), mem_ap_write_atomic_u32(), SYSTEM_DBG_DBGDTR_EL0, target_buffer_set_u32(), and target_to_armv8().
Referenced by aarch64_read_cpu_memory().
|
static |
Definition at line 2209 of file aarch64.c.
References armv8_common::arm, ARM_STATE_AARCH64, ARMV4_5_MCR, ARMV8_MSR_GP, ARMV8_OPC_LDRB_IP, ARMV8_OPC_LDRH_IP, ARMV8_OPC_LDRW_IP, armv8_reg_current(), buffer, arm::core_state, count, CPUV8_DBG_DSCR, CPUV8_DBG_DTRTX, armv8_common::debug_ap, armv8_common::debug_base, reg::dirty, arm::dpm, armv8_common::dpm, DSCR_MA, ERROR_OK, arm_dpm::instr_execute, mem_ap_read_atomic_u32(), mem_ap_write_atomic_u32(), size, SYSTEM_DBG_DTRTX_EL0, target_buffer_set_u16(), target_buffer_set_u32(), and target_to_armv8().
Referenced by aarch64_read_cpu_memory().
|
static |
Definition at line 2444 of file aarch64.c.
References aarch64_mmu(), aarch64_mmu_modify(), aarch64_read_cpu_memory(), buffer, count, ERROR_OK, and size.
|
static |
Definition at line 2428 of file aarch64.c.
References aarch64_mmu_modify(), aarch64_read_cpu_memory(), buffer, count, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, and size.
Referenced by aarch64_init_arch_info().
|
static |
Definition at line 1655 of file aarch64.c.
References aarch64_unset_breakpoint(), BKPT_HARD, aarch64_common::brp_num_available, ERROR_OK, ERROR_TARGET_NOT_HALTED, breakpoint::is_set, LOG_WARNING, target::state, TARGET_HALTED, target_to_aarch64(), and breakpoint::type.
|
static |
Definition at line 1823 of file aarch64.c.
References aarch64_unset_watchpoint(), ERROR_OK, watchpoint::is_set, target_to_aarch64(), and aarch64_common::wp_num_available.
|
static |
Definition at line 712 of file aarch64.c.
References aarch64_do_restart_one(), aarch64_prepare_restart_one(), ERROR_OK, LOG_DEBUG, mode, and target_name().
Referenced by aarch64_resume(), and aarch64_step().
|
static |
Definition at line 1189 of file aarch64.c.
References armv8_common::arm, armv8_dpm_write_dirty_registers(), arm::core_cache, armv8_common::dpm, ERROR_OK, LOG_DEBUG, reg_cache::next, armv8_common::pre_restore_context, register_cache_invalidate(), target_name(), and target_to_armv8().
Referenced by aarch64_restore_one().
|
static |
Definition at line 563 of file aarch64.c.
References aarch64_restore_context(), aarch64_restore_system_control_reg(), armv8_common::arm, ARM_STATE_AARCH64, ARM_STATE_ARM, ARM_STATE_JAZELLE, ARM_STATE_THUMB, ARM_STATE_THUMB_EE, buf_get_u64(), buf_set_u64(), arm::core_state, reg::dirty, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, arm::pc, target_free_all_working_areas(), target_name(), target_to_armv8(), reg::valid, and reg::value.
Referenced by aarch64_prep_restart_smp(), aarch64_resume(), and aarch64_step().
|
static |
Definition at line 58 of file aarch64.c.
References armv8_common::arm, ARM_MODE_ABT, ARM_MODE_ANY, ARM_MODE_FIQ, ARM_MODE_HYP, ARM_MODE_IRQ, ARM_MODE_SVC, ARM_MODE_SYS, ARM_MODE_UND, ARMV4_5_MCR, ARMV8_64_EL0T, ARMV8_64_EL1H, ARMV8_64_EL1T, ARMV8_64_EL2H, ARMV8_64_EL2T, ARMV8_64_EL3H, ARMV8_64_EL3T, armv8_dpm_modeswitch(), armv8_mode_name(), ARMV8_MSR_GP, arm::core_mode, armv8_common::dpm, ERROR_FAIL, ERROR_OK, arm_dpm::instr_write_data_r0, LOG_ERROR, aarch64_common::system_control_reg, aarch64_common::system_control_reg_curr, SYSTEM_SCTLR_EL1, SYSTEM_SCTLR_EL2, SYSTEM_SCTLR_EL3, target_to_aarch64(), and target_to_armv8().
Referenced by aarch64_restore_one().
|
static |
Definition at line 839 of file aarch64.c.
References aarch64_check_state_one(), aarch64_do_restart_one(), aarch64_prep_restart_smp(), aarch64_restart_one(), aarch64_restore_one(), addr, ARMV8_RUNCONTROL_RESUME, DBG_REASON_NOTHALTED, target::debug_reason, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_TIMEOUT, foreach_smp_target, armv8_common::last_run_control_op, LOG_DEBUG, LOG_ERROR, NULL, PRSR_HALT, PRSR_SDR, RESTART_LAZY, RESTART_SYNC, target::smp, target::smp_targets, target::state, target, target_list::target, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_DEBUG_RESUMED, TARGET_EVENT_RESUMED, TARGET_HALTED, target_name(), TARGET_RUNNING, target_to_armv8(), target_was_examined(), and timeval_ms().
|
static |
core_state is ARM_STATE_ARM in that case the opcode depends on breakpoint length:
Definition at line 1216 of file aarch64.c.
References aarch64_dap_write_memap_register_u32(), aarch64_set_dscr_bits(), breakpoint::address, ARM_STATE_AARCH64, armv8_cache_d_inner_flush_virt(), armv8_cache_i_inner_inval_virt(), aarch64_common::armv8_common, armv8_dpm_get_core_state(), ARMV8_HLT, ARMV8_HLT_A1, ARMV8_HLT_T1, BKPT_HARD, BKPT_SOFT, breakpoint_hw_set(), aarch64_common::brp_list, aarch64_common::brp_num, aarch64_brp::brpn, buf_set_u32(), aarch64_brp::control, CPUV8_DBG_BCR_BASE, CPUV8_DBG_BVR_BASE, armv8_common::debug_base, armv8_common::dpm, DSCR_HDE, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, breakpoint::is_set, breakpoint::length, LOG_DEBUG, LOG_ERROR, LOG_WARNING, breakpoint::orig_instr, TARGET_PRIxADDR, target_read_memory(), target_to_aarch64(), target_write_memory(), breakpoint::type, aarch64_brp::used, and aarch64_brp::value.
Referenced by aarch64_add_breakpoint().
|
static |
Definition at line 1337 of file aarch64.c.
References aarch64_dap_write_memap_register_u32(), aarch64_common::armv8_common, breakpoint::asid, breakpoint_hw_set(), BRP_CONTEXT, aarch64_common::brp_list, aarch64_common::brp_num, aarch64_brp::brpn, aarch64_brp::control, CPUV8_DBG_BCR_BASE, CPUV8_DBG_BVR_BASE, armv8_common::debug_base, ERROR_FAIL, ERROR_OK, breakpoint::is_set, LOG_DEBUG, LOG_ERROR, LOG_WARNING, TARGET_PRIxADDR, target_to_aarch64(), type, aarch64_brp::used, and aarch64_brp::value.
Referenced by aarch64_add_context_breakpoint().
|
static |
Definition at line 272 of file aarch64.c.
References armv8_set_dbgreg_bits(), CPUV8_DBG_DSCR, and target_to_armv8().
Referenced by aarch64_halt_one(), aarch64_prepare_halt_smp(), aarch64_set_breakpoint(), aarch64_set_watchpoint(), and aarch64_step().
|
static |
Definition at line 1387 of file aarch64.c.
References aarch64_dap_write_memap_register_u32(), breakpoint::address, aarch64_common::armv8_common, breakpoint::asid, breakpoint_hw_set(), BRP_CONTEXT, aarch64_common::brp_list, BRP_NORMAL, aarch64_common::brp_num, aarch64_brp::brpn, aarch64_brp::control, CPUV8_DBG_BCR_BASE, CPUV8_DBG_BVR_BASE, armv8_common::debug_base, ERROR_FAIL, ERROR_OK, breakpoint::is_set, breakpoint::linked_brp, LOG_DEBUG, LOG_ERROR, LOG_WARNING, target_to_aarch64(), type, aarch64_brp::used, and aarch64_brp::value.
Referenced by aarch64_add_hybrid_breakpoint().
|
static |
Definition at line 1677 of file aarch64.c.
References aarch64_dap_write_memap_register_u32(), aarch64_set_dscr_bits(), watchpoint::address, aarch64_common::armv8_common, aarch64_brp::brpn, aarch64_brp::control, CPUV8_DBG_WCR_BASE, CPUV8_DBG_WVR_BASE, armv8_common::debug_base, DSCR_HDE, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, watchpoint::is_set, length, watchpoint::length, LOG_DEBUG, LOG_ERROR, LOG_WARNING, offset, watchpoint::rw, TARGET_PRIxADDR, target_to_aarch64(), aarch64_brp::used, aarch64_brp::value, watchpoint_set(), aarch64_common::wp_list, aarch64_common::wp_num, WPT_ACCESS, WPT_READ, and WPT_WRITE.
Referenced by aarch64_add_watchpoint().
|
static |
Definition at line 1082 of file aarch64.c.
References aarch64_check_state_one(), aarch64_halt_one(), AARCH64_ISRMASK_ON, aarch64_restart_one(), aarch64_restore_one(), aarch64_set_dscr_bits(), aarch64_step_restart_smp(), arm_cti_gate_channel(), ARMV8_RUNCONTROL_STEP, CPUV8_DBG_EDECR, armv8_common::cti, armv8_common::debug_ap, armv8_common::debug_base, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_TIMEOUT, HALT_SYNC, aarch64_common::isrmasking_mode, armv8_common::last_run_control_op, LOG_DEBUG, LOG_ERROR, LOG_WARNING, mem_ap_read_atomic_u32(), mem_ap_write_atomic_u32(), PRSR_HALT, PRSR_SDR, RESTART_LAZY, target::smp, target::state, target_call_event_callbacks(), TARGET_EVENT_RESUMED, TARGET_HALTED, target_name(), target_to_aarch64(), target_to_armv8(), and timeval_ms().
|
static |
Definition at line 766 of file aarch64.c.
References aarch64_check_state_one(), aarch64_do_restart_one(), aarch64_prep_restart_smp(), DBG_REASON_NOTHALTED, target::debug_reason, ERROR_OK, ERROR_TARGET_TIMEOUT, foreach_smp_target, LOG_DEBUG, LOG_ERROR, NULL, PRSR_HALT, PRSR_SDR, RESTART_LAZY, target::smp_targets, target::state, target, target_list::target, target_call_event_callbacks(), TARGET_EVENT_RESUMED, target_name(), TARGET_RUNNING, target_was_examined(), and timeval_ms().
Referenced by aarch64_step().
|
static |
Definition at line 2729 of file aarch64.c.
References aarch64_init_arch_info(), aarch64_private_config::adiv5_config, adiv5_verify_config(), adiv5_private_config::dap, ERROR_FAIL, ERROR_OK, LOG_ERROR, and target::private_config.
|
static |
Definition at line 1474 of file aarch64.c.
References aarch64_dap_write_memap_register_u32(), breakpoint::address, armv8_cache_d_inner_flush_virt(), armv8_cache_i_inner_inval_virt(), aarch64_common::armv8_common, breakpoint::asid, BKPT_HARD, aarch64_common::brp_list, aarch64_common::brp_num, aarch64_brp::brpn, aarch64_brp::control, CPUV8_DBG_BCR_BASE, CPUV8_DBG_BVR_BASE, armv8_common::debug_base, ERROR_OK, breakpoint::is_set, breakpoint::length, breakpoint::linked_brp, LOG_DEBUG, LOG_WARNING, breakpoint::number, breakpoint::orig_instr, TARGET_PRIxADDR, target_to_aarch64(), target_write_memory(), breakpoint::type, aarch64_brp::used, and aarch64_brp::value.
Referenced by aarch64_remove_breakpoint().
|
static |
Definition at line 1761 of file aarch64.c.
References aarch64_dap_write_memap_register_u32(), aarch64_common::armv8_common, aarch64_brp::brpn, aarch64_brp::control, CPUV8_DBG_WCR_BASE, CPUV8_DBG_WVR_BASE, armv8_common::debug_base, ERROR_OK, watchpoint::is_set, LOG_DEBUG, LOG_WARNING, watchpoint::number, target_to_aarch64(), aarch64_brp::used, aarch64_brp::value, aarch64_common::wp_list, and aarch64_common::wp_num.
Referenced by aarch64_remove_watchpoint().
|
static |
Definition at line 2774 of file aarch64.c.
References armv8_mmu_translate_va_pa().
|
static |
Definition at line 299 of file aarch64.c.
References aarch64_check_state_one(), ERROR_OK, ERROR_TARGET_TIMEOUT, halted(), LOG_DEBUG, PRSR_HALT, target_name(), and timeval_ms().
Referenced by aarch64_halt_one().
|
static |
Definition at line 2122 of file aarch64.c.
References aarch64_write_cpu_memory_fast(), aarch64_write_cpu_memory_slow(), armv8_common::arm, ARM_STATE_AARCH64, ARMV4_5_MRC, armv8_dpm_handle_exception(), ARMV8_MRS, armv8_reg_current(), buffer, arm::core_state, count, CPUV8_DBG_DSCR, armv8_common::debug_ap, armv8_common::debug_base, reg::dirty, arm::dpm, armv8_common::dpm, arm_dpm::dscr, DSCR_ERR, DSCR_MA, DSCR_SYS_ERROR_PEND, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, arm_dpm::instr_write_data_dcc, arm_dpm::instr_write_data_dcc_64, LOG_ERROR, LOG_WARNING, mem_ap_read_atomic_u32(), mem_ap_write_atomic_u32(), size, target::state, SYSTEM_DBG_DBGDTR_EL0, TARGET_HALTED, and target_to_armv8().
Referenced by aarch64_write_memory(), and aarch64_write_phys_memory().
|
static |
Definition at line 2089 of file aarch64.c.
References armv8_common::arm, armv8_reg_current(), buffer, count, CPUV8_DBG_DSCR, CPUV8_DBG_DTRRX, armv8_common::debug_ap, armv8_common::debug_base, reg::dirty, DSCR_MA, ERROR_OK, mem_ap_write_atomic_u32(), mem_ap_write_buf_noincr(), and target_to_armv8().
Referenced by aarch64_write_cpu_memory().
|
static |
Definition at line 2030 of file aarch64.c.
References armv8_common::arm, ARM_STATE_AARCH64, ARMV4_5_MRC, ARMV8_MRS, ARMV8_OPC_STRB_IP, ARMV8_OPC_STRH_IP, ARMV8_OPC_STRW_IP, armv8_reg_current(), buffer, arm::core_state, count, CPUV8_DBG_DSCR, CPUV8_DBG_DTRRX, armv8_common::debug_ap, armv8_common::debug_base, reg::dirty, arm::dpm, armv8_common::dpm, DSCR_MA, ERROR_OK, arm_dpm::instr_execute, mem_ap_write_atomic_u32(), size, SYSTEM_DBG_DTRRX_EL0, target_buffer_get_u16(), target_buffer_get_u32(), and target_to_armv8().
Referenced by aarch64_write_cpu_memory().
|
static |
Definition at line 2481 of file aarch64.c.
References aarch64_mmu(), aarch64_mmu_modify(), aarch64_write_cpu_memory(), buffer, count, ERROR_OK, and size.
|
static |
Definition at line 2464 of file aarch64.c.
References aarch64_mmu_modify(), aarch64_write_cpu_memory(), buffer, count, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, and size.
COMMAND_HANDLER | ( | aarch64_handle_cache_info_command | ) |
Definition at line 2874 of file aarch64.c.
References armv8_mmu_common::armv8_cache, armv8_handle_cache_info_command(), armv8_common::armv8_mmu, CMD, CMD_CTX, get_current_target(), and target_to_armv8().
COMMAND_HANDLER | ( | aarch64_handle_dbginit_command | ) |
Definition at line 2883 of file aarch64.c.
References aarch64_init_debug_access(), CMD_CTX, ERROR_FAIL, get_current_target(), LOG_ERROR, and target_was_examined().
COMMAND_HANDLER | ( | aarch64_handle_disassemble_command | ) |
Definition at line 2894 of file aarch64.c.
References a64_disassemble(), AARCH64_COMMON_MAGIC, CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_ADDRESS, COMMAND_PARSE_NUMBER, command_print(), aarch64_common::common_magic, count, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, get_current_target(), LOG_ERROR, and target_to_aarch64().
COMMAND_HANDLER | ( | aarch64_mask_interrupts_command | ) |
Definition at line 2927 of file aarch64.c.
References AARCH64_ISRMASK_OFF, AARCH64_ISRMASK_ON, CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), aarch64_common::isrmasking_mode, jim_nvp_name2value_simple(), jim_nvp_value2name_simple(), LOG_ERROR, jim_nvp::name, NULL, target_to_aarch64(), and jim_nvp::value.
|
static |
|
static |
Definition at line 458 of file aarch64.c.
References aarch64_halt_smp(), aarch64_poll(), DBG_REASON_NOTHALTED, target::debug_reason, ERROR_OK, foreach_smp_target, target::gdb_service, LOG_DEBUG, NULL, target::smp, target::smp_targets, target::state, gdb_service::target, target_list::target, TARGET_HALTED, and target_was_examined().
Referenced by aarch64_poll().
|
static |
|
static |
struct target_type aarch64_target |