diff options
author | Tim Newsome <tim@sifive.com> | 2017-06-15 15:18:42 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2017-06-16 14:02:25 -0700 |
commit | 851849a29582f789d886ed30a9f0f60bb1cfd52e (patch) | |
tree | dd5cbbedcb95fdc49a1d0e4a69da5acd4f429f46 /src/target | |
parent | 3abb347bd914242b9396bfc96d9781163b42c391 (diff) | |
download | riscv-openocd-851849a29582f789d886ed30a9f0f60bb1cfd52e.zip riscv-openocd-851849a29582f789d886ed30a9f0f60bb1cfd52e.tar.gz riscv-openocd-851849a29582f789d886ed30a9f0f60bb1cfd52e.tar.bz2 |
Tell the user about detected harts.
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/riscv/riscv-013.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index fa240df..d529726 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -1097,15 +1097,12 @@ static int examine(struct target *target) r->xlen[i] = 64; } - LOG_DEBUG("hart %d has XLEN=%d", i, r->xlen[i]); - LOG_DEBUG("found program buffer at 0x%08lx", (long)(r->debug_buffer_addr[i])); - if (riscv_program_gah(&program64, r->debug_buffer_addr[i])) { LOG_ERROR("This implementation will not work with hart %d with debug_buffer_addr of 0x%lx\n", i, (long)r->debug_buffer_addr[i]); abort(); } - + /* Check to see if we can use the data words as an extended * program buffer or not. */ if (r->debug_buffer_addr[i] + (4 * r->debug_buffer_size[i]) == riscv013_data_addr(target)) { @@ -1132,10 +1129,15 @@ static int examine(struct target *target) riscv_resume_all_harts(target); target_set_examined(target); - // This print is used by some regression suites to know when - // they can connect with gdb/telnet. - // We will need to update those suites if we want to remove this line. - LOG_INFO("Examined RISC-V core"); + // Some regression suites rely on seeing 'Examined RISC-V core' to know + // when they can connect with gdb/telnet. + // We will need to update those suites if we want to change that text. + LOG_INFO("Examined RISC-V core; found %d harts", + riscv_count_harts(target)); + for (int i = 0; i < riscv_count_harts(target); ++i) { + LOG_INFO(" hart %d: XLEN=%d, program buffer at 0x%" PRIx64, i, + r->xlen[i], r->debug_buffer_addr[i]); + } return ERROR_OK; } |