[psas-software] PowerPC cross-compiled run_threads now gets up to Preflight Check under qemu-ppc

Ian Osgood iano at quirkster.com
Mon Oct 24 19:53:16 PDT 2005

Way to go, Josh!  I know how tricky this stuff is to debug. Have you  
submitted the patches back to the qemu project?


On Oct 24, 2005, at 11:31 AM, Josh Triplett wrote:

> Hello,
> After some extensive hacking on the qemu PowerPC target, "qemu-ppc
> run_threads" now successfully starts up, starts all of its threads,  
> and
> transitions from EvaluatePowerup to Initialize to Idle.  I can then  
> run
> rocketview and tell it to go to Preflight Check, which it does.
> This requires three patches to qemu:
> * The patch in http://bugs.debian.org/334458 fixes a missing byte-swap
> call in the sysctl handler.
> * The patch in http://bugs.debian.org/335159 fixes the handling of the
> clone() system call with the CLONE_VM flag; this fix allows threads  
> to work.
> * The large patch in http://bugs.debian.org/335509 adds support for
> signal handling to the
> PowerPC target, which involves setting up and tearing down PowerPC
> signal frames, and saving and restoring PowerPC CPU contexts in the
> signal frame.  Some of this code is taken from various portions of the
> PowerPC Linux kernel, with heavy adaptation for qemu.
> These patches apply to the qemu 0.7.0 package currently in  
> unstable; to
> build a qemu package with these patches applied:
> $ apt-get source qemu
> $ sudo apt-get build-dep qemu
> $ fakeroot debian/rules apply-patches
> * Get and apply the patches from the three bugreports above.
> $ fakeroot debian/rules binary
> I've also put up a qemu package built with these patches at
> http://psas.pdx.edu/~josh/powerpc-cross-debs/qemu_0.7.0-4_i386.deb .
> At this point, CAN messages are transported back and forth between
> run_threads and the simulator.  However, run_threads and the simulator
> don't understand each other's CAN messages, which prevents run_threads
> from completing Preflight Check.  From a previous conversation with
> Jamey and some investigation of the code, it looks like there are some
> byte-order issues with the CAN header.  In addition, since there are
> various different chunks of code which process CAN messages, it is
> possible that not all of those chunks do byte-swapping correctly.
> Now that it is possible to run a simulation with PowerPC  
> run_threads on
> one machine, we can start hacking on all of these portability issues.
> - Josh Triplett
> _______________________________________________
> psas-software mailing list
> psas-software at lists.psas.pdx.edu
> http://lists.psas.pdx.edu/mailman/listinfo/psas-software

More information about the psas-avionics mailing list