Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/ibm4xx Like intrleave_to_user:, intrleave_t...



details:   https://anonhg.NetBSD.org/src/rev/301935c0c833
branches:  trunk
changeset: 772046:301935c0c833
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Thu Dec 15 11:13:25 2011 +0000

description:
Like intrleave_to_user:, intrleave_to_kernel: should also restore PID.
Moreover, disable transration.

diffstat:

 sys/arch/powerpc/ibm4xx/trap_subr.S |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (33 lines):

diff -r 0a744e759740 -r 301935c0c833 sys/arch/powerpc/ibm4xx/trap_subr.S
--- a/sys/arch/powerpc/ibm4xx/trap_subr.S       Thu Dec 15 11:01:45 2011 +0000
+++ b/sys/arch/powerpc/ibm4xx/trap_subr.S       Thu Dec 15 11:13:25 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap_subr.S,v 1.20 2011/12/15 11:01:45 kiyohara Exp $  */
+/*     $NetBSD: trap_subr.S,v 1.21 2011/12/15 11:13:25 kiyohara Exp $  */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -358,10 +358,23 @@
 
 intrleave_to_kernel:
        FRAME_RESTORE           /* old SP is now in sprg1 */
+
+       mtsprg2 %r30
+       mtsprg3 %r31
+       mfmsr   %r30
+       li      %r31,(PSL_DR|PSL_IR)@l
+       andc    %r30,%r30,%r31
+       lwz     %r31,FRAME_PID(%r1)
+       TRAP_IF_ZERO(%r31)
        /*
         * Now that we are done with the trapframe, we can load the original SP
         */
        mfsprg1 %r1
+       mtmsr   %r30    /* disable translation */
+       isync
+       mtpid   %r31
+       mfsprg3 %r31
+       mfsprg2 %r30
        rfi
        ba      .               /* Protect against prefetch */
 



Home | Main Index | Thread Index | Old Index