Skip to content

Commit

Permalink
Merge pull request #1862 from NewPaulWalker/fix-hvip
Browse files Browse the repository at this point in the history
Fix WMASK of LCOFI bit(bit 13) in hvip
  • Loading branch information
aswaterman authored Nov 27, 2024
2 parents eb0a3e2 + 275c668 commit 7812eab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion riscv/csrs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,8 @@ reg_t hvip_csr_t::read() const noexcept {

bool hvip_csr_t::unlogged_write(const reg_t val) noexcept {
state->mip->write_with_mask(MIP_VSSIP, val); // hvip.VSSIP is an alias of mip.VSSIP
return basic_csr_t::unlogged_write(val & (MIP_VSEIP | MIP_VSTIP));
const reg_t lscof_int = proc->extension_enabled(EXT_SSCOFPMF) ? MIP_LCOFIP : 0;
return basic_csr_t::unlogged_write(val & (lscof_int | MIP_VSEIP | MIP_VSTIP));
}

ssp_csr_t::ssp_csr_t(processor_t* const proc, const reg_t addr, const reg_t mask, const reg_t init):
Expand Down

0 comments on commit 7812eab

Please sign in to comment.