Module Name: src Committed By: palle Date: Sat Jan 7 20:19:09 UTC 2017
Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: sun4v: slowtrap() now selects normal globals properly on both sun4u and sun4v platforms. Verified using qemu for both sun4u and sun4v systems To generate a diff of this commit: cvs rdiff -u -r1.404 -r1.405 src/sys/arch/sparc64/sparc64/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.404 src/sys/arch/sparc64/sparc64/locore.s:1.405 --- src/sys/arch/sparc64/sparc64/locore.s:1.404 Thu Jan 5 20:37:06 2017 +++ src/sys/arch/sparc64/sparc64/locore.s Sat Jan 7 20:19:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.404 2017/01/05 20:37:06 palle Exp $ */ +/* $NetBSD: locore.s,v 1.405 2017/01/07 20:19:09 palle Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -3151,7 +3151,20 @@ Lslowtrap_reenter: mov %g2, %o2 ! (pc) sth %o1, [%sp + CC64FSZ + STKB + TF_TT]! debug - wrpr %g0, PSTATE_KERN, %pstate ! Get back to normal globals + ! Get back to normal globals +#ifdef SUN4V + sethi %hi(cputyp), %g5 + ld [%g5 + %lo(cputyp)], %g5 + cmp %g5, CPU_SUN4V + bne,pt %icc, 1f + nop + NORMAL_GLOBALS_SUN4V + ba 2f + nop +1: +#endif + NORMAL_GLOBALS_SUN4U +2: stx %g1, [%sp + CC64FSZ + STKB + TF_G + (1*8)] stx %g2, [%sp + CC64FSZ + STKB + TF_G + (2*8)] add %sp, CC64FSZ + STKB, %o0 ! (&tf)