diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/riscv/virtual_memory.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/arch/riscv/virtual_memory.c b/src/arch/riscv/virtual_memory.c index 98b7edca4e..fab7d90d70 100644 --- a/src/arch/riscv/virtual_memory.c +++ b/src/arch/riscv/virtual_memory.c @@ -218,4 +218,8 @@ void mstatus_init(void) | (1 << CAUSE_FAULT_STORE) | (1 << CAUSE_USER_ECALL) ); + + /* Enable all user/supervisor-mode counters */ + write_csr(mscounteren, 0b111); + write_csr(mucounteren, 0b111); } |