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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pk/riscv-pk.c b/pk/riscv-pk.c
index 490a271..0af487d 100644
--- a/pk/riscv-pk.c
+++ b/pk/riscv-pk.c
@@ -21,6 +21,10 @@ void __attribute__((section(".boottext"))) __start()
have_fp = mfpcr(PCR_SR) & SR_EF;
mtpcr(sr0, PCR_SR);
+ mtpcr(sr0 | SR_EV, PCR_SR);
+ have_vector = mfpcr(PCR_SR) & SR_EV;
+ mtpcr(sr0, PCR_SR);
+
extern void boot();
register void (*boot_p)() = &boot;
asm("" : "=r"(boot_p) : "0"(boot_p));