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

Go to the source code of this file.

Macros

#define ARM920T_CP15_PHYS_ADDR(x, y, z)   ((x << 5) | (y << 1) << (z))
 
#define CP15PHYS_CACHETYPE   ARM920T_CP15_PHYS_ADDR(0, 0x0, 1)
 
#define CP15PHYS_CTRL   ARM920T_CP15_PHYS_ADDR(0, 0x1, 0)
 
#define CP15PHYS_DCACHE   ARM920T_CP15_PHYS_ADDR(1, 0x2, 1)
 
#define CP15PHYS_DCACHE_IDX   ARM920T_CP15_PHYS_ADDR(1, 0xe, 1)
 
#define CP15PHYS_ICACHE   ARM920T_CP15_PHYS_ADDR(1, 0x1, 1)
 
#define CP15PHYS_ICACHE_IDX   ARM920T_CP15_PHYS_ADDR(1, 0xd, 1)
 
#define CP15PHYS_PID   ARM920T_CP15_PHYS_ADDR(0, 0xd, 0)
 
#define CP15PHYS_TESTSTATE   ARM920T_CP15_PHYS_ADDR(0, 0xf, 0)
 

Functions

static int arm920_mmu (struct target *target, int *enabled)
 
static int arm920_virt2phys (struct target *target, target_addr_t virt, target_addr_t *phys)
 
int arm920t_arch_state (struct target *target)
 Logs summary of ARM920 state for a halted target. More...
 
static void arm920t_deinit_target (struct target *target)
 
int arm920t_disable_mmu_caches (struct target *target, int mmu, int d_u_cache, int i_cache)
 
int arm920t_enable_mmu_caches (struct target *target, int mmu, int d_u_cache, int i_cache)
 
static int arm920t_execute_cp15 (struct target *target, uint32_t cp15_opcode, uint32_t arm_opcode)
 
int arm920t_get_ttb (struct target *target, uint32_t *result)
 
static int arm920t_init_arch_info (struct target *target, struct arm920t_common *arm920t, struct jtag_tap *tap)
 
static int arm920t_mcr (struct target *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t crn, uint32_t crm, uint32_t value)
 
static int arm920t_mrc (struct target *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t crn, uint32_t crm, uint32_t *value)
 
int arm920t_post_debug_entry (struct target *target)
 
void arm920t_pre_restore_context (struct target *target)
 
static int arm920t_read_cp15_interpreted (struct target *target, uint32_t cp15_opcode, uint32_t address, uint32_t *value)
 
static int arm920t_read_cp15_physical (struct target *target, int reg_addr, uint32_t *value)
 
int arm920t_read_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
 Reads a buffer, in the specified word size, with current MMU settings. More...
 
static int arm920t_read_phys_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
 
int arm920t_soft_reset_halt (struct target *target)
 
static int arm920t_target_create (struct target *target, Jim_Interp *interp)
 
static int arm920t_verify_pointer (struct command_invocation *cmd, struct arm920t_common *arm920t)
 
static int arm920t_write_cp15_interpreted (struct target *target, uint32_t cp15_opcode, uint32_t value, uint32_t address)
 
static int arm920t_write_cp15_physical (struct target *target, int reg_addr, uint32_t value)
 
int arm920t_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 arm920t_write_phys_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
 
 COMMAND_HANDLER (arm920t_handle_cache_info_command)
 
 COMMAND_HANDLER (arm920t_handle_cp15_command)
 
 COMMAND_HANDLER (arm920t_handle_read_cache_command)
 
 COMMAND_HANDLER (arm920t_handle_read_mmu_command)
 

Variables

static const char arm920_not [] = "target is not an ARM920"
 
const struct command_registration arm920t_command_handlers []
 
static const struct command_registration arm920t_exec_command_handlers []
 
struct target_type arm920t_target
 Holds methods for ARM920 targets. More...
 

Macro Definition Documentation

◆ ARM920T_CP15_PHYS_ADDR

#define ARM920T_CP15_PHYS_ADDR (   x,
  y,
 
)    ((x << 5) | (y << 1) << (z))

Definition at line 55 of file arm920t.c.

◆ CP15PHYS_CACHETYPE

#define CP15PHYS_CACHETYPE   ARM920T_CP15_PHYS_ADDR(0, 0x0, 1)

Definition at line 58 of file arm920t.c.

◆ CP15PHYS_CTRL

#define CP15PHYS_CTRL   ARM920T_CP15_PHYS_ADDR(0, 0x1, 0)

Definition at line 64 of file arm920t.c.

◆ CP15PHYS_DCACHE

#define CP15PHYS_DCACHE   ARM920T_CP15_PHYS_ADDR(1, 0x2, 1)

Definition at line 68 of file arm920t.c.

◆ CP15PHYS_DCACHE_IDX

#define CP15PHYS_DCACHE_IDX   ARM920T_CP15_PHYS_ADDR(1, 0xe, 1)

Definition at line 60 of file arm920t.c.

◆ CP15PHYS_ICACHE

#define CP15PHYS_ICACHE   ARM920T_CP15_PHYS_ADDR(1, 0x1, 1)

Definition at line 67 of file arm920t.c.

◆ CP15PHYS_ICACHE_IDX

#define CP15PHYS_ICACHE_IDX   ARM920T_CP15_PHYS_ADDR(1, 0xd, 1)

Definition at line 59 of file arm920t.c.

◆ CP15PHYS_PID

#define CP15PHYS_PID   ARM920T_CP15_PHYS_ADDR(0, 0xd, 0)

Definition at line 65 of file arm920t.c.

◆ CP15PHYS_TESTSTATE

#define CP15PHYS_TESTSTATE   ARM920T_CP15_PHYS_ADDR(0, 0xf, 0)

Definition at line 66 of file arm920t.c.

Function Documentation

◆ arm920_mmu()

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

◆ arm920_virt2phys()

static int arm920_virt2phys ( struct target target,
target_addr_t  virt,
target_addr_t phys 
)
static

◆ arm920t_arch_state()

◆ arm920t_deinit_target()

static void arm920t_deinit_target ( struct target target)
static

Definition at line 844 of file arm920t.c.

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

◆ arm920t_disable_mmu_caches()

int arm920t_disable_mmu_caches ( struct target target,
int  mmu,
int  d_u_cache,
int  i_cache 
)

◆ arm920t_enable_mmu_caches()

int arm920t_enable_mmu_caches ( struct target target,
int  mmu,
int  d_u_cache,
int  i_cache 
)

◆ arm920t_execute_cp15()

◆ arm920t_get_ttb()

int arm920t_get_ttb ( struct target target,
uint32_t *  result 
)

Definition at line 326 of file arm920t.c.

References arm920t_read_cp15_interpreted(), and ERROR_OK.

Referenced by arm920t_init_arch_info(), and fa526_init_arch_info().

◆ arm920t_init_arch_info()

◆ arm920t_mcr()

static int arm920t_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 1534 of file arm920t.c.

Referenced by arm920t_init_arch_info().

◆ arm920t_mrc()

static int arm920t_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 1518 of file arm920t.c.

References arm920t_read_cp15_interpreted(), ARMV4_5_MRC, ERROR_FAIL, and LOG_ERROR.

Referenced by arm920t_init_arch_info().

◆ arm920t_post_debug_entry()

◆ arm920t_pre_restore_context()

◆ arm920t_read_cp15_interpreted()

◆ arm920t_read_cp15_physical()

◆ arm920t_read_memory()

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

Reads a buffer, in the specified word size, with current MMU settings.

Definition at line 560 of file arm920t.c.

References arm7_9_read_memory(), buffer, count, and size.

◆ arm920t_read_phys_memory()

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

◆ arm920t_soft_reset_halt()

◆ arm920t_target_create()

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

Definition at line 836 of file arm920t.c.

References arm920t_init_arch_info(), and target::tap.

◆ arm920t_verify_pointer()

static int arm920t_verify_pointer ( struct command_invocation cmd,
struct arm920t_common arm920t 
)
static

◆ arm920t_write_cp15_interpreted()

static int arm920t_write_cp15_interpreted ( struct target target,
uint32_t  cp15_opcode,
uint32_t  value,
uint32_t  address 
)
static

◆ arm920t_write_cp15_physical()

◆ arm920t_write_memory()

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

◆ arm920t_write_phys_memory()

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

◆ COMMAND_HANDLER() [1/4]

◆ COMMAND_HANDLER() [2/4]

◆ COMMAND_HANDLER() [3/4]

◆ COMMAND_HANDLER() [4/4]

Variable Documentation

◆ arm920_not

const char arm920_not[] = "target is not an ARM920"
static

Definition at line 497 of file arm920t.c.

Referenced by arm920t_arch_state(), and arm920t_verify_pointer().

◆ arm920t_command_handlers

const struct command_registration arm920t_command_handlers[]
Initial value:
= {
{
},
{
.name = "arm920t",
.mode = COMMAND_ANY,
.help = "arm920t command group",
.usage = "",
},
}
static const struct command_registration arm920t_exec_command_handlers[]
Definition: arm920t.c:1550
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:247
@ COMMAND_ANY
Definition: command.h:42
const char * name
Definition: command.h:229

Definition at line 1534 of file arm920t.c.

◆ arm920t_exec_command_handlers

const struct command_registration arm920t_exec_command_handlers[]
static

Definition at line 1534 of file arm920t.c.

◆ arm920t_target

struct target_type arm920t_target

Holds methods for ARM920 targets.

Definition at line 1534 of file arm920t.c.