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

Go to the source code of this file.

Enumerations

enum  add_reg_type_flags { CFG_ADD_REG_TYPE_FLAGS_NAME , CFG_ADD_REG_TYPE_FLAGS_FLAG }
 
enum  add_reg_type_struct { CFG_ADD_REG_TYPE_STRUCT_NAME , CFG_ADD_REG_TYPE_STRUCT_BITFIELD }
 
enum  add_reg_types { CFG_ADD_REG_TYPE_FLAG , CFG_ADD_REG_TYPE_STRUCT }
 
enum  opts_add_reg {
  CFG_ADD_REG_NAME , CFG_ADD_REG_ARCH_NUM , CFG_ADD_REG_IS_CORE , CFG_ADD_REG_IS_BCR ,
  CFG_ADD_REG_GDB_FEATURE , CFG_ADD_REG_TYPE , CFG_ADD_REG_GENERAL
}
 

Functions

static int arc_cmd_jim_get_uint32 (struct jim_getopt_info *goi, uint32_t *value)
 
 COMMAND_HANDLER (arc_l1_cache_disable_auto_cmd)
 
 COMMAND_HANDLER (arc_l2_cache_disable_auto_cmd)
 
 COMMAND_HANDLER (arc_set_reg_exists)
 
void free_reg_desc (struct arc_reg_desc *r)
 
static int jim_arc_add_reg (Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 
static int jim_arc_add_reg_type_flags (Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 
static int jim_arc_add_reg_type_struct (Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 
static int jim_arc_get_aux_reg (Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 
static int jim_arc_get_core_reg (Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 
static int jim_arc_get_reg_field (Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 
static int jim_arc_read_reg_name_field (struct jim_getopt_info *goi, const char **name, int *name_len)
 
static int jim_arc_read_reg_type_field (struct jim_getopt_info *goi, const char **field_name, int *field_name_len, struct arc_reg_bitfield *bitfields, int cur_field, int type)
 
static int jim_arc_set_aux_reg (Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 
static int jim_arc_set_core_reg (Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 
static int jim_handle_actionpoints_num (Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 
static const char * validate_register (const struct arc_reg_desc *const reg, bool arch_num_set)
 

Variables

static const struct command_registration arc_cache_group_handlers []
 
static const struct command_registration arc_core_command_handlers []
 
static const struct command_registration arc_jtag_command_group []
 
static const struct command_registration arc_l2_cache_group_handlers []
 
const struct command_registration arc_monitor_command_handlers []
 
static struct jim_nvp nvp_add_reg_type_flags_opts []
 
static struct jim_nvp nvp_add_reg_type_struct_opts []
 
static struct jim_nvp opts_nvp_add_reg []
 

Enumeration Type Documentation

◆ add_reg_type_flags

Enumerator
CFG_ADD_REG_TYPE_FLAGS_NAME 
CFG_ADD_REG_TYPE_FLAGS_FLAG 

Definition at line 38 of file arc_cmd.c.

◆ add_reg_type_struct

Enumerator
CFG_ADD_REG_TYPE_STRUCT_NAME 
CFG_ADD_REG_TYPE_STRUCT_BITFIELD 

Definition at line 270 of file arc_cmd.c.

◆ add_reg_types

Enumerator
CFG_ADD_REG_TYPE_FLAG 
CFG_ADD_REG_TYPE_STRUCT 

Definition at line 33 of file arc_cmd.c.

◆ opts_add_reg

Enumerator
CFG_ADD_REG_NAME 
CFG_ADD_REG_ARCH_NUM 
CFG_ADD_REG_IS_CORE 
CFG_ADD_REG_IS_BCR 
CFG_ADD_REG_GDB_FEATURE 
CFG_ADD_REG_TYPE 
CFG_ADD_REG_GENERAL 

Definition at line 635 of file arc_cmd.c.

Function Documentation

◆ arc_cmd_jim_get_uint32()

static int arc_cmd_jim_get_uint32 ( struct jim_getopt_info goi,
uint32_t *  value 
)
static

Definition at line 25 of file arc_cmd.c.

References JIM_CHECK_RETVAL, and jim_getopt_wide().

Referenced by jim_arc_get_aux_reg(), jim_arc_get_core_reg(), and jim_arc_set_aux_reg().

◆ COMMAND_HANDLER() [1/3]

COMMAND_HANDLER ( arc_l1_cache_disable_auto_cmd  )

◆ COMMAND_HANDLER() [2/3]

COMMAND_HANDLER ( arc_l2_cache_disable_auto_cmd  )

◆ COMMAND_HANDLER() [3/3]

◆ free_reg_desc()

void free_reg_desc ( struct arc_reg_desc r)

Definition at line 656 of file arc_cmd.c.

References arc_reg_desc::gdb_xml_feature, and arc_reg_desc::name.

Referenced by arc_deinit_target(), and jim_arc_add_reg().

◆ jim_arc_add_reg()

◆ jim_arc_add_reg_type_flags()

◆ jim_arc_add_reg_type_struct()

◆ jim_arc_get_aux_reg()

◆ jim_arc_get_core_reg()

◆ jim_arc_get_reg_field()

◆ jim_arc_read_reg_name_field()

static int jim_arc_read_reg_name_field ( struct jim_getopt_info goi,
const char **  name,
int *  name_len 
)
static

◆ jim_arc_read_reg_type_field()

static int jim_arc_read_reg_type_field ( struct jim_getopt_info goi,
const char **  field_name,
int *  field_name_len,
struct arc_reg_bitfield bitfields,
int  cur_field,
int  type 
)
static

◆ jim_arc_set_aux_reg()

◆ jim_arc_set_core_reg()

static int jim_arc_set_core_reg ( Jim_Interp *  interp,
int  argc,
Jim_Obj *const *  argv 
)
static

Definition at line 401 of file arc_cmd.c.

◆ jim_handle_actionpoints_num()

static int jim_handle_actionpoints_num ( Jim_Interp *  interp,
int  argc,
Jim_Obj *const *  argv 
)
static

Definition at line 932 of file arc_cmd.c.

◆ validate_register()

static const char* validate_register ( const struct arc_reg_desc *const  reg,
bool  arch_num_set 
)
static

Definition at line 51 of file arc_cmd.c.

References reg::name, and NULL.

Referenced by jim_arc_add_reg().

Variable Documentation

◆ arc_cache_group_handlers

const struct command_registration arc_cache_group_handlers[]
static
Initial value:
= {
{
.name = "auto",
.handler = arc_l1_cache_disable_auto_cmd,
.mode = COMMAND_ANY,
.help = "Disable or enable L1",
.usage = "(1|0)",
},
{
.name = "l2",
.mode = COMMAND_ANY,
.help = "L2 cache command group",
.usage = "",
},
}
static const struct command_registration arc_l2_cache_group_handlers[]
Definition: arc_cmd.c:978
#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

Definition at line 932 of file arc_cmd.c.

◆ arc_core_command_handlers

const struct command_registration arc_core_command_handlers[]
static

Definition at line 932 of file arc_cmd.c.

◆ arc_jtag_command_group

const struct command_registration arc_jtag_command_group[]
static

Definition at line 401 of file arc_cmd.c.

◆ arc_l2_cache_group_handlers

const struct command_registration arc_l2_cache_group_handlers[]
static
Initial value:
= {
{
.name = "auto",
.handler = arc_l2_cache_disable_auto_cmd,
.mode = COMMAND_ANY,
.usage = "(1|0)",
.help = "Disable or enable L2",
},
}

Definition at line 932 of file arc_cmd.c.

◆ arc_monitor_command_handlers

const struct command_registration arc_monitor_command_handlers[]
Initial value:
= {
{
.name = "arc",
.mode = COMMAND_ANY,
.help = "ARC monitor command group",
.usage = "",
},
}
static const struct command_registration arc_core_command_handlers[]
Definition: arc_cmd.c:1008

Definition at line 932 of file arc_cmd.c.

◆ nvp_add_reg_type_flags_opts

struct jim_nvp nvp_add_reg_type_flags_opts[]
static
Initial value:
= {
{ .name = "-name", .value = CFG_ADD_REG_TYPE_FLAGS_NAME },
{ .name = "-flag", .value = CFG_ADD_REG_TYPE_FLAGS_FLAG },
{ .name = NULL, .value = -1 }
}
@ CFG_ADD_REG_TYPE_FLAGS_FLAG
Definition: arc_cmd.c:40
@ CFG_ADD_REG_TYPE_FLAGS_NAME
Definition: arc_cmd.c:39
#define NULL
Definition: usb.h:16

Definition at line 25 of file arc_cmd.c.

Referenced by jim_arc_add_reg_type_flags().

◆ nvp_add_reg_type_struct_opts

struct jim_nvp nvp_add_reg_type_struct_opts[]
static
Initial value:
= {
{ .name = "-name", .value = CFG_ADD_REG_TYPE_STRUCT_NAME },
{ .name = "-bitfield", .value = CFG_ADD_REG_TYPE_STRUCT_BITFIELD },
{ .name = NULL, .value = -1 }
}
@ CFG_ADD_REG_TYPE_STRUCT_BITFIELD
Definition: arc_cmd.c:272
@ CFG_ADD_REG_TYPE_STRUCT_NAME
Definition: arc_cmd.c:271

Definition at line 125 of file arc_cmd.c.

Referenced by jim_arc_add_reg_type_struct().

◆ opts_nvp_add_reg

struct jim_nvp opts_nvp_add_reg[]
static
Initial value:
= {
{ .name = "-name", .value = CFG_ADD_REG_NAME },
{ .name = "-num", .value = CFG_ADD_REG_ARCH_NUM },
{ .name = "-core", .value = CFG_ADD_REG_IS_CORE },
{ .name = "-bcr", .value = CFG_ADD_REG_IS_BCR },
{ .name = "-feature", .value = CFG_ADD_REG_GDB_FEATURE },
{ .name = "-type", .value = CFG_ADD_REG_TYPE },
{ .name = "-g", .value = CFG_ADD_REG_GENERAL },
{ .name = NULL, .value = -1 }
}
@ CFG_ADD_REG_ARCH_NUM
Definition: arc_cmd.c:637
@ CFG_ADD_REG_NAME
Definition: arc_cmd.c:636
@ CFG_ADD_REG_GDB_FEATURE
Definition: arc_cmd.c:640
@ CFG_ADD_REG_GENERAL
Definition: arc_cmd.c:642
@ CFG_ADD_REG_IS_BCR
Definition: arc_cmd.c:639
@ CFG_ADD_REG_IS_CORE
Definition: arc_cmd.c:638
@ CFG_ADD_REG_TYPE
Definition: arc_cmd.c:641

Definition at line 491 of file arc_cmd.c.

Referenced by jim_arc_add_reg().