From 3d9330919b8cb451cb5dccf689fe171fe298749a Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 11 Sep 2015 15:13:26 -0700 Subject: [PATCH] Initialize mstatus.prv1/prv2 to U, not S This doesn't really matter, but it matches Rocket. --- riscv/processor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/riscv/processor.cc b/riscv/processor.cc index e14859e..962e9cd 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -107,8 +107,8 @@ void state_t::reset() { memset(this, 0, sizeof(*this)); mstatus = set_field(mstatus, MSTATUS_PRV, PRV_M); - mstatus = set_field(mstatus, MSTATUS_PRV1, PRV_S); - mstatus = set_field(mstatus, MSTATUS_PRV2, PRV_S); + mstatus = set_field(mstatus, MSTATUS_PRV1, PRV_U); + mstatus = set_field(mstatus, MSTATUS_PRV2, PRV_U); pc = DEFAULT_MTVEC + 0x100; load_reservation = -1; } -- 2.30.2