OpenOCD
|
Go to the source code of this file.
Macros | |
#define | ARMV8_NUM_REGS ARRAY_SIZE(armv8_regs) |
#define | ARMV8_NUM_REGS32 ARRAY_SIZE(armv8_regs32) |
Functions | |
static | __attribute__ ((unused)) |
static int | armv8_aarch64_state (struct target *target) |
int | armv8_arch_state (struct target *target) |
struct reg_cache * | armv8_build_reg_cache (struct target *target) |
Builds cache of architecturally defined registers. More... | |
static void | armv8_free_cache (struct reg_cache *cache, bool regs32) |
void | armv8_free_reg_cache (struct target *target) |
static int | armv8_get_core_reg (struct reg *reg) |
static int | armv8_get_core_reg32 (struct reg *reg) |
const char * | armv8_get_gdb_arch (struct target *target) |
int | armv8_get_gdb_reg_list (struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class) |
int | armv8_handle_cache_info_command (struct command_invocation *cmd, struct armv8_cache_common *armv8_cache) |
int | armv8_init_arch_info (struct target *target, struct armv8_common *armv8) |
int | armv8_mmu_translate_va (struct target *target, target_addr_t va, target_addr_t *val) |
int | armv8_mmu_translate_va_pa (struct target *target, target_addr_t va, target_addr_t *val, int meminfo) |
const char * | armv8_mode_name (unsigned psr_mode) |
Map PSR mode bits to the name of an ARM processor operating mode. More... | |
static uint8_t | armv8_pa_size (uint32_t ps) |
int | armv8_read_mpidr (struct armv8_common *armv8) |
static int | armv8_read_reg (struct armv8_common *armv8, int regnum, uint64_t *regval) |
static int | armv8_read_reg32 (struct armv8_common *armv8, int regnum, uint64_t *regval) |
static int | armv8_read_reg_simdfp_aarch32 (struct armv8_common *armv8, int regnum, uint64_t *lvalue, uint64_t *hvalue) |
static int | armv8_read_reg_simdfp_aarch64 (struct armv8_common *armv8, int regnum, uint64_t *lvalue, uint64_t *hvalue) |
struct reg * | armv8_reg_current (struct arm *arm, unsigned regnum) |
void | armv8_select_reg_access (struct armv8_common *armv8, bool is_aarch64) |
static int | armv8_set_core_reg (struct reg *reg, uint8_t *buf) |
static int | armv8_set_core_reg32 (struct reg *reg, uint8_t *buf) |
void | armv8_set_cpsr (struct arm *arm, uint32_t cpsr) |
Configures host-side ARM records to reflect the specified CPSR. More... | |
int | armv8_set_dbgreg_bits (struct armv8_common *armv8, unsigned int reg, unsigned long mask, unsigned long value) |
static int | armv8_setup_semihosting (struct target *target, int enable) |
static void | armv8_show_fault_registers32 (struct armv8_common *armv8) |
static int | armv8_write_reg (struct armv8_common *armv8, int regnum, uint64_t value_64) |
static int | armv8_write_reg32 (struct armv8_common *armv8, int regnum, uint64_t value) |
static int | armv8_write_reg_simdfp_aarch32 (struct armv8_common *armv8, int regnum, uint64_t lvalue, uint64_t hvalue) |
static int | armv8_write_reg_simdfp_aarch64 (struct armv8_common *armv8, int regnum, uint64_t lvalue, uint64_t hvalue) |
COMMAND_HANDLER (armv8_handle_exception_catch_command) | |
#define ARMV8_NUM_REGS ARRAY_SIZE(armv8_regs) |
#define ARMV8_NUM_REGS32 ARRAY_SIZE(armv8_regs32) |
|
static |
Definition at line 767 of file armv8.c.
References armv8_common::arm, ARM_STATE_AARCH64, armv8_show_fault_registers32(), arm::core_state, and target_to_armv8().
|
static |
Definition at line 1122 of file armv8.c.
References ARM_COMMON_MAGIC, armv8_mode_name(), armv8_state_strings, buf_get_u32(), buf_get_u64(), arm::common_magic, arm::core_mode, arm::core_state, arm::cpsr, debug_reason_name(), ERROR_FAIL, ERROR_OK, semihosting::is_active, LOG_ERROR, LOG_USER, arm::pc, target::semihosting, target_name(), target_to_arm(), and reg::value.
Builds cache of architecturally defined registers.
Definition at line 1600 of file armv8.c.
References reg::arch_info, arm_reg::arm, armv8_common::arm, ARMV8_NUM_REGS, ARMV8_NUM_REGS32, ARMV8_PC, armv8_reg32_type, armv8_reg_type, armv8_regs, armv8_regs32, ARMV8_XPSR, reg::caller_save, arm::core_cache, arm::cpsr, data_type, reg::exist, feature, reg::feature, reg::group, LOG_ERROR, arm_reg::mode, reg::name, reg_cache::name, reg_cache::next, NULL, arm_reg::num, reg_cache::num_regs, reg::number, arm::pc, target::reg_cache, reg::reg_data_type, reg_cache::reg_list, register_get_last_cache_p(), reg::size, target, arm_reg::target, target_to_armv8(), reg_data_type::type, reg::type, arm_reg::value, and reg::value.
Referenced by armv8_dpm_setup().
|
static |
Definition at line 1705 of file armv8.c.
References reg::arch_info, reg::feature, reg_cache::num_regs, reg::reg_data_type, and reg_cache::reg_list.
void armv8_free_reg_cache | ( | struct target * | target | ) |
Definition at line 1726 of file armv8.c.
Referenced by aarch64_deinit_target().
|
static |
Definition at line 1491 of file armv8.c.
References reg::arch_info, arm::core_mode, ERROR_TARGET_NOT_HALTED, arm_reg::num, arm::read_core_reg, target::state, arm_reg::target, TARGET_HALTED, and target_to_arm().
|
static |
Definition at line 1538 of file armv8.c.
References reg::arch_info, arm::core_cache, arm::core_mode, ERROR_OK, ERROR_TARGET_NOT_HALTED, arm_reg::num, arm::read_core_reg, reg_cache::reg_list, target::state, arm_reg::target, TARGET_HALTED, target_to_arm(), and reg::valid.
const char* armv8_get_gdb_arch | ( | struct target * | target | ) |
Definition at line 1751 of file armv8.c.
References ARM_STATE_AARCH64, arm::core_state, and target_to_arm().
int armv8_get_gdb_reg_list | ( | struct target * | target, |
struct reg ** | reg_list[], | ||
int * | reg_list_size, | ||
enum target_register_class | reg_class | ||
) |
Definition at line 1757 of file armv8.c.
References ARM_STATE_AARCH64, ARMV8_LAST_REG, ARMV8_R14, armv8_reg_current(), ARMV8_V0, arm::core_cache, arm::core_state, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, reg_cache::next, reg_cache::num_regs, REG_CLASS_ALL, REG_CLASS_GENERAL, reg_cache::reg_list, target_name(), and target_to_arm().
int armv8_handle_cache_info_command | ( | struct command_invocation * | cmd, |
struct armv8_cache_common * | armv8_cache | ||
) |
Definition at line 1086 of file armv8.c.
References cmd, command_print(), armv8_cache_common::display_cache_info, ERROR_OK, and armv8_cache_common::info.
Referenced by COMMAND_HANDLER().
int armv8_init_arch_info | ( | struct target * | target, |
struct armv8_common * | armv8 | ||
) |
Definition at line 1104 of file armv8.c.
References arm::arch_info, target::arch_info, armv8_common::arm, ARM_COMMON_MAGIC, armv8_mmu_common::armv8_cache, ARMV8_COMMON_MAGIC, armv8_common::armv8_mmu, armv8_setup_semihosting(), arm::common_magic, armv8_common::common_magic, armv8_cache_common::display_cache_info, ERROR_OK, armv8_cache_common::flush_all_data_cache, armv8_cache_common::info, armv8_cache_common::l2_cache, NULL, arm::setup_semihosting, target, and arm::target.
Referenced by aarch64_init_arch_info().
int armv8_mmu_translate_va | ( | struct target * | target, |
target_addr_t | va, | ||
target_addr_t * | val | ||
) |
int armv8_mmu_translate_va_pa | ( | struct target * | target, |
target_addr_t | va, | ||
target_addr_t * | val, | ||
int | meminfo | ||
) |
Definition at line 928 of file armv8.c.
References ARM_MODE_ANY, ARMV8_64_EL2H, armv8_curel_from_core_mode(), armv8_dpm_modeswitch(), ARMV8_MRS, ARMV8_SYS, arm::core_mode, armv8_common::dpm, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, arm_dpm::finish, arm_dpm::instr_read_data_r0_64, arm_dpm::instr_write_data_r0_64, LOG_ERROR, LOG_USER, LOG_WARNING, arm_dpm::prepare, target::state, SYSTEM_ATS12E0R, SYSTEM_ATS12E1R, SYSTEM_ATS1E2R, SYSTEM_ATS1E3R, SYSTEM_CUREL_EL0, SYSTEM_CUREL_EL1, SYSTEM_CUREL_EL2, SYSTEM_CUREL_EL3, SYSTEM_PAR_EL1, TARGET_HALTED, target_name(), target_to_arm(), and target_to_armv8().
Referenced by aarch64_virt2phys().
const char* armv8_mode_name | ( | unsigned | psr_mode | ) |
Map PSR mode bits to the name of an ARM processor operating mode.
Definition at line 107 of file armv8.c.
References armv8_mode_data, ARRAY_SIZE, LOG_ERROR, and psr.
Referenced by aarch64_post_debug_entry(), aarch64_restore_system_control_reg(), armv8_aarch64_state(), and armv8_set_cpsr().
|
static |
int armv8_read_mpidr | ( | struct armv8_common * | armv8 | ) |
Definition at line 632 of file armv8.c.
References armv8_common::arm, ARM_MODE_ANY, ARMV8_64_EL1H, armv8_curel_from_core_mode(), armv8_dpm_modeswitch(), armv8_common::cluster_id, arm::core_mode, armv8_common::cpu_id, arm::dpm, ERROR_FAIL, ERROR_OK, arm_dpm::finish, arm_dpm::instr_read_data_r0, LOG_ERROR, LOG_INFO, armv8_common::multi_processor_system, arm_dpm::prepare, READ_REG_MPIDR, SYSTEM_CUREL_EL1, arm::target, and target_name().
Referenced by aarch64_post_debug_entry().
|
static |
Definition at line 117 of file armv8.c.
References ARMV8_ELR_EL1, ARMV8_ELR_EL2, ARMV8_ELR_EL3, ARMV8_ESR_EL1, ARMV8_ESR_EL2, ARMV8_ESR_EL3, ARMV8_FPCR, ARMV8_FPSR, ARMV8_MOVFSP_64, ARMV8_MRS, ARMV8_MRS_DLR, ARMV8_MRS_DSPSR, ARMV8_MRS_FPCR, ARMV8_MRS_FPSR, ARMV8_MSR_GP, ARMV8_PC, ARMV8_SP, ARMV8_SPSR_EL1, ARMV8_SPSR_EL2, ARMV8_SPSR_EL3, ARMV8_XPSR, armv8_common::dpm, ERROR_FAIL, ERROR_OK, arm_dpm::instr_read_data_dcc_64, arm_dpm::instr_read_data_r0, arm_dpm::instr_read_data_r0_64, SYSTEM_DBG_DBGDTR_EL0, SYSTEM_ELR_EL1, SYSTEM_ELR_EL2, SYSTEM_ELR_EL3, SYSTEM_ESR_EL1, SYSTEM_ESR_EL2, SYSTEM_ESR_EL3, SYSTEM_SPSR_EL1, SYSTEM_SPSR_EL2, and SYSTEM_SPSR_EL3.
Referenced by armv8_select_reg_access().
|
static |
Definition at line 344 of file armv8.c.
References ARMV4_5_MCR, ARMV4_5_MRC, ARMV4_5_VMRS, ARMV8_ELR_EL1, ARMV8_ELR_EL2, ARMV8_ELR_EL3, ARMV8_ESR_EL1, ARMV8_ESR_EL2, ARMV8_ESR_EL3, ARMV8_FPSR, ARMV8_MRC_DLR, ARMV8_MRC_DSPSR, ARMV8_MRS_T1, ARMV8_MRS_XPSR_T1, ARMV8_PC, ARMV8_R0, ARMV8_R14, ARMV8_SP, ARMV8_SPSR_EL1, ARMV8_SPSR_EL2, ARMV8_SPSR_EL3, ARMV8_XPSR, armv8_common::dpm, ERROR_FAIL, ERROR_OK, arm_dpm::instr_read_data_dcc, and arm_dpm::instr_read_data_r0.
Referenced by armv8_select_reg_access().
|
static |
Definition at line 431 of file armv8.c.
References arm_dpm::arm, ARMV4_5_MCR, ARMV4_5_VMOV, ARMV8_R1, ARMV8_V0, ARMV8_V15, arm::core_cache, reg::dirty, armv8_common::dpm, ERROR_FAIL, ERROR_OK, arm_dpm::instr_read_data_dcc, arm_dpm::instr_read_data_r0, and reg_cache::reg_list.
Referenced by armv8_select_reg_access().
|
static |
Definition at line 207 of file armv8.c.
References ARMV8_MOV_GPR_VFP, ARMV8_V0, ARMV8_V31, armv8_common::dpm, ERROR_FAIL, ERROR_OK, and arm_dpm::instr_read_data_r0_64.
Referenced by armv8_select_reg_access().
Definition at line 1694 of file armv8.c.
References ARMV8_LAST_REG, arm::core_cache, NULL, and reg_cache::reg_list.
Referenced by aarch64_read_cpu_memory(), aarch64_read_cpu_memory_fast(), aarch64_read_cpu_memory_slow(), aarch64_write_cpu_memory(), aarch64_write_cpu_memory_fast(), aarch64_write_cpu_memory_slow(), armv8_dpm_read_current_registers(), armv8_dpm_setup(), and armv8_get_gdb_reg_list().
void armv8_select_reg_access | ( | struct armv8_common * | armv8, |
bool | is_aarch64 | ||
) |
Definition at line 615 of file armv8.c.
References armv8_read_reg(), armv8_read_reg32(), armv8_read_reg_simdfp_aarch32(), armv8_read_reg_simdfp_aarch64(), armv8_write_reg(), armv8_write_reg32(), armv8_write_reg_simdfp_aarch32(), armv8_write_reg_simdfp_aarch64(), armv8_common::read_reg_u128, armv8_common::read_reg_u64, armv8_common::write_reg_u128, and armv8_common::write_reg_u64.
Referenced by aarch64_debug_entry(), armv8_dpm_handle_exception(), and armv8_dpm_modeswitch().
|
static |
|
static |
void armv8_set_cpsr | ( | struct arm * | arm, |
uint32_t | cpsr | ||
) |
Configures host-side ARM records to reflect the specified CPSR.
Later, code can use arm_reg_current() to map register numbers according to how they are exposed by this mode.
Definition at line 675 of file armv8.c.
References ARM_STATE_AARCH64, ARM_STATE_ARM, ARM_STATE_JAZELLE, ARM_STATE_THUMB, ARM_STATE_THUMB_EE, armv8_mode_name(), armv8_state_strings, buf_set_u32(), arm::core_mode, arm::core_state, arm::cpsr, reg::dirty, LOG_DEBUG, LOG_ERROR, LOG_WARNING, mode, state, reg::valid, and reg::value.
Referenced by armv8_dpm_read_current_registers().
int armv8_set_dbgreg_bits | ( | struct armv8_common * | armv8, |
unsigned int | reg, | ||
unsigned long | mask, | ||
unsigned long | value | ||
) |
Definition at line 1819 of file armv8.c.
References armv8_common::debug_ap, armv8_common::debug_base, ERROR_OK, mask, mem_ap_read_atomic_u32(), and mem_ap_write_atomic_u32().
Referenced by aarch64_set_dscr_bits().
|
static |
|
static |
Definition at line 720 of file armv8.c.
References armv8_common::arm, ARMV4_5_MRC, arm::dpm, ERROR_OK, arm_dpm::finish, arm_dpm::instr_read_data_r0, LOG_USER, and arm_dpm::prepare.
Referenced by __attribute__().
|
static |
Definition at line 230 of file armv8.c.
References ARMV8_ELR_EL1, ARMV8_ELR_EL2, ARMV8_ELR_EL3, ARMV8_ESR_EL1, ARMV8_ESR_EL2, ARMV8_ESR_EL3, ARMV8_FPCR, ARMV8_FPSR, ARMV8_MOVTSP_64, ARMV8_MRS, ARMV8_MSR_DLR, ARMV8_MSR_DSPSR, ARMV8_MSR_FPCR, ARMV8_MSR_FPSR, ARMV8_MSR_GP, ARMV8_PC, ARMV8_SP, ARMV8_SPSR_EL1, ARMV8_SPSR_EL2, ARMV8_SPSR_EL3, ARMV8_XPSR, armv8_common::dpm, ERROR_FAIL, arm_dpm::instr_write_data_dcc_64, arm_dpm::instr_write_data_r0, arm_dpm::instr_write_data_r0_64, SYSTEM_DBG_DBGDTR_EL0, SYSTEM_ELR_EL1, SYSTEM_ELR_EL2, SYSTEM_ELR_EL3, SYSTEM_ESR_EL1, SYSTEM_ESR_EL2, SYSTEM_ESR_EL3, SYSTEM_SPSR_EL1, SYSTEM_SPSR_EL2, and SYSTEM_SPSR_EL3.
Referenced by armv8_select_reg_access().
|
static |
Definition at line 483 of file armv8.c.
References ARMV4_5_MCR, ARMV4_5_MRC, ARMV4_5_VMSR, ARMV8_ELR_EL1, ARMV8_ELR_EL2, ARMV8_ELR_EL3, ARMV8_ESR_EL1, ARMV8_ESR_EL2, ARMV8_ESR_EL3, ARMV8_FPSR, ARMV8_MCR_DLR, ARMV8_MCR_DSPSR, ARMV8_MSR_GP_T1, ARMV8_MSR_GP_XPSR_T1, ARMV8_PC, ARMV8_R0, ARMV8_R14, ARMV8_SP, ARMV8_SPSR_EL1, ARMV8_SPSR_EL2, ARMV8_SPSR_EL3, ARMV8_XPSR, armv8_common::dpm, ERROR_FAIL, arm_dpm::instr_write_data_dcc, and arm_dpm::instr_write_data_r0.
Referenced by armv8_select_reg_access().
|
static |
Definition at line 565 of file armv8.c.
References arm_dpm::arm, ARMV4_5_MRC, ARMV4_5_VMOV, ARMV8_R1, ARMV8_V0, ARMV8_V15, arm::core_cache, reg::dirty, armv8_common::dpm, ERROR_FAIL, ERROR_OK, arm_dpm::instr_write_data_dcc, arm_dpm::instr_write_data_r0, and reg_cache::reg_list.
Referenced by armv8_select_reg_access().
|
static |
Definition at line 321 of file armv8.c.
References ARMV8_MOV_VFP_GPR, ARMV8_V0, ARMV8_V31, armv8_common::dpm, ERROR_FAIL, ERROR_OK, and arm_dpm::instr_write_data_r0_64.
Referenced by armv8_select_reg_access().
COMMAND_HANDLER | ( | armv8_handle_exception_catch_command | ) |
Definition at line 1020 of file armv8.c.
References CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, command_print(), CPUV8_DBG_ECCR, armv8_common::debug_ap, armv8_common::debug_base, ERROR_FAIL, ERROR_OK, get_current_target(), jim_nvp_name2value_simple(), jim_nvp_value2name_simple(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, mem_ap_read_atomic_u32(), mem_ap_write_atomic_u32(), jim_nvp::name, NULL, target_to_armv8(), and jim_nvp::value.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
const struct command_registration armv8_command_handlers[] |
const { ... } armv8_mode_data[] |
Referenced by armv8_mode_name().
|
static |
Definition at line 1564 of file armv8.c.
Referenced by armv8_build_reg_cache().
|
static |
Definition at line 1503 of file armv8.c.
Referenced by armv8_build_reg_cache().
const { ... } armv8_regs[] |
Referenced by armv8_build_reg_cache().
const { ... } armv8_regs32[] |
Referenced by armv8_build_reg_cache().
|
static |
Definition at line 32 of file armv8.c.
Referenced by armv8_aarch64_state(), and armv8_set_cpsr().
struct reg_data_type* data_type |
Definition at line 1331 of file armv8.c.
Referenced by arc_reg_data_type_add(), armv8_build_reg_cache(), and gdb_generate_reg_type_description().
const char* feature |
Definition at line 1330 of file armv8.c.
Referenced by armv8_build_reg_cache().
enum arm_mode mode |
Definition at line 1326 of file armv8.c.
Referenced by armv8_set_cpsr().
unsigned psr |
Definition at line 38 of file armv8.c.
Referenced by armv8_mode_name().