Don't rely on hart count until it's correct.

Change-Id: I4e05eb091823b2e0fb481ca0b599072ba1ca70f2
update_defines
Tim Newsome 2017-12-11 14:21:41 -08:00
parent 46715c7d8a
commit ec1c814017
1 changed files with 1 additions and 1 deletions

View File

@ -1194,7 +1194,7 @@ static int examine(struct target *target)
r->impebreak = get_field(dmstatus, DMI_DMSTATUS_IMPEBREAK); r->impebreak = get_field(dmstatus, DMI_DMSTATUS_IMPEBREAK);
for (int i = 0; i < RISCV_MAX_HARTS; ++i) { for (int i = 0; i < RISCV_MAX_HARTS; ++i) {
if (!riscv_hart_enabled(target, i)) if (!riscv_rtos_enabled(target) && i != target->coreid)
continue; continue;
riscv_set_current_hartid(target, i); riscv_set_current_hartid(target, i);