From owner-p4-projects@FreeBSD.ORG Fri Apr 4 22:22:18 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4EA8137B404; Fri, 4 Apr 2003 22:22:18 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE09A37B401 for ; Fri, 4 Apr 2003 22:22:17 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6671443F93 for ; Fri, 4 Apr 2003 22:22:17 -0800 (PST) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h356MH0U020013 for ; Fri, 4 Apr 2003 22:22:17 -0800 (PST) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h356MGNk020010 for perforce@freebsd.org; Fri, 4 Apr 2003 22:22:16 -0800 (PST) Date: Fri, 4 Apr 2003 22:22:16 -0800 (PST) Message-Id: <200304050622.h356MGNk020010@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 28181 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2003 06:22:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=28181 Change 28181 by peter@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 .... " */ invltlb();