Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jul 2002 17:10:11 +1000
From:      Peter Grehan <peterg@ptree32.com.au>
To:        freebsd-ppc@FreeBSD.ORG
Subject:   Re: success level with peter g's patch..
Message-ID:  <3D37BB53.D5486D0B@ptree32.com.au>
References:  <1027050508.3d378c0c98e84@www.wantpackets.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D37BB53.D5486D0B>