summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-03-22 10:53:16 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-03-22 10:53:16 +0000
commit34af340895da0cb69ddf3235e4c619bcfcf97172 (patch)
treed63394c3ce6c7edc78fce52ea13372ea031dee70
parent1ff255251b76450ff3399f028e627d78995e41ab (diff)
Switch to our initial stack after switching over to our own trap table. This
removes the need to lock the stack (and cpuinfo) into the TLB on sun4v.
-rw-r--r--sys/arch/sparc64/sparc64/locore.s24
1 files changed, 9 insertions, 15 deletions
diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s
index e2ccf2c33c8..91622f36cbd 100644
--- a/sys/arch/sparc64/sparc64/locore.s
+++ b/sys/arch/sparc64/sparc64/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.118 2008/03/20 22:22:47 kettenis Exp $ */
+/* $OpenBSD: locore.s,v 1.119 2008/03/22 10:53:15 kettenis Exp $ */
/* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */
/*
@@ -3647,20 +3647,6 @@ dostart:
_C_LABEL(cpu_initialize):
wrpr %g0, 0, %tl ! Make sure we're not in NUCLEUS mode
-
- /*
- * Step 6: map cpu_info struct and interrupt stack and
- * switch to our initial stack.
- */
-
-!!! Make sure our stack's OK.
- flushw
- GET_CPUINFO_VA(%l0)
- ldx [%l0 + CI_INITSTACK], %l0
- add %l0, - CC64FSZ - 80, %l0 ! via syscall(boot_me_up) or somesuch
- andn %l0, 0x0f, %l0 ! Needs to be 16-byte aligned
- sub %l0, BIAS, %l0 ! and biased
- mov %l0, %sp
flushw
/*
@@ -3702,6 +3688,14 @@ _C_LABEL(cpu_initialize):
wrpr %g0, WSTATE_KERN, %wstate
/*
+ * Switch to our initial stack.
+ */
+
+ GET_CPUINFO_VA(%l0)
+ ldx [%l0 + CI_INITSTACK], %l0
+ add %l0, -BIAS-CC64FSZ, %sp
+
+ /*
* Call our startup routine.
*/