Skip to content

Commit

Permalink
Trigger CSR:fix write tdata1.data when disable trigger (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
wissygh authored Jan 24, 2024
1 parent a4dd9c0 commit 761ff10
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/isa/riscv64/system/priv.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ static inline void csr_write(word_t *dest, word_t src) {
case TRIG_TYPE_NONE: // write type 0 to disable this trigger
case TRIG_TYPE_DISABLE:
tdata1_reg->type = TRIG_TYPE_DISABLE;
tdata1_reg->data = 0;
break;
case TRIG_TYPE_MCONTROL:
mcontrol_checked_write(&cpu.TM->triggers[tselect->val].tdata1.mcontrol, &src, cpu.TM);
Expand Down

0 comments on commit 761ff10

Please sign in to comment.