From 77e9aaef19f528d8ced2301fe39eb941a9fdc3e2 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Thu, 28 Sep 2023 09:08:25 -0700 Subject: [PATCH] debug: Abstract commands fail on unavailable harts. --- riscv/debug_module.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/riscv/debug_module.cc b/riscv/debug_module.cc index 026f4b3d..e9aef1a8 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