summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/sparc64/sparc64/machdep.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index ab9d74e..84eea0b 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -330,12 +330,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec)
tick_init(clock);
/*
- * Initialize global registers.
- */
- pc = (struct pcpu *)(pcpu0 + (PCPU_PAGES * PAGE_SIZE)) - 1;
- cpu_setregs(pc);
-
- /*
* Initialize the console before printing anything.
*/
cninit();
@@ -415,6 +409,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec)
* stack, so don't pass the real size (PAGE_SIZE) to pcpu_init or
* it'll zero it out from under us.
*/
+ pc = (struct pcpu *)(pcpu0 + (PCPU_PAGES * PAGE_SIZE)) - 1;
pcpu_init(pc, 0, sizeof(struct pcpu));
pc->pc_curthread = &thread0;
pc->pc_curpcb = thread0.td_pcb;
@@ -426,6 +421,11 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec)
pc->pc_tlb_ctx_max = TLB_CTX_USER_MAX;
/*
+ * Initialize global registers.
+ */
+ cpu_setregs(pc);
+
+ /*
* Initialize the message buffer (after setting trap table).
*/
msgbufinit(msgbufp, MSGBUF_SIZE);
OpenPOWER on IntegriCloud