diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-04 23:43:55 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-04 23:43:55 +0000 |
commit | 97b81c68c28653024a095a3def9a49b7f3038fd2 (patch) | |
tree | 4d22eb782dca6daa2768b6236ac9677c1f650364 /sys/arch | |
parent | 56ac265c9d1e336c7c4bcbb309900bab59476593 (diff) |
Correctly set the stack pointer of a secondary processor to the end
of its initialization stack. Oops.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/aviion/aviion/locore.S | 8 | ||||
-rw-r--r-- | sys/arch/luna88k/luna88k/locore.S | 8 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/locore.S | 8 |
3 files changed, 18 insertions, 6 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 */ diff --git a/sys/arch/luna88k/luna88k/locore.S b/sys/arch/luna88k/luna88k/locore.S index cb897ea54c2..d89b91cb50c 100644 --- a/sys/arch/luna88k/luna88k/locore.S +++ b/sys/arch/luna88k/luna88k/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.17 2007/12/02 21:28:38 miod Exp $ */ +/* $OpenBSD: locore.S,v 1.18 2007/12/04 23:43:54 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -281,8 +281,12 @@ ASLOCAL(secondary_init) or.u r31, r0, hi16(_ASM_LABEL(slavestack_end)) bsr.n _C_LABEL(secondary_pre_main) /* set cpu number */ or r31, r31, lo16(_ASM_LABEL(slavestack_end)) + + 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 */ #else 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 */ |