diff options
author | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2011-07-15 22:20:34 +0200 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2011-10-09 00:00:52 +0200 |
commit | 9d4c466c219039bd6a2ea03467cd3ee8be2a0e76 (patch) | |
tree | 12bd4debbd46dd7993cd2e423dda41fc3de26d65 /src/target/armv7m.h | |
parent | 3f6ef7a40bcff5e1278b662248902c45a1dc8f81 (diff) |
armv7m: implement async algorithm functions
Split armv7m_run_algorithm into two pieces and use them to reimplement it.
The arch_info parameter is used to keep context between the two calls, so
both calls must refer to the same armv7m_algorithm struct. Ugly but works
for a proof-of-concept.
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src/target/armv7m.h')
-rw-r--r-- | src/target/armv7m.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/target/armv7m.h b/src/target/armv7m.h index 8ef38008..ca921468 100644 --- a/src/target/armv7m.h +++ b/src/target/armv7m.h @@ -142,6 +142,8 @@ struct armv7m_algorithm int common_magic; enum armv7m_mode core_mode; + + uint32_t context[ARMV7M_CONTROL + 1]; //ARMV7M_NUM_REGS }; struct armv7m_core_reg @@ -168,6 +170,18 @@ int armv7m_run_algorithm(struct target *target, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); +int armv7m_start_algorithm(struct target *target, + int num_mem_params, struct mem_param *mem_params, + int num_reg_params, struct reg_param *reg_params, + uint32_t entry_point, uint32_t exit_point, + void *arch_info); + +int armv7m_wait_algorithm(struct target *target, + int num_mem_params, struct mem_param *mem_params, + int num_reg_params, struct reg_param *reg_params, + uint32_t exit_point, int timeout_ms, + void *arch_info); + int armv7m_invalidate_core_regs(struct target *target); int armv7m_restore_context(struct target *target); |