Module Name: src
Committed By: snj
Date: Mon Mar 9 07:54:13 UTC 2015
Modified Files:
src/sys/arch/sparc64/sparc64 [netbsd-7]: locore.s
Log Message:
Pull up following revision(s) (requested by nakayama in ticket #568):
sys/arch/sparc64/sparc64/locore.s: revision 1.379, 1.380
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.
--
PANICSTACK is a pointer itself, not a pointer to pointer.
To generate a diff of this commit:
cvs rdiff -u -r1.369.2.1 -r1.369.2.2 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.369.2.1 src/sys/arch/sparc64/sparc64/locore.s:1.369.2.2
--- src/sys/arch/sparc64/sparc64/locore.s:1.369.2.1 Thu Aug 14 06:50:37 2014
+++ src/sys/arch/sparc64/sparc64/locore.s Mon Mar 9 07:54:12 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.369.2.1 2014/08/14 06:50:37 martin Exp $ */
+/* $NetBSD: locore.s,v 1.369.2.2 2015/03/09 07:54:12 snj Exp $ */
/*
* Copyright (c) 2006-2010 Matthew R. Green
@@ -2126,9 +2126,7 @@ winfixspill:
wrpr %g0, 0, %otherwin
or %lo(2f), %o0, %o0
wrpr %g0, WSTATE_KERN, %wstate
- sethi %hi(PANICSTACK), %sp
- LDPTR [%sp + %lo(PANICSTACK)], %sp
- add %sp, -CC64FSZ-STKB, %sp
+ set PANICSTACK-CC64FSZ-STKB, %sp
ta 1; nop ! This helps out traptrace.
call _C_LABEL(panic) ! This needs to be fixed properly but we should panic here
mov %g1, %o1
@@ -2908,9 +2906,7 @@ slowtrap:
cmp %g7, WSTATE_KERN
bnz,pt %icc, 1f ! User stack -- we'll blow it away
nop
- sethi %hi(PANICSTACK), %sp
- LDPTR [%sp + %lo(PANICSTACK)], %sp
- add %sp, -CC64FSZ-STKB, %sp
+ set PANICSTACK-CC64FSZ-STKB, %sp
1:
#endif
rdpr %tt, %g4
@@ -3528,7 +3524,8 @@ ret_from_intr_vector:
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