Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 sun4v: slowtrap() now selects norma...



details:   https://anonhg.NetBSD.org/src/rev/2bde5cfc0dbd
branches:  trunk
changeset: 820356:2bde5cfc0dbd
user:      palle <palle%NetBSD.org@localhost>
date:      Sat Jan 07 20:19:09 2017 +0000

description:
sun4v: slowtrap() now selects normal globals properly on both sun4u and sun4v platforms. Verified using qemu for both sun4u and sun4v systems

diffstat:

 sys/arch/sparc64/sparc64/locore.s |  17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r ed13dfe410eb -r 2bde5cfc0dbd sys/arch/sparc64/sparc64/locore.s
--- a/sys/arch/sparc64/sparc64/locore.s Sat Jan 07 20:17:21 2017 +0000
+++ b/sys/arch/sparc64/sparc64/locore.s Sat Jan 07 20:19:09 2017 +0000
@@ -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 @@
        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)



Home | Main Index | Thread Index | Old Index