[kaffe] Kaffe and MIPS CPUs

Jim Pick jim at kaffe.org
Mon Jul 8 10:48:15 PDT 2002


On Mon, 2002-07-08 at 01:14, Kevin D. Kissell wrote:
> Hi Jim,
> 
> Now that the "official" Kaffe 1.0.7 release is out, I've been trying
> to get it running on MIPS platforms, specifically a MIPS Technologies
> "Malta" development board with a contemporary 64-bit 5Kc core
> running Linux 2.4.18, and a Sony Playstation 2 running the Sony
> variant of Linux 2.2.1.  Neither of them will build or run using the
> current distribution, so I'm working on that.  There are those who
> claim to have gotten 1.0.6 working on various MIPS/Linux platforms,
> but I've yet to find one that is functional and compatible with current
> shared libraries, etc.  So I'm rolling up my sleeves and attacking
> 1.0.7.

Cool.  I haven't really attacked MIPS yet - I tested it with 1.0.7, but
there were still some issues.  I've still got the PS2 patches in my
queue - they aren't forgotten.  I'm glad that a few people are
interested.

FWIW, MIPS is quite important to me, since a lot of the activity in the
settop box space seems to be MIPS-based (my new employer, Berkeley
Signal, is doing settop stuff).  I see Kaffe as being really useful as a
prototyping tool for embedded applications (although the fact that it is
GPL'd probably rules it out for most production uses - but then it's
easy to switch to a proprietary JVM).

> I'm not a JVM hacker as such - mostly an OS kernel
> hacker type of 20 or so years experience (BSD, System V,
> Mach, Linux) who has done a moderate amount of Java programming
> and who has a pretty fair, if not expert, idea of how a JVM
> functions.  You won't find me on anyones maintainer lists,
> but you will find my name on some of the Linux/MIPS kernel
> sources.

Cool.  I did some MIPS kernel work too (ported Linux to the VTech
Helio).  That didn't involve too much assembly level work though - it
was mostly driver stuff.

> Kaffe has seemed largely abandoned for the past couple of years,
> and I'm pleased that you have stepped up to bat to maintain it
> for a while.  I would assume that you'd be at least vaguely interested
> in whatever patches I come up with to get things working on MIPS.
> Is that correct?  Are there other people doing the same thing with
> whom I should be in contact?  In general, how should I proceed?

The best place to send patches is just the mailing list at
kaffe at kaffe.org.  By sending them there, you'll get some good comments,
and several developers have CVS commit access, so the patches might go
in quicker if they aren't controversial.

> The current state of play at my end is that I've got kaffe building
> on the 2.4.18/"Red Hat 7.1" MIPS platform, with a couple of
> pretty simple changes in the config/mips stuff (some stuff there
> was fixed since 1.0.6, but not everything).  However, in both
> purely interpretive and JIT configurations, it fails almost all
> tests, mostly due to "stack overflow" errors, and sometimes
> due to System.arraycopy throwing an arithmetic exception
> (which it should never do!).  I'm working on hunting down
> the causes of those things - if you have a clue, I'd be greatful.

Sorry, I don't have a clue (I haven't played with it much yet - so many
ports, so little time).

I do know that Transvirtual proprietary version of Kaffe (which was
released under the GPL as part of PocketLinux) had some pretty solid
MIPS support (at least little-endian) - when I worked there, we had our
software running on quite a few MIPS devices.  I definitely want to see
the good stuff from the PocketLinux release merged into Kaffe.org's
version of Kaffe.  It might be worth taking a look at those sources if
you are running into some problems.  I've got a copy at:

  http://www.kaffe.org/ftp/pub/packages/pocketlinux/

> The Playstation 2 is problematic.  The R5900 CPU in the PS2
> supports single-precision, but not double-precision, floating point
> in hardware, and Sony hacked gcc accordingly.  It will probably
> be necessary to tweak the JIT implementation and configuration
> to take that into account. I know that there are others who were working 
> on getting a "stock" MIPS kaffe 1.0.6 running on it, and another
> of my "spare time" projects has been to get the kernel FPU
> emulation on the PS2 up to the same level that I managed to
> get it for 2.4.x and later 2.2.x MIPS kernels, so that the JIT
> code that emits double-precision FPU instructions could run.

Yeah, Dylan mentioned that.  Really, it's a toolchain/kernel problem,
but I don't see the harm in adding a few hacks into kaffe to workaround
the problem.

> But for the moment, getting Kaffe 1.0.7 running on a non-PS2
> "standard" MIPS platform is my priority.

Cool.  Welcome aboard.  :-)

Cheers,

 - Jim





More information about the kaffe mailing list