diff options
Diffstat (limited to 'machine')
-rw-r--r-- | machine/minit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/machine/minit.c b/machine/minit.c index bb1ee6e..5ad6d92 100644 --- a/machine/minit.c +++ b/machine/minit.c @@ -30,7 +30,8 @@ static void mstatus_init() // Enable user/supervisor use of perf counters if (supports_extension('S')) write_csr(scounteren, -1); - write_csr(mcounteren, -1); + if (supports_extension('U')) + write_csr(mcounteren, -1); // Enable software interrupts write_csr(mie, MIP_MSIP); |