Browse Source

Merge branch 'master' into master

pull/2199/head
Natheir Abu-Dahab 3 weeks ago
committed by GitHub
parent
commit
6e00eaaeee
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      riscv/processor.cc
  2. 4
      riscv/remote_bitbang.cc
  3. 3
      riscv/remote_bitbang.h

4
riscv/processor.cc

@ -497,8 +497,8 @@ void processor_t::take_trap(trap_t& t, reg_t epc)
reg_t s = state.mstatus->read(); reg_t s = state.mstatus->read();
if ( extension_enabled(EXT_SMDBLTRP)) { if ( extension_enabled(EXT_SMDBLTRP)) {
if (get_field(s, MSTATUS_MDT) || !nmie) { if (get_field(s, MSTATUS_MDT) && (!state.mnstatus || !nmie)) {
// Critical error - Double trap in M-mode or trap when nmie is 0 // Critical error - Double trap in M-mode when Smrnmi not implemented or nmie is 0
// RNMI is not modeled else double trap in M-mode would trap to // RNMI is not modeled else double trap in M-mode would trap to
// RNMI handler instead of leading to a critical error // RNMI handler instead of leading to a critical error
state.critical_error = 1; state.critical_error = 1;

4
riscv/remote_bitbang.cc

@ -184,3 +184,7 @@ void remote_bitbang_t::execute_commands()
} }
} }
} }
bool remote_bitbang_t::is_client_connected() const{
return client_fd != 0;
}

3
riscv/remote_bitbang.h

@ -15,6 +15,9 @@ public:
// Do a bit of work. // Do a bit of work.
void tick(); void tick();
// Check if any client is connected
bool is_client_connected() const;
private: private:
jtag_dtm_t *tap; jtag_dtm_t *tap;

Loading…
Cancel
Save