OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | lakemont_core_reg |
struct | scan_blk |
Macros | |
#define | BP_SIZE 1 |
#define | BYPASS 255 |
#define | DELAY_SUBMITPIR 0 /* for now 0 is working */ |
#define | I(name) (((struct lakemont_core_reg *)x86_32->cache->reg_list[name].arch_info)->pm_idx) |
#define | ID_SIZE 32 |
#define | IDCODE 2 |
#define | LMT_IRLEN 8 |
#define | MAX_SCAN_SIZE PIR_SIZE |
#define | NOT_AVAIL_REG 0xff |
#define | NOT_NULL 2 |
#define | NOT_PMREG 0xfe |
#define | PDR_SIZE 32 |
#define | PIR_SIZE 64 |
#define | PM_DR7 ((uint32_t)0x00000400) |
#define | PM_DSAR ((uint32_t)0x004F9300) |
#define | PM_DSB ((uint32_t)0x00000000) |
#define | PM_DSL ((uint32_t)0xFFFFFFFF) |
#define | PM_SIZE 1 |
#define | PROBEMODE 4 |
#define | RDWRPDR 8 |
#define | SUBMITPIR 3 |
#define | TAPSTATUS 11 |
#define | TS_EN_PM_BIT ((uint32_t)0x00000002) |
#define | TS_PM_BIT ((uint32_t)0x00000004) |
#define | TS_PMCR_BIT ((uint32_t)0x00000008) |
#define | TS_PRDY_BIT ((uint32_t)0x00000001) |
#define | TS_SBP_BIT ((uint32_t)0x00000010) |
#define | TS_SIZE 32 |
#define | WRPIR 6 |
Functions | |
int | lakemont_arch_state (struct target *t) |
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) |
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) |
int | lakemont_step (struct target *t, int current, target_addr_t address, int handle_breakpoints) |
int | lakemont_update_after_probemode_entry (struct target *t) |
#define BP_SIZE 1 |
Definition at line 47 of file lakemont.h.
#define BYPASS 255 |
Definition at line 38 of file lakemont.h.
#define DELAY_SUBMITPIR 0 /* for now 0 is working */ |
Definition at line 57 of file lakemont.h.
#define I | ( | name | ) | (((struct lakemont_core_reg *)x86_32->cache->reg_list[name].arch_info)->pm_idx) |
Definition at line 80 of file lakemont.h.
#define ID_SIZE 32 |
Definition at line 42 of file lakemont.h.
#define IDCODE 2 |
Definition at line 32 of file lakemont.h.
#define LMT_IRLEN 8 |
Definition at line 29 of file lakemont.h.
#define MAX_SCAN_SIZE PIR_SIZE |
Definition at line 48 of file lakemont.h.
#define NOT_AVAIL_REG 0xff |
Definition at line 52 of file lakemont.h.
#define NOT_NULL 2 |
Definition at line 39 of file lakemont.h.
#define NOT_PMREG 0xfe |
Definition at line 51 of file lakemont.h.
#define PDR_SIZE 32 |
Definition at line 45 of file lakemont.h.
#define PIR_SIZE 64 |
Definition at line 44 of file lakemont.h.
#define PM_DR7 ((uint32_t)0x00000400) |
Definition at line 56 of file lakemont.h.
#define PM_DSAR ((uint32_t)0x004F9300) |
Definition at line 55 of file lakemont.h.
#define PM_DSB ((uint32_t)0x00000000) |
Definition at line 53 of file lakemont.h.
#define PM_DSL ((uint32_t)0xFFFFFFFF) |
Definition at line 54 of file lakemont.h.
#define PM_SIZE 1 |
Definition at line 43 of file lakemont.h.
#define PROBEMODE 4 |
Definition at line 34 of file lakemont.h.
#define RDWRPDR 8 |
Definition at line 36 of file lakemont.h.
#define SUBMITPIR 3 |
Definition at line 33 of file lakemont.h.
#define TAPSTATUS 11 |
Definition at line 37 of file lakemont.h.
#define TS_EN_PM_BIT ((uint32_t)0x00000002) |
Definition at line 61 of file lakemont.h.
#define TS_PM_BIT ((uint32_t)0x00000004) |
Definition at line 62 of file lakemont.h.
#define TS_PMCR_BIT ((uint32_t)0x00000008) |
Definition at line 63 of file lakemont.h.
#define TS_PRDY_BIT ((uint32_t)0x00000001) |
Definition at line 60 of file lakemont.h.
#define TS_SBP_BIT ((uint32_t)0x00000010) |
Definition at line 64 of file lakemont.h.
#define TS_SIZE 32 |
Definition at line 46 of file lakemont.h.
#define WRPIR 6 |
Definition at line 35 of file lakemont.h.
int lakemont_arch_state | ( | struct target * | t | ) |
Definition at line 966 of file lakemont.c.
References buf_get_u32(), x86_32_common::cache, CR0, CR0_PE, debug_reason_name(), EIP, ERROR_OK, LOG_USER, reg_cache::reg_list, target_to_x86_32(), and reg::value.
int lakemont_halt | ( | struct target * | t | ) |
Definition at line 978 of file lakemont.c.
References DBG_REASON_DBGRQ, target::debug_reason, do_halt(), ERROR_FAIL, ERROR_OK, LOG_ERROR, target::state, and TARGET_RUNNING.
Referenced by lakemont_reset_assert().
int lakemont_init_arch_info | ( | struct target * | t, |
struct x86_32_common * | x86_32 | ||
) |
Definition at line 833 of file lakemont.c.
References disable_paging(), x86_32_common::disable_paging, enable_paging(), x86_32_common::enable_paging, ERROR_OK, get_num_user_regs(), x86_32_common::get_num_user_regs, is_paging_enabled(), x86_32_common::is_paging_enabled, read_hw_reg(), x86_32_common::read_hw_reg, submit_instruction(), x86_32_common::submit_instruction, sw_bpts_supported(), x86_32_common::sw_bpts_supported, transaction_status(), x86_32_common::transaction_status, write_hw_reg(), and x86_32_common::write_hw_reg.
Referenced by quark_d20xx_target_create().
int lakemont_init_target | ( | struct command_context * | cmd_ctx, |
struct target * | t | ||
) |
Definition at line 825 of file lakemont.c.
References DBG_REASON_NOTHALTED, target::debug_reason, ERROR_OK, lakemont_build_reg_cache(), target::state, and TARGET_RUNNING.
Referenced by quark_d20xx_init_target().
int lakemont_poll | ( | struct target * | t | ) |
Definition at line 847 of file lakemont.c.
References BKPT_SOFT, breakpoint_find(), buf_get_u32(), buf_set_u32(), x86_32_common::cache, DBG_REASON_BREAKPOINT, DBG_REASON_UNDEFINED, target::debug_reason, reg::dirty, DR0, DR1, DR2, DR3, DR6, DR6_BRKDETECT_0, DR6_BRKDETECT_1, DR6_BRKDETECT_2, DR6_BRKDETECT_3, DR7, DR7_BP_EXECUTE, DR7_BP_WRITE, DR7_RW_LEN_SIZE, DR7_RW_SHIFT, EIP, ERROR_FAIL, ERROR_OK, get_tapstatus(), halt_prep(), LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_USER, NULL, reg_cache::reg_list, save_context(), target::state, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_HALTED, TARGET_HALTED, TARGET_RUNNING, target_to_x86_32(), TS_PM_BIT, TS_PMCR_BIT, breakpoint::type, type, reg::valid, and reg::value.
Referenced by lakemont_reset_deassert().
int lakemont_reset_assert | ( | struct target * | t | ) |
Definition at line 1164 of file lakemont.c.
References BYTE, ERROR_OK, x86_32_common::forced_halt_for_reset, lakemont_halt(), lakemont_reset_break(), lakemont_resume(), LOG_DEBUG, LOG_ERROR, target::reset_halt, target::state, TARGET_HALTED, target_to_x86_32(), x86_32_common_reset_breakpoints_watchpoints(), and x86_32_common_write_io().
int lakemont_reset_deassert | ( | struct target * | t | ) |
Definition at line 1208 of file lakemont.c.
References ERROR_OK, lakemont_poll(), lakemont_update_after_probemode_entry(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, target::reset_halt, target::state, target_halt(), TARGET_HALTED, target_name(), TARGET_UNKNOWN, and target_was_examined().
int lakemont_resume | ( | struct target * | t, |
int | current, | ||
target_addr_t | address, | ||
int | handle_breakpoints, | ||
int | debug_execution | ||
) |
Definition at line 991 of file lakemont.c.
References breakpoint_find(), target::breakpoints, buf_get_u32(), buf_set_u32(), x86_32_common::cache, check_not_halted(), do_resume(), EIP, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, breakpoint::is_set, watchpoint::is_set, lakemont_step(), LOG_ERROR, LOG_USER, breakpoint::next, watchpoint::next, NULL, PMCR, reg_cache::reg_list, target::state, TARGET_HALTED, target_to_x86_32(), reg::value, and target::watchpoints.
Referenced by lakemont_reset_assert(), and quark_d20xx_reset_deassert().
int lakemont_step | ( | struct target * | t, |
int | current, | ||
target_addr_t | address, | ||
int | handle_breakpoints | ||
) |
Definition at line 1032 of file lakemont.c.
References breakpoint_find(), buf_get_u32(), buf_set_u32(), x86_32_common::cache, check_not_halted(), DBG_REASON_SINGLESTEP, target::debug_reason, EFLAGS, EFLAGS_RF, EFLAGS_TF, EIP, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, exit_probemode(), get_tapstatus(), halt_prep(), LOG_DEBUG, LOG_ERROR, LOG_USER, NULL, PMCR, reg_cache::reg_list, restore_context(), save_context(), target::state, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_HALTED, TARGET_EVENT_RESUMED, TARGET_HALTED, TARGET_RUNNING, target_to_x86_32(), TS_EN_PM_BIT, TS_PM_BIT, TS_PMCR_BIT, TS_PRDY_BIT, reg::value, x86_32_common_add_breakpoint(), and x86_32_common_remove_breakpoint().
Referenced by lakemont_resume().
int lakemont_update_after_probemode_entry | ( | struct target * | t | ) |
Definition at line 569 of file lakemont.c.
References ERROR_FAIL, ERROR_OK, halt_prep(), save_context(), target::state, target_call_event_callbacks(), TARGET_EVENT_HALTED, and TARGET_HALTED.
Referenced by do_halt(), lakemont_reset_deassert(), and quark_d20xx_reset_deassert().