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

Go to the source code of this file.

Functions

bool check_not_halted (const struct target *t)
 
static int disable_paging (struct target *t)
 
static int do_halt (struct target *t)
 
static int do_resume (struct target *t)
 
static int drscan (struct target *t, uint8_t *out, uint8_t *in, uint8_t len)
 
static int enable_paging (struct target *t)
 
static int enter_probemode (struct target *t)
 
static int exit_probemode (struct target *t)
 
static uint8_t get_num_user_regs (struct target *t)
 
static uint32_t get_tapstatus (struct target *t)
 
static int halt_prep (struct target *t)
 
static int irscan (struct target *t, uint8_t *out, uint8_t *in, uint8_t ir_len)
 
static bool is_paging_enabled (struct target *t)
 
int lakemont_arch_state (struct target *t)
 
static struct reg_cachelakemont_build_reg_cache (struct target *target)
 
static int lakemont_get_core_reg (struct reg *reg)
 
int lakemont_halt (struct target *t)
 
int lakemont_init_arch_info (struct target *t, struct x86_32_common *x86_32)
 
int lakemont_init_target (struct command_context *cmd_ctx, struct target *t)
 
int lakemont_poll (struct target *t)
 
int lakemont_reset_assert (struct target *t)
 
static int lakemont_reset_break (struct target *t)
 
int lakemont_reset_deassert (struct target *t)
 
int lakemont_resume (struct target *t, int current, target_addr_t address, int handle_breakpoints, int debug_execution)
 
static int lakemont_set_core_reg (struct reg *reg, uint8_t *buf)
 
int lakemont_step (struct target *t, int current, target_addr_t address, int handle_breakpoints)
 
int lakemont_update_after_probemode_entry (struct target *t)
 
static int read_all_core_hw_regs (struct target *t)
 
static int read_hw_reg (struct target *t, int reg, uint32_t *regval, uint8_t cache)
 
static int restore_context (struct target *target)
 
static int save_context (struct target *target)
 
static int submit_instruction (struct target *t, int num)
 
static int submit_instruction_pir (struct target *t, int num)
 
static int submit_pir (struct target *t, uint64_t op)
 
static int submit_reg_pir (struct target *t, int num)
 
static bool sw_bpts_supported (struct target *t)
 
static int transaction_status (struct target *t)
 
static int write_all_core_hw_regs (struct target *t)
 
static int write_hw_reg (struct target *t, int reg, uint32_t regval, uint8_t cache)
 

Variables

struct {
   uint8_t   id
 
   const char *   name
 
   uint64_t   op
 
instructions []
 
static const struct reg_arch_type lakemont_reg_type
 
struct {
   unsigned   bits
 
   const char *   feature
 
   const char *   group
 
   uint8_t   id
 
   const char *   name
 
   uint64_t   op
 
   uint8_t   pm_idx
 
   enum reg_type   type
 
regs []
 
static struct scan_blk scan
 

Function Documentation

static int disable_paging ( struct target t)
static
static int do_halt ( struct target t)
static
static int enable_paging ( struct target t)
static
static int enter_probemode ( struct target t)
static
static int exit_probemode ( struct target t)
static
static uint8_t get_num_user_regs ( struct target t)
static

Definition at line 727 of file lakemont.c.

References x86_32_common::cache, reg_cache::num_regs, and target_to_x86_32().

Referenced by lakemont_init_arch_info().

static uint32_t get_tapstatus ( struct target t)
static
static bool is_paging_enabled ( struct target t)
static

Definition at line 718 of file lakemont.c.

References CR0, CR0_PG, I, x86_32_common::pm_regs, and target_to_x86_32().

Referenced by lakemont_init_arch_info().

int lakemont_arch_state ( struct target t)
static int lakemont_get_core_reg ( struct reg reg)
static
int lakemont_halt ( struct target t)
int lakemont_init_target ( struct command_context cmd_ctx,
struct target t 
)
static int lakemont_set_core_reg ( struct reg reg,
uint8_t *  buf 
)
static
int lakemont_update_after_probemode_entry ( struct target t)
static int read_all_core_hw_regs ( struct target t)
static
static int restore_context ( struct target target)
static
static int save_context ( struct target target)
static
static int submit_instruction ( struct target t,
int  num 
)
static

Definition at line 778 of file lakemont.c.

References ERROR_OK, LOG_ERROR, and submit_instruction_pir().

Referenced by lakemont_init_arch_info().

static int submit_instruction_pir ( struct target t,
int  num 
)
static

Definition at line 799 of file lakemont.c.

References ERROR_OK, instructions, LOG_DEBUG, LOG_ERROR, name, op, and submit_pir().

Referenced by read_hw_reg(), submit_instruction(), and write_hw_reg().

static int submit_pir ( struct target t,
uint64_t  op 
)
static
static int submit_reg_pir ( struct target t,
int  num 
)
static

Definition at line 788 of file lakemont.c.

References ERROR_OK, LOG_DEBUG, LOG_ERROR, name, op, regs, and submit_pir().

Referenced by halt_prep(), read_hw_reg(), and write_hw_reg().

static bool sw_bpts_supported ( struct target t)
static

Definition at line 757 of file lakemont.c.

References get_tapstatus(), and TS_SBP_BIT.

Referenced by lakemont_init_arch_info().

static int transaction_status ( struct target t)
static

Definition at line 766 of file lakemont.c.

References ERROR_FAIL, ERROR_OK, get_tapstatus(), LOG_ERROR, TS_EN_PM_BIT, and TS_PRDY_BIT.

Referenced by lakemont_init_arch_info().

static int write_all_core_hw_regs ( struct target t)
static

Variable Documentation

unsigned bits

Definition at line 81 of file lakemont.c.

const char* feature

Definition at line 84 of file lakemont.c.

Referenced by lakemont_build_reg_cache().

const char* group

Definition at line 83 of file lakemont.c.

uint8_t id

Definition at line 77 of file lakemont.c.

const struct reg_arch_type lakemont_reg_type
static
Initial value:
= {
}
static int lakemont_set_core_reg(struct reg *reg, uint8_t *buf)
Definition: lakemont.c:351
static int lakemont_get_core_reg(struct reg *reg)
Definition: lakemont.c:339

Definition at line 365 of file lakemont.c.

Referenced by lakemont_build_reg_cache().

const char* name

Definition at line 78 of file lakemont.c.

Referenced by halt_prep(), submit_instruction_pir(), and submit_reg_pir().

uint8_t pm_idx

Definition at line 80 of file lakemont.c.

Referenced by read_all_core_hw_regs(), and write_all_core_hw_regs().

enum reg_type type

Definition at line 82 of file lakemont.c.

Referenced by lakemont_poll().