diff --git a/riscv/debug_module.cc b/riscv/debug_module.cc index 026f4b3d9b..e9aef1a822 100644 --- a/riscv/debug_module.cc +++ b/riscv/debug_module.cc @@ -579,6 +579,10 @@ bool debug_module_t::perform_abstract_command() abstractcs.cmderr = CMDERR_BUSY; return true; } + if (!hart_available(dmcontrol.hartsel)) { + abstractcs.cmderr = CMDERR_HALTRESUME; + return true; + } if ((command >> 24) == 0) { // register access