OpenOCD
arm9tdmi.c File Reference
Include dependency graph for arm9tdmi.c:

Go to the source code of this file.

Data Structures

struct  arm9tdmi_vector
 

Enumerations

enum  arm9tdmi_vector_bit {
  ARM9TDMI_RESET_VECTOR = 0x01 , ARM9TDMI_UNDEF_VECTOR = 0x02 , ARM9TDMI_SWI_VECTOR = 0x04 , ARM9TDMI_PABT_VECTOR = 0x08 ,
  ARM9TDMI_DABT_VECTOR = 0x10 , ARM9TDMI_IRQ_VECTOR = 0x40 , ARM9TDMI_FIQ_VECTOR = 0x80
}
 

Functions

void arm9tdmi_branch_resume (struct target *target)
 
static void arm9tdmi_branch_resume_thumb (struct target *target)
 
static void arm9tdmi_build_reg_cache (struct target *target)
 
static void arm9tdmi_change_to_arm (struct target *target, uint32_t *r0, uint32_t *pc)
 
int arm9tdmi_clock_data_in (struct arm_jtag *jtag_info, uint32_t *in)
 
int arm9tdmi_clock_data_in_endianness (struct arm_jtag *jtag_info, void *in, int size, int be)
 
int arm9tdmi_clock_out (struct arm_jtag *jtag_info, uint32_t instr, uint32_t out, uint32_t *in, int sysspeed)
 
void arm9tdmi_deinit_target (struct target *target)
 
void arm9tdmi_disable_single_step (struct target *target)
 
void arm9tdmi_enable_single_step (struct target *target, uint32_t next_pc)
 
int arm9tdmi_examine_debug_reason (struct target *target)
 
int arm9tdmi_init_arch_info (struct target *target, struct arm7_9_common *arm7_9, struct jtag_tap *tap)
 
int arm9tdmi_init_target (struct command_context *cmd_ctx, struct target *target)
 
void arm9tdmi_load_byte_reg (struct target *target, int num)
 
void arm9tdmi_load_hword_reg (struct target *target, int num)
 
void arm9tdmi_load_word_regs (struct target *target, uint32_t mask)
 
void arm9tdmi_read_core_regs (struct target *target, uint32_t mask, uint32_t *core_regs[16])
 
static void arm9tdmi_read_core_regs_target_buffer (struct target *target, uint32_t mask, void *buffer, int size)
 
static void arm9tdmi_read_xpsr (struct target *target, uint32_t *xpsr, int spsr)
 
void arm9tdmi_store_byte_reg (struct target *target, int num)
 
void arm9tdmi_store_hword_reg (struct target *target, int num)
 
void arm9tdmi_store_word_regs (struct target *target, uint32_t mask)
 
static int arm9tdmi_target_create (struct target *target, Jim_Interp *interp)
 
void arm9tdmi_write_core_regs (struct target *target, uint32_t mask, uint32_t core_regs[16])
 
static void arm9tdmi_write_pc (struct target *target, uint32_t pc)
 
static void arm9tdmi_write_xpsr (struct target *target, uint32_t xpsr, int spsr)
 
static void arm9tdmi_write_xpsr_im8 (struct target *target, uint8_t xpsr_im, int rot, int spsr)
 
 COMMAND_HANDLER (handle_arm9tdmi_catch_vectors_command)
 

Variables

const struct command_registration arm9tdmi_command_handlers []
 
static const struct command_registration arm9tdmi_exec_command_handlers []
 
struct target_type arm9tdmi_target
 Holds methods for ARM9TDMI targets. More...
 
static const struct arm9tdmi_vector arm9tdmi_vectors []
 

Enumeration Type Documentation

◆ arm9tdmi_vector_bit

Enumerator
ARM9TDMI_RESET_VECTOR 
ARM9TDMI_UNDEF_VECTOR 
ARM9TDMI_SWI_VECTOR 
ARM9TDMI_PABT_VECTOR 
ARM9TDMI_DABT_VECTOR 
ARM9TDMI_IRQ_VECTOR 
ARM9TDMI_FIQ_VECTOR 

Definition at line 38 of file arm9tdmi.c.

Function Documentation

◆ arm9tdmi_branch_resume()

void arm9tdmi_branch_resume ( struct target target)

◆ arm9tdmi_branch_resume_thumb()

◆ arm9tdmi_build_reg_cache()

static void arm9tdmi_build_reg_cache ( struct target target)
static

◆ arm9tdmi_change_to_arm()

static void arm9tdmi_change_to_arm ( struct target target,
uint32_t *  r0,
uint32_t *  pc 
)
static

◆ arm9tdmi_clock_data_in()

◆ arm9tdmi_clock_data_in_endianness()

◆ arm9tdmi_clock_out()

◆ arm9tdmi_deinit_target()

void arm9tdmi_deinit_target ( struct target target)

Definition at line 778 of file arm9tdmi.c.

References arm7_9_deinit(), arm_free_reg_cache(), target_to_arm(), and target_to_arm7_9().

Referenced by feroceon_deinit_target().

◆ arm9tdmi_disable_single_step()

◆ arm9tdmi_enable_single_step()

void arm9tdmi_enable_single_step ( struct target target,
uint32_t  next_pc 
)

◆ arm9tdmi_examine_debug_reason()

◆ arm9tdmi_init_arch_info()

int arm9tdmi_init_arch_info ( struct target target,
struct arm7_9_common arm7_9,
struct jtag_tap tap 
)

Definition at line 711 of file arm9tdmi.c.

References arm7_9_bulk_write_memory(), arm7_9_init_arch_info(), arm7_9_write_memory(), arm9tdmi_branch_resume(), arm9tdmi_branch_resume_thumb(), arm9tdmi_change_to_arm(), arm9tdmi_disable_single_step(), arm9tdmi_enable_single_step(), arm9tdmi_examine_debug_reason(), arm9tdmi_load_byte_reg(), arm9tdmi_load_hword_reg(), arm9tdmi_load_word_regs(), arm9tdmi_read_core_regs(), arm9tdmi_read_core_regs_target_buffer(), arm9tdmi_read_xpsr(), arm9tdmi_store_byte_reg(), arm9tdmi_store_hword_reg(), arm9tdmi_store_word_regs(), arm9tdmi_write_core_regs(), arm9tdmi_write_pc(), arm9tdmi_write_xpsr(), arm9tdmi_write_xpsr_im8(), arm7_9_common::arm_bkpt, arm7_9_common::branch_resume, arm7_9_common::branch_resume_thumb, arm7_9_common::bulk_write_memory, arm7_9_common::change_to_arm, arm7_9_common::dbgreq_adjust_pc, arm7_9_common::disable_single_step, arm7_9_common::enable_single_step, ERROR_OK, arm7_9_common::examine_debug_reason, arm7_9_common::has_vector_catch, arm7_9_common::jtag_info, arm7_9_common::load_byte_reg, arm7_9_common::load_hword_reg, arm7_9_common::load_word_regs, NULL, arm7_9_common::post_debug_entry, arm7_9_common::pre_restore_context, arm7_9_common::read_core_regs, arm7_9_common::read_core_regs_target_buffer, arm7_9_common::read_xpsr, arm_jtag::scann_size, arm7_9_common::store_byte_reg, arm7_9_common::store_hword_reg, arm7_9_common::store_word_regs, arm_jtag::tap, arm7_9_common::thumb_bkpt, arm7_9_common::use_dbgrq, arm7_9_common::write_core_regs, arm7_9_common::write_memory, arm7_9_common::write_pc, arm7_9_common::write_xpsr, and arm7_9_common::write_xpsr_im8.

Referenced by arm920t_init_arch_info(), arm926ejs_init_arch_info(), arm946e_init_arch_info(), arm966e_init_arch_info(), and arm9tdmi_target_create().

◆ arm9tdmi_init_target()

int arm9tdmi_init_target ( struct command_context cmd_ctx,
struct target target 
)

Definition at line 703 of file arm9tdmi.c.

References arm9tdmi_build_reg_cache(), arm_semihosting_init(), and ERROR_OK.

Referenced by feroceon_init_target().

◆ arm9tdmi_load_byte_reg()

void arm9tdmi_load_byte_reg ( struct target target,
int  num 
)

◆ arm9tdmi_load_hword_reg()

void arm9tdmi_load_hword_reg ( struct target target,
int  num 
)

◆ arm9tdmi_load_word_regs()

void arm9tdmi_load_word_regs ( struct target target,
uint32_t  mask 
)

◆ arm9tdmi_read_core_regs()

void arm9tdmi_read_core_regs ( struct target target,
uint32_t  mask,
uint32_t *  core_regs[16] 
)

◆ arm9tdmi_read_core_regs_target_buffer()

static void arm9tdmi_read_core_regs_target_buffer ( struct target target,
uint32_t  mask,
void *  buffer,
int  size 
)
static

◆ arm9tdmi_read_xpsr()

static void arm9tdmi_read_xpsr ( struct target target,
uint32_t *  xpsr,
int  spsr 
)
static

◆ arm9tdmi_store_byte_reg()

void arm9tdmi_store_byte_reg ( struct target target,
int  num 
)

◆ arm9tdmi_store_hword_reg()

void arm9tdmi_store_hword_reg ( struct target target,
int  num 
)

◆ arm9tdmi_store_word_regs()

void arm9tdmi_store_word_regs ( struct target target,
uint32_t  mask 
)

◆ arm9tdmi_target_create()

static int arm9tdmi_target_create ( struct target target,
Jim_Interp *  interp 
)
static

◆ arm9tdmi_write_core_regs()

void arm9tdmi_write_core_regs ( struct target target,
uint32_t  mask,
uint32_t  core_regs[16] 
)

◆ arm9tdmi_write_pc()

static void arm9tdmi_write_pc ( struct target target,
uint32_t  pc 
)
static

◆ arm9tdmi_write_xpsr()

static void arm9tdmi_write_xpsr ( struct target target,
uint32_t  xpsr,
int  spsr 
)
static

◆ arm9tdmi_write_xpsr_im8()

static void arm9tdmi_write_xpsr_im8 ( struct target target,
uint8_t  xpsr_im,
int  rot,
int  spsr 
)
static

◆ COMMAND_HANDLER()

COMMAND_HANDLER ( handle_arm9tdmi_catch_vectors_command  )

Definition at line 788 of file arm9tdmi.c.

Variable Documentation

◆ arm9tdmi_command_handlers

const struct command_registration arm9tdmi_command_handlers[]
Initial value:
= {
{
},
{
.name = "arm9",
.mode = COMMAND_ANY,
.help = "arm9 command group",
.usage = "",
},
}
const struct command_registration arm7_9_command_handlers[]
static const struct command_registration arm9tdmi_exec_command_handlers[]
Definition: arm9tdmi.c:862
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:247
@ COMMAND_ANY
Definition: command.h:42
const char * name
Definition: command.h:229

Definition at line 788 of file arm9tdmi.c.

◆ arm9tdmi_exec_command_handlers

const struct command_registration arm9tdmi_exec_command_handlers[]
static
Initial value:
= {
{
.name = "vector_catch",
.handler = handle_arm9tdmi_catch_vectors_command,
.mode = COMMAND_EXEC,
.help = "Display, after optionally updating, configuration "
"of vector catch unit.",
.usage = "[all|none|(reset|undef|swi|pabt|dabt|irq|fiq)*]",
},
}
@ COMMAND_EXEC
Definition: command.h:40

Definition at line 788 of file arm9tdmi.c.

◆ arm9tdmi_target

struct target_type arm9tdmi_target

Holds methods for ARM9TDMI targets.

Definition at line 788 of file arm9tdmi.c.

◆ arm9tdmi_vectors

const struct arm9tdmi_vector arm9tdmi_vectors[]
static
Initial value:
= {
{0, 0},
}
@ ARM9TDMI_UNDEF_VECTOR
Definition: arm9tdmi.c:40
@ ARM9TDMI_DABT_VECTOR
Definition: arm9tdmi.c:43
@ ARM9TDMI_IRQ_VECTOR
Definition: arm9tdmi.c:45
@ ARM9TDMI_SWI_VECTOR
Definition: arm9tdmi.c:41
@ ARM9TDMI_FIQ_VECTOR
Definition: arm9tdmi.c:46
@ ARM9TDMI_PABT_VECTOR
Definition: arm9tdmi.c:42
@ ARM9TDMI_RESET_VECTOR
Definition: arm9tdmi.c:39