Java on RISC-V

What is the status of getting a working JVM on the RISC-V ISA?

Google searches haven’t turned up much, even though Java support seems rather critical to gaining wide adoption of RISC-V. I can’t really see selling a server or tablet or even a set top box without a working JVM.

This seems like something we need to get behind as a community. If anyone is working on an open source port, I would be interested to pitch in.

Thanks,

Sean

Hi Sean,

Great to hear you want to help! A good place to reach others who may be working on a JVM port would be the RISC-V Foundation mailing lists. You can find the sw-dev list (and others) at this link:

https://riscv.org/mailing-lists/

Thanks,
Megan

Hi Sean,

We have two JVM ports underway at UC Berkeley. The first is a full port of OpenJDK (which Michael Knyszek is working on) and the second is a port of the Jikes Research VM (which I am working on).

So far, OpenJDK runs successfully on RISC-V using the Zero backend. This is effectively an interpreted version and therefore very slow, but it runs real Java applications. For example, we had a poster at the Second RISC-V workshop that shows Chisel running on RISC-V. If you are interested to try out the port, we have it available as a fork of the riscv-poky repository (due to the large number of dependencies, the most feasible way to cross-compile a JVM is using poky).

I noticed that you may have found this pull request yourself and commented on it; while it may have fallen behind the latest poky-release, it is fully functional with the Zero backend.

Michael is currently working on a port of the template-based interpreter, which should substantially improve performance and is a first step to getting the optimizing JIT up and running. We are probably 20-30% through at this point, with the first couple of Java bytecodes executing correctly. Jikes is a little bit further along the path, being able to already run a few small programs when bypassing the class loader (but still major work to do).

If you are interested in getting involved, we should definitely talk! Our goal is to get the interpreter-based JVMs working as soon as possible, but afterwards a lot more effort is needed for the optimizing JIT.

Thanks,
Martin

Excellent :slight_smile: I am glad that we were able to connect. We are actually working on a chip based on RISC-V for data driven workloads, and a performant Java is a key need, so we are motivated to contribute to an open source platform. We may be able to offer you a developer to pitch in and help out at some point.
I will try to connect with you directly.

Best,

Sean

1 Like