Skip to content

Commit 82b7653

Browse files
committed
adds MISA modification based on privilege wrapper
1 parent 1c8e1be commit 82b7653

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/iss/arch/riscv_hart_msu_vp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ template <typename BASE, features_e FEAT, typename LOGCAT>
188188
riscv_hart_msu_vp<BASE, FEAT, LOGCAT>::riscv_hart_msu_vp()
189189
: mmu(base::get_priv_if())
190190
, default_mem(base::get_priv_if()) {
191+
this->csr[misa] = traits<BASE>::MISA_VAL | (1 << ('U' - 'A')) | (1 << ('S' - 'A'));
191192
// common regs
192193
const std::array<unsigned, 16> rwaddrs{
193194
{mepc, mtvec, mscratch, mcause, mtval, sepc, stvec, sscratch, scause, stval, sscratch, uepc, utvec, uscratch, ucause, utval}};

src/iss/arch/riscv_hart_mu_p.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ template <typename BASE, features_e FEAT, typename LOGCAT>
183183
riscv_hart_mu_p<BASE, FEAT, LOGCAT>::riscv_hart_mu_p()
184184
: state()
185185
, default_mem(base::get_priv_if()) {
186+
this->csr[misa] = traits<BASE>::MISA_VAL | (1 << ('U' - 'A'));
186187
const std::array<unsigned, 8> rwaddrs{{
187188
mepc,
188189
mtvec,

src/iss/debugger/riscv_target_adapter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ template <typename ARCH> status riscv_target_adapter<ARCH>::target_xml_query(std
378378
{"uint64", "longs", 64, 'l'},
379379
{"uint32", "words", 32, 'w'},
380380
{"uint16", "shorts", 16, 's'},
381-
// { "ieee_half", 16, 'h', 'f' },
381+
//{"ieee_half", "half", 16, 'h'},
382382
{"uint8", "bytes", 8, 'b'},
383383
}};
384384

0 commit comments

Comments
 (0)