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

◆ check_not_halted()

◆ disable_paging()

static int disable_paging ( struct target t)
static

◆ do_halt()

static int do_halt ( struct target t)
static

◆ do_resume()

◆ drscan()

◆ enable_paging()

static int enable_paging ( struct target t)
static

◆ enter_probemode()

static int enter_probemode ( struct target t)
static

◆ exit_probemode()

static int exit_probemode ( struct target t)
static

◆ get_num_user_regs()

static uint8_t get_num_user_regs ( struct target t)
static

Definition at line 716 of file lakemont.c.

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

Referenced by lakemont_init_arch_info().

◆ get_tapstatus()

static uint32_t get_tapstatus ( struct target t)
static

◆ halt_prep()

◆ irscan()

◆ is_paging_enabled()

static bool is_paging_enabled ( struct target t)
static

Definition at line 707 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().

◆ lakemont_arch_state()

int lakemont_arch_state ( struct target t)

◆ lakemont_build_reg_cache()

◆ lakemont_get_core_reg()

static int lakemont_get_core_reg ( struct reg reg)
static

◆ lakemont_halt()

int lakemont_halt ( struct target t)

◆ lakemont_init_arch_info()

◆ lakemont_init_target()

int lakemont_init_target ( struct command_context cmd_ctx,
struct target t 
)

◆ lakemont_poll()

◆ lakemont_reset_assert()

◆ lakemont_reset_break()

◆ lakemont_reset_deassert()

◆ lakemont_resume()

◆ lakemont_set_core_reg()

static int lakemont_set_core_reg ( struct reg reg,
uint8_t *  buf 
)
static

Definition at line 340 of file lakemont.c.

◆ lakemont_step()

◆ lakemont_update_after_probemode_entry()

int lakemont_update_after_probemode_entry ( struct target t)

◆ read_all_core_hw_regs()

static int read_all_core_hw_regs ( struct target t)
static

◆ read_hw_reg()

◆ restore_context()

static int restore_context ( struct target target)
static

◆ save_context()

static int save_context ( struct target target)
static

◆ submit_instruction()

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

Definition at line 767 of file lakemont.c.

References ERROR_OK, LOG_ERROR, and submit_instruction_pir().

Referenced by lakemont_init_arch_info().

◆ submit_instruction_pir()

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

Definition at line 788 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().

◆ submit_pir()

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

◆ submit_reg_pir()

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

Definition at line 777 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().

◆ sw_bpts_supported()

static bool sw_bpts_supported ( struct target t)
static

Definition at line 746 of file lakemont.c.

References get_tapstatus(), and TS_SBP_BIT.

Referenced by lakemont_init_arch_info().

◆ transaction_status()

static int transaction_status ( struct target t)
static

Definition at line 755 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().

◆ write_all_core_hw_regs()

static int write_all_core_hw_regs ( struct target t)
static

◆ write_hw_reg()

Variable Documentation

◆ bits

unsigned bits

Definition at line 70 of file lakemont.c.

◆ feature

const char* feature

Definition at line 73 of file lakemont.c.

Referenced by lakemont_build_reg_cache().

◆ group

const char* group

Definition at line 72 of file lakemont.c.

◆ id

uint8_t id

Definition at line 66 of file lakemont.c.

◆ 

◆ lakemont_reg_type

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:340
static int lakemont_get_core_reg(struct reg *reg)
Definition: lakemont.c:328

Definition at line 340 of file lakemont.c.

Referenced by lakemont_build_reg_cache().

◆ name

const char* name

Definition at line 67 of file lakemont.c.

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

◆ op

◆ pm_idx

uint8_t pm_idx

Definition at line 69 of file lakemont.c.

Referenced by read_all_core_hw_regs(), and write_all_core_hw_regs().

◆ 

◆ scan

◆ type

enum reg_type type

Definition at line 70 of file lakemont.c.

Referenced by lakemont_poll().