From owner-freebsd-ia64 Thu Feb 22 7:10:48 2001 Delivered-To: freebsd-ia64@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 5A00B37B4EC for ; Thu, 22 Feb 2001 07:10:34 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f1MF8Nl91237 for ; Thu, 22 Feb 2001 07:08:23 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Thu, 22 Feb 2001 07:10:20 -0800 (PST) From: John Baldwin To: ia64@FreeBSD.org Subject: TODO: update teh fork return code.. Sender: owner-freebsd-ia64@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hey gang, One thing that ia64 needs to happen to catch up with the other arch's is to update the fork return trampoline to call the fork_exit() function passing in the pointer to the callout function and callout argument. This would involve changes to switch_trampoline() in swtch.s similar to the changes to switch_trampoline() in sys/alpha/alpha/swtch.s and fork_trampoline() in sys/i386/i386/exception.s (or maybe swtch.s) as well as the following diff: Hmm, actually, I may need to fix userret() some to take a pointer to a trapframe, but I'll do that in a second. The big change I need help with is the swtch.s change.. Index: trap.c =================================================================== RCS file: /usr/cvs/src/sys/ia64/ia64/trap.c,v retrieving revision 1.14 diff -u -r1.14 trap.c --- trap.c 2001/02/22 13:29:22 1.14 +++ trap.c 2001/02/22 14:41:26 @@ -628,31 +628,6 @@ } /* - * Process the tail end of a fork() for the child. - */ -void -child_return(p) - struct proc *p; -{ - - /* - * Return values in the frame set by cpu_fork(). - */ - - userret(p, p->p_md.md_tf, 0); -#ifdef KTRACE - if (KTRPOINT(p, KTR_SYSRET)) { - if (!mtx_owned(&Giant)) - mtx_lock(&Giant); - ktrsysret(p->p_tracep, SYS_fork, 0, 0); - } -#endif - - if (mtx_owned(&Giant)) - mtx_unlock(&Giant); -} - -/* * Process an asynchronous software trap. * This is relatively easy. */ Index: vm_machdep.c =================================================================== RCS file: /usr/cvs/src/sys/ia64/ia64/vm_machdep.c,v retrieving revision 1.11 diff -u -r1.11 vm_machdep.c --- vm_machdep.c 2001/02/09 06:09:35 1.11 +++ vm_machdep.c 2001/02/09 08:50:05 @@ -261,7 +261,7 @@ * right value for gp. */ up->u_pcb.pcb_sp = (u_int64_t)p2tf - 16; - up->u_pcb.pcb_r4 = FDESC_FUNC(child_return); + up->u_pcb.pcb_r4 = FDESC_FUNC(fork_return); up->u_pcb.pcb_r5 = FDESC_FUNC(exception_restore); up->u_pcb.pcb_r6 = (u_int64_t)p2; up->u_pcb.pcb_b0 = FDESC_FUNC(switch_trampoline); -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message