Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jun 2004 07:35:48 GMT
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 54798 for review
Message-ID:  <200406130735.i5D7ZmP7055991@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54798

Change 54798 by jmallett@jmallett_oingo on 2004/06/13 07:35:25

	Always set up the stack to be below the PCB+TF in cpu_thread_setup()

Affected files ...

.. //depot/projects/mips/sys/mips/mips/vm_machdep.c#18 edit

Differences ...

==== //depot/projects/mips/sys/mips/mips/vm_machdep.c#18 (text+ko) ====

@@ -77,9 +77,6 @@
 	 */
 	bcopy(td->td_frame, td2->td_frame, sizeof *td2->td_frame);
 
-	/* And lastly, stack pointer, begin a trapframe below frame. */
-	td2->td_pcb->pcb_regs[8] = (register_t)_ALIGN(td2->td_frame - 1);
-
 	/*
 	 * Call fork_trampoline into fork_return via the pcb.
 	 */
@@ -122,6 +119,8 @@
 	    (struct pcb *)(td->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
 	td->td_frame = (struct trapframe *)td->td_pcb - 1;
 	td->td_pcb->pcb_regs[11] = MIPS_SR_KX | MIPS_SR_INT_IE;
+	/* Stack pointer. */
+	td->td_pcb->pcb_regs[8] = (register_t)_ALIGN(td->td_frame - 1);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406130735.i5D7ZmP7055991>