From 276c20be4c55119e8689a40e157a3a31d2be7673 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 19 Apr 2013 22:57:37 -0700 Subject: implement new register mapping --- pk/entry.S | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'pk/entry.S') diff --git a/pk/entry.S b/pk/entry.S index c947a24..6441d9f 100644 --- a/pk/entry.S +++ b/pk/entry.S @@ -76,13 +76,14 @@ save_tf: # write the trap frame onto the stack .globl pop_tf pop_tf: # write the trap frame onto the stack # restore gprs - LOAD t0,32*REGBYTES(a0) # restore sr (should disable interrupts) - mtpcr t0,ASM_CR(PCR_SR) + LOAD a1,32*REGBYTES(a0) + LOAD a2,1*REGBYTES(a0) + LOAD a3,2*REGBYTES(a0) + + mtpcr a1,ASM_CR(PCR_SR) # restore sr (disable interrupts) + mtpcr a2,ASM_CR(PCR_K0) + mtpcr a3,ASM_CR(PCR_K1) - LOAD x1,1*REGBYTES(a0) - mtpcr x1,ASM_CR(PCR_K0) - LOAD x1,2*REGBYTES(a0) - mtpcr x1,ASM_CR(PCR_K1) move x1,a0 LOAD x3,3*REGBYTES(x1) LOAD x4,4*REGBYTES(x1) -- cgit v1.1