From owner-freebsd-ppc Thu Jul 18 23:53:16 2002 Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06A7637B401 for ; Thu, 18 Jul 2002 23:53:13 -0700 (PDT) Received: from gt3.OntheNet.com.au (nt.com.au [203.13.70.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C0AE43E58 for ; Thu, 18 Jul 2002 23:53:09 -0700 (PDT) (envelope-from peterg@ptree32.com.au) Received: from ptree32.com.au (CPE-203-45-246-228.qld.bigpond.net.au [203.45.246.228]) by gt3.OntheNet.com.au (8.11.4/8.11.4) with ESMTP id g6J6t4b77622 for ; Fri, 19 Jul 2002 16:55:05 +1000 (EST) Message-ID: <3D37BB53.D5486D0B@ptree32.com.au> Date: Fri, 19 Jul 2002 17:10:11 +1000 From: Peter Grehan Organization: Ptree32 Pty Ltd X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.2.14-12 i686) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-ppc@FreeBSD.ORG Subject: Re: success level with peter g's patch.. References: <1027050508.3d378c0c98e84@www.wantpackets.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ppc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi Andy, Good to see you get this far. I've just tracked down a problem with the setting up of argc/argv - the values in setreg() were being overwritten by syscall(), so I worked around that in setreg(). The correct solution I believe is for execve() to return EJUSTRETURN, as NetBSD does. Patch at end. > init died (signal 6, exit 0) > panic: Going nowhere without my init! First, try the patch, and then, start working towards where things go wrong by enabling trap tracing and setting a breakpoint in panic(). Init is quite a small program, so you can even set breakpoints in syscall() and follow the program flow. later, Peter. powerpc/powerpc/machdep.c *************** *** 875,882 **** --- 875,893 ---- * XXX We have to set both regs and retval here due to different * XXX calling convention in trap.c and init_main.c. */ + + /* + * XXX PG: these get overwritten in the syscall return code. + * execve() should return EJUSTRETURN, like it does on NetBSD. + * Emulate by setting the syscall return value cells + */ + #if 0 tf->fixreg[3] = arginfo.ps_nargvstr; tf->fixreg[4] = (register_t)arginfo.ps_argvstr; + #else + td->td_retval[0] = arginfo.ps_nargvstr; + td->td_retval[1] = (register_t)arginfo.ps_argvstr; + #endif tf->fixreg[5] = (register_t)arginfo.ps_envstr; tf->fixreg[6] = 0; /* auxillary vector */ tf->fixreg[7] = 0; /* termination vector */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ppc" in the body of the message