fixes m/uintstatus read
This commit is contained in:
parent
febbc4fff0
commit
7efa924510
|
@ -967,7 +967,7 @@ template <typename BASE, features_e FEAT> iss::status riscv_hart_m_p<BASE, FEAT>
|
||||||
|
|
||||||
template<typename BASE, features_e FEAT>
|
template<typename BASE, features_e FEAT>
|
||||||
iss::status riscv_hart_m_p<BASE, FEAT>::read_intstatus(unsigned addr, reg_t& val) {
|
iss::status riscv_hart_m_p<BASE, FEAT>::read_intstatus(unsigned addr, reg_t& val) {
|
||||||
val = (clic_mprev_lvl&0xff) <<24;
|
val = (clic_mact_lvl&0xff) <<24;
|
||||||
return iss::Ok;
|
return iss::Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1161,9 +1161,9 @@ template <typename BASE, features_e FEAT> iss::status riscv_hart_mu_p<BASE, FEAT
|
||||||
template<typename BASE, features_e FEAT>
|
template<typename BASE, features_e FEAT>
|
||||||
iss::status riscv_hart_mu_p<BASE, FEAT>::read_intstatus(unsigned addr, reg_t& val) {
|
iss::status riscv_hart_mu_p<BASE, FEAT>::read_intstatus(unsigned addr, reg_t& val) {
|
||||||
auto mode = (addr >> 8) & 0x3;
|
auto mode = (addr >> 8) & 0x3;
|
||||||
val = clic_uprev_lvl&0xff;
|
val = clic_uact_lvl&0xff;
|
||||||
if(mode==0x3)
|
if(mode==0x3)
|
||||||
val += (clic_mprev_lvl&0xff) <<24;
|
val += (clic_mact_lvl&0xff) <<24;
|
||||||
return iss::Ok;
|
return iss::Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue