PERFORCE change 28181 for review

Peter Wemm peter at FreeBSD.org
Fri Apr 4 22:22:19 PST 2003


http://perforce.freebsd.org/chv.cgi?CH=28181

Change 28181 by peter at peter_overcee on 2003/04/04 22:21:32

	make this compile.  Not finished by a long shot.

Affected files ...

.. //depot/projects/hammer/sys/x86_64/x86_64/vm_machdep.c#13 edit

Differences ...

==== //depot/projects/hammer/sys/x86_64/x86_64/vm_machdep.c#13 (text+ko) ====

@@ -41,7 +41,6 @@
  * $FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.204 2003/03/30 05:24:52 jake Exp $
  */
 
-#include "opt_reset.h"
 #include "opt_isa.h"
 #include "opt_kstack_pages.h"
 
@@ -127,9 +126,9 @@
 	td2->td_frame = (struct trapframe *)td2->td_pcb - 1;
 	bcopy(td1->td_frame, td2->td_frame, sizeof(struct trapframe));
 
-	td2->td_frame->tf_eax = 0;		/* Child returns zero */
-	td2->td_frame->tf_eflags &= ~PSL_C;	/* success */
-	td2->td_frame->tf_edx = 1;
+	td2->td_frame->tf_rax = 0;		/* Child returns zero */
+	td2->td_frame->tf_rflags &= ~PSL_C;	/* success */
+	td2->td_frame->tf_rdx = 1;
 
 	/*
 	 * Set registers for trampoline to user mode.  Leave space for the
@@ -143,10 +142,10 @@
 	pcb2->pcb_edi = 0;
 	pcb2->pcb_esi = (int)fork_return;	/* fork_trampoline argument */
 	pcb2->pcb_ebp = 0;
-	pcb2->pcb_esp = (int)td2->td_frame - sizeof(void *);
-	pcb2->pcb_ebx = (int)td2;		/* fork_trampoline argument */
-	pcb2->pcb_eip = (int)fork_trampoline;
-	pcb2->pcb_psl = td2->td_frame->tf_eflags & ~PSL_I; /* ints disabled */
+	pcb2->pcb_esp = (long)td2->td_frame - sizeof(void *);
+	pcb2->pcb_ebx = (long)td2;		/* fork_trampoline argument */
+	pcb2->pcb_eip = (long)fork_trampoline;
+	pcb2->pcb_psl = td2->td_frame->tf_rflags & ~PSL_I; /* ints disabled */
 	/*-
 	 * pcb2->pcb_savefpu:	cloned above.
 	 * pcb2->pcb_flags:	cloned above.
@@ -181,8 +180,8 @@
 	 * Note that the trap frame follows the args, so the function
 	 * is really called like this:  func(arg, frame);
 	 */
-	td->td_pcb->pcb_esi = (int) func;	/* function */
-	td->td_pcb->pcb_ebx = (int) arg;	/* first arg */
+	td->td_pcb->pcb_esi = (long) func;	/* function */
+	td->td_pcb->pcb_ebx = (long) arg;	/* first arg */
 }
 
 void
@@ -196,7 +195,6 @@
 void
 cpu_thread_exit(struct thread *td)
 {
-	struct pcb *pcb = td->td_pcb; 
 
 	npxexit(td);
 }
@@ -269,14 +267,12 @@
 	 * to do the reset here would then end up in no man's land.
 	 */
 
-#if !defined(BROKEN_KEYBOARD_RESET)
 	outb(IO_KBD + 4, 0xFE);
 	DELAY(500000);	/* wait 0.5 sec to see if that did it */
 	printf("Keyboard reset did not work, attempting CPU shutdown\n");
 	DELAY(1000000);	/* wait 1 sec for printf to complete */
-#endif
 	/* force a shutdown by unmapping entire address space ! */
-	bzero((caddr_t)PTD, NBPTD);
+	bzero((caddr_t)PML4, NBPML4T);
 
 	/* "good night, sweet prince .... <THUNK!>" */
 	invltlb();


More information about the p4-projects mailing list