Deleted Added
full compact
vm_machdep.c (112569) vm_machdep.c (112841)
1/*-
2 * Copyright (c) 1982, 1986 The Regents of the University of California.
3 * Copyright (c) 1989, 1990 William Jolitz
4 * Copyright (c) 1994 John Dyson
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * the Systems Programming Group of the University of Utah Computer

--- 24 unchanged lines hidden (view full) ---

33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
40 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
1/*-
2 * Copyright (c) 1982, 1986 The Regents of the University of California.
3 * Copyright (c) 1989, 1990 William Jolitz
4 * Copyright (c) 1994 John Dyson
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * the Systems Programming Group of the University of Utah Computer

--- 24 unchanged lines hidden (view full) ---

33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
40 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
41 * $FreeBSD: head/sys/i386/i386/vm_machdep.c 112569 2003-03-25 00:07:06Z jake $
41 * $FreeBSD: head/sys/i386/i386/vm_machdep.c 112841 2003-03-30 05:24:52Z jake $
42 */
43
44#include "opt_npx.h"
45#ifdef PC98
46#include "opt_pc98.h"
47#endif
48#include "opt_reset.h"
49#include "opt_isa.h"

--- 115 unchanged lines hidden (view full) ---

165 td2->td_frame->tf_eax = 0; /* Child returns zero */
166 td2->td_frame->tf_eflags &= ~PSL_C; /* success */
167 td2->td_frame->tf_edx = 1;
168
169 /*
170 * Set registers for trampoline to user mode. Leave space for the
171 * return address on stack. These are the kernel mode register values.
172 */
42 */
43
44#include "opt_npx.h"
45#ifdef PC98
46#include "opt_pc98.h"
47#endif
48#include "opt_reset.h"
49#include "opt_isa.h"

--- 115 unchanged lines hidden (view full) ---

165 td2->td_frame->tf_eax = 0; /* Child returns zero */
166 td2->td_frame->tf_eflags &= ~PSL_C; /* success */
167 td2->td_frame->tf_edx = 1;
168
169 /*
170 * Set registers for trampoline to user mode. Leave space for the
171 * return address on stack. These are the kernel mode register values.
172 */
173#ifdef PAE
174 pcb2->pcb_cr3 = vtophys(vmspace_pmap(p2->p_vmspace)->pm_pdpt);
175#else
173 pcb2->pcb_cr3 = vtophys(vmspace_pmap(p2->p_vmspace)->pm_pdir);
176 pcb2->pcb_cr3 = vtophys(vmspace_pmap(p2->p_vmspace)->pm_pdir);
177#endif
174 pcb2->pcb_edi = 0;
175 pcb2->pcb_esi = (int)fork_return; /* fork_trampoline argument */
176 pcb2->pcb_ebp = 0;
177 pcb2->pcb_esp = (int)td2->td_frame - sizeof(void *);
178 pcb2->pcb_ebx = (int)td2; /* fork_trampoline argument */
179 pcb2->pcb_eip = (int)fork_trampoline;
180 pcb2->pcb_psl = td2->td_frame->tf_eflags & ~PSL_I; /* ints disabled */
181 /*-

--- 155 unchanged lines hidden (view full) ---

337 * upcall as only then do we know which KSE we got.
338 */
339 td->td_frame = (struct trapframe *)((caddr_t)pcb2 - 16) - 1;
340
341 /*
342 * Set registers for trampoline to user mode. Leave space for the
343 * return address on stack. These are the kernel mode register values.
344 */
178 pcb2->pcb_edi = 0;
179 pcb2->pcb_esi = (int)fork_return; /* fork_trampoline argument */
180 pcb2->pcb_ebp = 0;
181 pcb2->pcb_esp = (int)td2->td_frame - sizeof(void *);
182 pcb2->pcb_ebx = (int)td2; /* fork_trampoline argument */
183 pcb2->pcb_eip = (int)fork_trampoline;
184 pcb2->pcb_psl = td2->td_frame->tf_eflags & ~PSL_I; /* ints disabled */
185 /*-

--- 155 unchanged lines hidden (view full) ---

341 * upcall as only then do we know which KSE we got.
342 */
343 td->td_frame = (struct trapframe *)((caddr_t)pcb2 - 16) - 1;
344
345 /*
346 * Set registers for trampoline to user mode. Leave space for the
347 * return address on stack. These are the kernel mode register values.
348 */
349#ifdef PAE
350 pcb2->pcb_cr3 = vtophys(vmspace_pmap(td->td_proc->p_vmspace)->pm_pdpt);
351#else
345 pcb2->pcb_cr3 = vtophys(vmspace_pmap(td->td_proc->p_vmspace)->pm_pdir);
352 pcb2->pcb_cr3 = vtophys(vmspace_pmap(td->td_proc->p_vmspace)->pm_pdir);
353#endif
346 pcb2->pcb_edi = 0;
347 pcb2->pcb_esi = (int)fork_return; /* trampoline arg */
348 pcb2->pcb_ebp = 0;
349 pcb2->pcb_esp = (int)td->td_frame - sizeof(void *); /* trampoline arg */
350 pcb2->pcb_ebx = (int)td; /* trampoline arg */
351 pcb2->pcb_eip = (int)fork_trampoline;
352 pcb2->pcb_psl &= ~(PSL_I); /* interrupts must be disabled */
353 /*

--- 206 unchanged lines hidden ---
354 pcb2->pcb_edi = 0;
355 pcb2->pcb_esi = (int)fork_return; /* trampoline arg */
356 pcb2->pcb_ebp = 0;
357 pcb2->pcb_esp = (int)td->td_frame - sizeof(void *); /* trampoline arg */
358 pcb2->pcb_ebx = (int)td; /* trampoline arg */
359 pcb2->pcb_eip = (int)fork_trampoline;
360 pcb2->pcb_psl &= ~(PSL_I); /* interrupts must be disabled */
361 /*

--- 206 unchanged lines hidden ---