From owner-freebsd-hackers Wed Apr 24 17: 8:59 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mailhub.yumyumyum.org (dsl092-171-091.wdc1.dsl.speakeasy.net [66.92.171.91]) by hub.freebsd.org (Postfix) with SMTP id 2862937B404 for ; Wed, 24 Apr 2002 17:08:53 -0700 (PDT) Received: (qmail 39930 invoked from network); 25 Apr 2002 00:06:09 -0000 Received: from dsl092-171-091.wdc1.dsl.speakeasy.net (66.92.171.91) by dsl092-171-091.wdc1.dsl.speakeasy.net with SMTP; 25 Apr 2002 00:06:09 -0000 Date: Wed, 24 Apr 2002 20:06:09 -0400 (EDT) From: Kenneth Culver To: Peter Wemm Cc: Andrew Gallatin , Brandon S Allbery KF8NH , , FreeBSD-CURRENT List Subject: Re: implementing linux mmap2 syscall In-Reply-To: <20020424235122.263FB38FD@overcee.wemm.org> Message-ID: <20020424195920.D39879-100000@alpha.yumyumyum.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Here's where it happens: > sys/i386/linux/linux_sysvec.c > > static void > linux_prepsyscall(struct trapframe *tf, int *args, u_int *code, caddr_t *params) > { > args[0] = tf->tf_ebx; > args[1] = tf->tf_ecx; > args[2] = tf->tf_edx; > args[3] = tf->tf_esi; > args[4] = tf->tf_edi; > *params = NULL; /* no copyin */ > } > > You probably want to add: > args[5] = tf->tf_ebp; > so that it ends up in the syscallargs struct. Yeah, I did that... it still doesn't work, tf_ebp isn't getting set... So I'm thinking that either I have a glibc that's too old, or something else is wrong... > > For FreeBSD syscalls, we copy this from the top of stack for the number of > 32 bit words specified in the syscall table in i386/trap.c: > if (params && (i = narg * sizeof(int)) && > (error = copyin(params, (caddr_t)args, (u_int)i))) { > (narg comes from the syscall table). > OK, that gives me an idea... Ken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message