aboutsummaryrefslogtreecommitdiff
path: root/fesvr
diff options
context:
space:
mode:
Diffstat (limited to 'fesvr')
-rw-r--r--fesvr/dtm.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/fesvr/dtm.cc b/fesvr/dtm.cc
index 46032c3..6e4952f 100644
--- a/fesvr/dtm.cc
+++ b/fesvr/dtm.cc
@@ -558,6 +558,9 @@ void dtm_t::producer_thread()
// Learn about the Debug Module and assert things we
// depend on in this code.
+ // Enable the debugger.
+ write(DMI_DMCONTROL, DMI_DMCONTROL_DMACTIVE);
+
// These are checked every time we run an abstract command.
uint32_t abstractcs = read(DMI_ABSTRACTCS);
ram_words = get_field(abstractcs, DMI_ABSTRACTCS_PROGSIZE);
@@ -571,9 +574,6 @@ void dtm_t::producer_thread()
assert(get_field(hartinfo, DMI_HARTINFO_DATAACCESS));
data_base = get_field(hartinfo, DMI_HARTINFO_DATAADDR);
-
- // Enable the debugger.
- write(DMI_DMCONTROL, DMI_DMCONTROL_DMACTIVE);
num_harts = enumerate_harts();
halt(0);