Skip to content

Commit

Permalink
fix(hvip): Fix WMASK of LCOFI bit(bit 13) in hvip (#74)
Browse files Browse the repository at this point in the history
For implementations that support Smcdeleg/Ssccfg, Sscofpmf, Smaia/Ssaia,
and the H extension, the LCOFI bit (bit 13) in each of hvip and hvien is
implemented and writable. It means only when all of these extensions
implemented, the LCOFI bit (bit 13) in each of hvip and hvien is
writablt.
  • Loading branch information
NewPaulWalker authored Jan 3, 2025
1 parent 40ebdec commit 67ad0cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions riscv/csrs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1971,8 +1971,7 @@ 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
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));
return basic_csr_t::unlogged_write(val & (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 67ad0cc

Please sign in to comment.