From ec1c814017af4a4dab865be99dcc31c63d45da36 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Mon, 11 Dec 2017 14:21:41 -0800 Subject: Don't rely on hart count until it's correct. Change-Id: I4e05eb091823b2e0fb481ca0b599072ba1ca70f2 --- src/target/riscv/riscv-013.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index a832494..1fff990 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -1194,7 +1194,7 @@ static int examine(struct target *target) r->impebreak = get_field(dmstatus, DMI_DMSTATUS_IMPEBREAK); for (int i = 0; i < RISCV_MAX_HARTS; ++i) { - if (!riscv_hart_enabled(target, i)) + if (!riscv_rtos_enabled(target) && i != target->coreid) continue; riscv_set_current_hartid(target, i); -- cgit v1.1