diff --git a/riscv/htif.cc b/riscv/htif.cc index 0ba995a5..1be8d87e 100644 --- a/riscv/htif.cc +++ b/riscv/htif.cc @@ -129,17 +129,8 @@ int htif_t::wait_for_packet() assert(p.data_size == 1); if (pcr_reg == PCR_RESET) { - if (p.data[0] & 1) - { - sim->procs[pcr_coreid]->reset(); - if (pcr_coreid == 0 && sim->procs[0]->running()) - sim->stop(); - } - else if (!sim->procs[pcr_coreid]->running()) - { - reset = false; - sim->procs[pcr_coreid]->deliver_ipi(); - } + reset = p.data[0] & 1; + sim->procs[pcr_coreid]->reset(reset); } else { diff --git a/riscv/processor.cc b/riscv/processor.cc index bc235fe6..c1165755 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -12,7 +12,7 @@ processor_t::processor_t(sim_t* _sim, mmu_t* _mmu, uint32_t _id) : sim(*_sim), mmu(*_mmu), id(_id), utidx(0) { - reset(); + reset(true); // create microthreads for (int i=0; i