summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
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/mvme88k
parent56ac265c9d1e336c7c4bcbb309900bab59476593 (diff)
Correctly set the stack pointer of a secondary processor to the end
of its initialization stack. Oops.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/mvme88k/locore.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/mvme88k/mvme88k/locore.S b/sys/arch/mvme88k/mvme88k/locore.S
index 180da932eee..0843e814c59 100644
--- a/sys/arch/mvme88k/mvme88k/locore.S
+++ b/sys/arch/mvme88k/mvme88k/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.56 2007/12/02 21:33:23 miod Exp $ */
+/* $OpenBSD: locore.S,v 1.57 2007/12/04 23:43:54 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -317,8 +317,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 */