aboutsummaryrefslogtreecommitdiff
path: root/pk/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'pk/init.c')
-rw-r--r--pk/init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pk/init.c b/pk/init.c
index d4087b0..739a285 100644
--- a/pk/init.c
+++ b/pk/init.c
@@ -1,6 +1,5 @@
// See LICENSE for license details.
-#include "pcr.h"
#include "pk.h"
#include "file.h"
#include "vm.h"
@@ -16,7 +15,7 @@ void init_tf(trapframe_t* tf, long pc, long sp, int user64)
memset(tf,0,sizeof(*tf));
if(sizeof(void*) != 8)
kassert(!user64);
- tf->sr = (mfpcr(PCR_SR) & (SR_IM | SR_S64 | SR_VM)) | SR_S | SR_PEI;
+ tf->sr = (read_csr(status) & (SR_IM | SR_S64 | SR_VM)) | SR_S | SR_PEI;
if(user64)
tf->sr |= SR_U64;
tf->gpr[14] = sp;