aboutsummaryrefslogtreecommitdiff
path: root/pk/riscv-pk.c
diff options
context:
space:
mode:
Diffstat (limited to 'pk/riscv-pk.c')
-rw-r--r--pk/riscv-pk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pk/riscv-pk.c b/pk/riscv-pk.c
index 2c955e4..efe4239 100644
--- a/pk/riscv-pk.c
+++ b/pk/riscv-pk.c
@@ -9,6 +9,9 @@ void __attribute__((section(".boottext"))) __start()
register void* tt = &trap_table;
mtpcr(tt,PCR_TBR);
+ mtpcr(0,PCR_COUNT);
+ mtpcr(0,PCR_COMPARE);
+
register long sr0 = SR_S | SR_PS | SR_ET | SR_IM;
#ifdef PK_ENABLE_KERNEL_64BIT
sr0 |= SR_SX;