From 5542d31fcf19e1aa35c3a721133fe6a7dfa2fcdc Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Mon, 11 Jun 2018 13:36:30 -0700 Subject: Update debug_defines.h Add support for hartselhi parsing, but other parts of the debug code still don't support more than 1024 harts. --- riscv/debug_module.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'riscv/debug_module.cc') diff --git a/riscv/debug_module.cc b/riscv/debug_module.cc index 5275a5f..f271d74 100644 --- a/riscv/debug_module.cc +++ b/riscv/debug_module.cc @@ -348,8 +348,9 @@ bool debug_module_t::dmi_read(unsigned address, uint32_t *value) result = set_field(result, DMI_DMCONTROL_HALTREQ, dmcontrol.haltreq); result = set_field(result, DMI_DMCONTROL_RESUMEREQ, dmcontrol.resumereq); - result = set_field(result, ((1L<> DMI_DMCONTROL_HARTSELLO_LENGTH); + result = set_field(result, DMI_DMCONTROL_HARTSELLO, dmcontrol.hartsel); result = set_field(result, DMI_DMCONTROL_HARTRESET, dmcontrol.hartreset); result = set_field(result, DMI_DMCONTROL_NDMRESET, dmcontrol.ndmreset); result = set_field(result, DMI_DMCONTROL_DMACTIVE, dmcontrol.dmactive); @@ -668,8 +669,10 @@ bool debug_module_t::dmi_write(unsigned address, uint32_t value) dmcontrol.resumereq = get_field(value, DMI_DMCONTROL_RESUMEREQ); dmcontrol.hartreset = get_field(value, DMI_DMCONTROL_HARTRESET); dmcontrol.ndmreset = get_field(value, DMI_DMCONTROL_NDMRESET); - dmcontrol.hartsel = get_field(value, ((1L<