aboutsummaryrefslogtreecommitdiff
path: root/src/target/riscv/riscv.h
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2020-05-19 10:34:36 -0700
committerGitHub <noreply@github.com>2020-05-19 10:34:36 -0700
commit4f9e2d7171f3cad8d1a99dff3eee5ec5e6d8ea2b (patch)
tree256aa559a508962fedf340cb282fb61943adfc58 /src/target/riscv/riscv.h
parent1524487a13746723e4a6658bcb5ff4627150420a (diff)
downloadriscv-openocd-4f9e2d7171f3cad8d1a99dff3eee5ec5e6d8ea2b.zip
riscv-openocd-4f9e2d7171f3cad8d1a99dff3eee5ec5e6d8ea2b.tar.gz
riscv-openocd-4f9e2d7171f3cad8d1a99dff3eee5ec5e6d8ea2b.tar.bz2
Fix semihosting for multicore targets (#478)
* WIP making semihosting work with -rtos hwthread. Change-Id: Icb46f3eeedc1391e8fdc73c3ad8036f20267eb2e * More WIP. Change-Id: I670a6e1ba2a13a6ef2ae303a99559a16fdd1bbfb * Fix halting due to a trigger. Change-Id: Ie7caa8dde9518bcd5440e34cf31ed0d30ebf29ad * Fix multicore semihosting without halt groups. Change-Id: I53587e5234308ed2cc30a7132c86e4c94eb176c4 * WIP Change-Id: I40630543b08d8b533726cb3f63aa60a62be8ef40 * Fix single core semihosting. This was the last bug! Change-Id: I593abac027fa9707f48b7f58163d7089574a0e28 * Fix whitespace. Change-Id: I285c152970b87864c63803fae61312e5b79dfe6d
Diffstat (limited to 'src/target/riscv/riscv.h')
-rw-r--r--src/target/riscv/riscv.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/target/riscv/riscv.h b/src/target/riscv/riscv.h
index e3bd635..d446aa8 100644
--- a/src/target/riscv/riscv.h
+++ b/src/target/riscv/riscv.h
@@ -239,7 +239,8 @@ int riscv_resume(
int current,
target_addr_t address,
int handle_breakpoints,
- int debug_execution
+ int debug_execution,
+ bool single_hart
);
int riscv_openocd_step(
@@ -337,7 +338,13 @@ int riscv_hit_watchpoint(struct target *target, struct watchpoint **hit_wp_addre
int riscv_init_registers(struct target *target);
void riscv_semihosting_init(struct target *target);
-int riscv_semihosting(struct target *target, int *retval);
+typedef enum {
+ SEMI_NONE, /* Not halted for a semihosting call. */
+ SEMI_HANDLED, /* Call handled, and target was resumed. */
+ SEMI_WAITING, /* Call handled, target is halted waiting until we can resume. */
+ SEMI_ERROR /* Something went wrong. */
+} semihosting_result_t;
+semihosting_result_t riscv_semihosting(struct target *target, int *retval);
void riscv_add_bscan_tunneled_scan(struct target *target, struct scan_field *field,
riscv_bscan_tunneled_scan_context_t *ctxt);