Index: sys/arch/sparc64/sparc64/locore.s =================================================================== RCS file: /cvsroot/src/sys/arch/sparc64/sparc64/locore.s,v retrieving revision 1.377 diff -u -r1.377 locore.s --- sys/arch/sparc64/sparc64/locore.s 26 Oct 2014 21:03:45 -0000 1.377 +++ sys/arch/sparc64/sparc64/locore.s 22 Feb 2015 16:02:11 -0000 @@ -3678,12 +3678,29 @@ bne,pt %icc, 1f nop NORMAL_GLOBALS_SUN4V + ! Save the normal globals + stx %g1, [%sp + CC64FSZ + STKB + TF_G + ( 1*8)] + stx %g2, [%sp + CC64FSZ + STKB + TF_G + ( 2*8)] + stx %g3, [%sp + CC64FSZ + STKB + TF_G + ( 3*8)] + stx %g4, [%sp + CC64FSZ + STKB + TF_G + ( 4*8)] + stx %g5, [%sp + CC64FSZ + STKB + TF_G + ( 5*8)] + stx %g6, [%sp + CC64FSZ + STKB + TF_G + ( 6*8)] + stx %g7, [%sp + CC64FSZ + STKB + TF_G + ( 7*8)] + ALTERNATE_GLOBALS_SUN4V + /* + * In the EMBEDANY memory model %g4 points to the start of the + * data segment. In our case we need to clear it before calling + * any C-code. + */ + clr %g4 + + flushw ! Do not remove this insn -- causes interrupt loss + NORMAL_GLOBALS_SUN4V ba 2f nop 1: #endif NORMAL_GLOBALS_SUN4U -2: ! Save the normal globals stx %g1, [%sp + CC64FSZ + STKB + TF_G + ( 1*8)] stx %g2, [%sp + CC64FSZ + STKB + TF_G + ( 2*8)] @@ -3692,7 +3709,7 @@ stx %g5, [%sp + CC64FSZ + STKB + TF_G + ( 5*8)] stx %g6, [%sp + CC64FSZ + STKB + TF_G + ( 6*8)] stx %g7, [%sp + CC64FSZ + STKB + TF_G + ( 7*8)] - + ALTERNATE_GLOBALS_SUN4U /* * In the EMBEDANY memory model %g4 points to the start of the * data segment. In our case we need to clear it before calling @@ -3701,6 +3718,8 @@ clr %g4 flushw ! Do not remove this insn -- causes interrupt loss + NORMAL_GLOBALS_SUN4U +2: rd %y, %l6 INCR64(CPUINFO_VA+CI_NINTR) ! cnt.v_ints++ (clobbers %o0,%o1) rdpr %tt, %l5 ! Find out our current IPL