summaryrefslogtreecommitdiff
path: root/sys/arch/aviion
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-12-04 23:43:55 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-12-04 23:43:55 +0000
commit97b81c68c28653024a095a3def9a49b7f3038fd2 (patch)
tree4d22eb782dca6daa2768b6236ac9677c1f650364 /sys/arch/aviion
parent56ac265c9d1e336c7c4bcbb309900bab59476593 (diff)
Correctly set the stack pointer of a secondary processor to the end
of its initialization stack. Oops.
Diffstat (limited to 'sys/arch/aviion')
-rw-r--r--sys/arch/aviion/aviion/locore.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/aviion/aviion/locore.S b/sys/arch/aviion/aviion/locore.S
index ef61d321cc9..5e5a15ed0bb 100644
--- a/sys/arch/aviion/aviion/locore.S
+++ b/sys/arch/aviion/aviion/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.7 2007/12/02 21:28:35 miod Exp $ */
+/* $OpenBSD: locore.S,v 1.8 2007/12/04 23:43:52 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -337,8 +337,12 @@ GLOBAL(secondary_start)
*/
bsr _C_LABEL(secondary_pre_main) /* set cpu number */
+
+ ldcr r1, CPU
+ st r2, r1, CI_CURPCB /* save stack as curpcb for traps */
+
bsr.n _C_LABEL(secondary_main)
- or r31, r2, r0 /* switch to startup stack */
+ addu r31, r2, USPACE /* switch to startup stack */
#endif /* MULTIPROCESSOR */