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

Go to the source code of this file.

Macros

#define ARM926EJS_CP15_ADDR(opcode_1, opcode_2, crn, crm)   ((opcode_1 << 11) | (opcode_2 << 8) | (crn << 4) | (crm << 0))
 

Functions

int arm926ejs_arch_state (struct target *target)
 Logs summary of ARM926 state for a halted target. More...
 
static int arm926ejs_cp15_read (struct target *target, uint32_t op1, uint32_t op2, uint32_t crn, uint32_t crm, uint32_t *value)
 
static int arm926ejs_cp15_write (struct target *target, uint32_t op1, uint32_t op2, uint32_t crn, uint32_t crm, uint32_t value)
 
static void arm926ejs_deinit_target (struct target *target)
 
static int arm926ejs_disable_mmu_caches (struct target *target, int mmu, int d_u_cache, int i_cache)
 
static int arm926ejs_enable_mmu_caches (struct target *target, int mmu, int d_u_cache, int i_cache)
 
static int arm926ejs_examine_debug_reason (struct target *target)
 
static int arm926ejs_get_ttb (struct target *target, uint32_t *result)
 
int arm926ejs_init_arch_info (struct target *target, struct arm926ejs_common *arm926ejs, struct jtag_tap *tap)
 
static int arm926ejs_mcr (struct target *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t crn, uint32_t crm, uint32_t value)
 
static int arm926ejs_mmu (struct target *target, int *enabled)
 
static int arm926ejs_mrc (struct target *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t crn, uint32_t crm, uint32_t *value)
 
static int arm926ejs_post_debug_entry (struct target *target)
 
static void arm926ejs_pre_restore_context (struct target *target)
 
static int arm926ejs_read_phys_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
 
int arm926ejs_soft_reset_halt (struct target *target)
 
static int arm926ejs_target_create (struct target *target, Jim_Interp *interp)
 
static int arm926ejs_verify_pointer (struct command_invocation *cmd, struct arm926ejs_common *arm926)
 
static int arm926ejs_virt2phys (struct target *target, target_addr_t virtual, target_addr_t *physical)
 
int arm926ejs_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...
 
static int arm926ejs_write_phys_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
 
 COMMAND_HANDLER (arm926ejs_handle_cache_info_command)
 

Variables

static const char arm926_not [] = "target is not an ARM926"
 
const struct command_registration arm926ejs_command_handlers []
 
static const struct command_registration arm926ejs_exec_command_handlers []
 
struct target_type arm926ejs_target
 Holds methods for ARM926 targets. More...
 

Macro Definition Documentation

◆ ARM926EJS_CP15_ADDR

#define ARM926EJS_CP15_ADDR (   opcode_1,
  opcode_2,
  crn,
  crm 
)    ((opcode_1 << 11) | (opcode_2 << 8) | (crn << 4) | (crm << 0))

Definition at line 38 of file arm926ejs.c.

Function Documentation

◆ arm926ejs_arch_state()

◆ arm926ejs_cp15_read()

◆ arm926ejs_cp15_write()

static int arm926ejs_cp15_write ( struct target target,
uint32_t  op1,
uint32_t  op2,
uint32_t  crn,
uint32_t  crm,
uint32_t  value 
)
static

◆ arm926ejs_deinit_target()

static void arm926ejs_deinit_target ( struct target target)
static

◆ arm926ejs_disable_mmu_caches()

static int arm926ejs_disable_mmu_caches ( struct target target,
int  mmu,
int  d_u_cache,
int  i_cache 
)
static

◆ arm926ejs_enable_mmu_caches()

static int arm926ejs_enable_mmu_caches ( struct target target,
int  mmu,
int  d_u_cache,
int  i_cache 
)
static

◆ arm926ejs_examine_debug_reason()

◆ arm926ejs_get_ttb()

static int arm926ejs_get_ttb ( struct target target,
uint32_t *  result 
)
static

Definition at line 310 of file arm926ejs.c.

References ERROR_OK, arm926ejs_common::read_cp15, and target_to_arm926().

Referenced by arm926ejs_init_arch_info().

◆ arm926ejs_init_arch_info()

◆ arm926ejs_mcr()

static int arm926ejs_mcr ( struct target target,
int  cpnum,
uint32_t  op1,
uint32_t  op2,
uint32_t  crn,
uint32_t  crm,
uint32_t  value 
)
static

Definition at line 197 of file arm926ejs.c.

References arm926ejs_cp15_write(), ERROR_FAIL, and LOG_ERROR.

Referenced by arm926ejs_init_arch_info().

◆ arm926ejs_mmu()

static int arm926ejs_mmu ( struct target target,
int *  enabled 
)
static

Definition at line 752 of file arm926ejs.c.

◆ arm926ejs_mrc()

static int arm926ejs_mrc ( struct target target,
int  cpnum,
uint32_t  op1,
uint32_t  op2,
uint32_t  crn,
uint32_t  crm,
uint32_t *  value 
)
static

Definition at line 114 of file arm926ejs.c.

References arm926ejs_cp15_read(), ERROR_FAIL, and LOG_ERROR.

Referenced by arm926ejs_init_arch_info().

◆ arm926ejs_post_debug_entry()

◆ arm926ejs_pre_restore_context()

static void arm926ejs_pre_restore_context ( struct target target)
static

◆ arm926ejs_read_phys_memory()

static int arm926ejs_read_phys_memory ( struct target target,
target_addr_t  address,
uint32_t  size,
uint32_t  count,
uint8_t *  buffer 
)
static

◆ arm926ejs_soft_reset_halt()

◆ arm926ejs_target_create()

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

Definition at line 705 of file arm926ejs.c.

References arm926ejs_init_arch_info(), jtag_tap::ir_capture_mask, and target::tap.

◆ arm926ejs_verify_pointer()

static int arm926ejs_verify_pointer ( struct command_invocation cmd,
struct arm926ejs_common arm926 
)
static

◆ arm926ejs_virt2phys()

static int arm926ejs_virt2phys ( struct target target,
target_addr_t  virtual,
target_addr_t physical 
)
static

◆ arm926ejs_write_memory()

int arm926ejs_write_memory ( struct target target,
target_addr_t  address,
uint32_t  size,
uint32_t  count,
const uint8_t *  buffer 
)

◆ arm926ejs_write_phys_memory()

static int arm926ejs_write_phys_memory ( struct target target,
target_addr_t  address,
uint32_t  size,
uint32_t  count,
const uint8_t *  buffer 
)
static

◆ COMMAND_HANDLER()

Variable Documentation

◆ arm926_not

const char arm926_not[] = "target is not an ARM926"
static

Definition at line 491 of file arm926ejs.c.

Referenced by arm926ejs_arch_state(), and arm926ejs_verify_pointer().

◆ arm926ejs_command_handlers

const struct command_registration arm926ejs_command_handlers[]
Initial value:
= {
{
},
{
.name = "arm926ejs",
.mode = COMMAND_ANY,
.help = "arm926ejs command group",
.usage = "",
},
}
static const struct command_registration arm926ejs_exec_command_handlers[]
Definition: arm926ejs.c:764
const struct command_registration arm9tdmi_command_handlers[]
Definition: arm9tdmi.c:873
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:253
@ COMMAND_ANY
Definition: command.h:42
const char * name
Definition: command.h:235

Definition at line 752 of file arm926ejs.c.

◆ arm926ejs_exec_command_handlers

const struct command_registration arm926ejs_exec_command_handlers[]
static
Initial value:
= {
{
.name = "cache_info",
.handler = arm926ejs_handle_cache_info_command,
.mode = COMMAND_EXEC,
.usage = "",
.help = "display information about target caches",
},
}
@ COMMAND_EXEC
Definition: command.h:40

Definition at line 752 of file arm926ejs.c.

◆ arm926ejs_target

struct target_type arm926ejs_target

Holds methods for ARM926 targets.

Definition at line 752 of file arm926ejs.c.