aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2015-09-14 15:55:09 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2015-09-14 15:55:09 -0700
commit09565f73533039dde9a5acf95d3c0d2fe7a0b442 (patch)
treef5bc79a7eac096d17f2e1c7e4ff431778d3901fd
parent6fb355c58c23e932309829b6d57f17e91d93b018 (diff)
downloadpk-09565f73533039dde9a5acf95d3c0d2fe7a0b442.zip
pk-09565f73533039dde9a5acf95d3c0d2fe7a0b442.tar.gz
pk-09565f73533039dde9a5acf95d3c0d2fe7a0b442.tar.bz2
Initialize mtimecmp for debuggability
-rw-r--r--pk/minit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pk/minit.c b/pk/minit.c
index b8a0b48..3d4410b 100644
--- a/pk/minit.c
+++ b/pk/minit.c
@@ -24,6 +24,7 @@ static void mstatus_init()
if (EXTRACT_FIELD(ms, MSTATUS_VM) != VM_CHOICE)
have_vm = 0;
+ write_csr(mtimecmp, 0);
clear_csr(mip, MIP_MSIP);
set_csr(mie, MIP_MSIP);
}