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 Use panic stack temporarily for cal...



details:   https://anonhg.NetBSD.org/src/rev/d6bda0cdf423
branches:  trunk
changeset: 336454:d6bda0cdf423
user:      nakayama <nakayama%NetBSD.org@localhost>
date:      Mon Mar 02 13:48:00 2015 +0000

description:
Use panic stack temporarily for calling prom_printf in a trap
handler.

It seems that openfirmware cannot handle over 4GB pointers, and
stack pointers may point to over 4GB since VA layout was rearranged
by rev 1.33 of vmparam.h.  Therefore, use panic stack to avoid
panicking in OF_write used by prom_printf.

diffstat:

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

diffs (19 lines):

diff -r 11aed10980d1 -r d6bda0cdf423 sys/arch/sparc64/sparc64/locore.s
--- a/sys/arch/sparc64/sparc64/locore.s Mon Mar 02 13:36:36 2015 +0000
+++ b/sys/arch/sparc64/sparc64/locore.s Mon Mar 02 13:48:00 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.378 2015/02/23 12:36:58 palle Exp $       */
+/*     $NetBSD: locore.s,v 1.379 2015/03/02 13:48:00 nakayama Exp $    */
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -3547,7 +3547,8 @@
         nop
 #endif
 #if 1
-       STACKFRAME(-CC64FSZ)            ! Get a clean register window
+       set     PANICSTACK-STKB, %g1    ! Use panic stack temporarily
+       save    %g1, -CC64FSZ, %sp      ! Get a clean register window
        LOAD_ASCIZ(%o0, "interrupt_vector: spurious vector %lx at pil %d\r\n")
        mov     %g7, %o1
        GLOBTOLOC



Home | Main Index | Thread Index | Old Index