xv6 RISC-V OS on Firesim?

111 views
Skip to first unread message

Steve Ibanez

unread,
Jul 1, 2021, 2:49:57 PM7/1/21
to FireSim
Hi All,

I know that Firesim supports the Buildroot and Fedora Linux distributions, but I'm curious if anyone has tried running the xv6 RISC-V teaching OS on a Rocket core in Firesim? xv6 has the advantage of being very simple, lightweight, easy to understand and modify so it's great for teaching and research.

I thought it would be good to ask before I go through the trouble of adding support for it myself. Any tips would be much appreciated!

Thanks,
Steve

nat...@berkeley.edu

unread,
Jul 2, 2021, 5:57:25 PM7/2/21
to FireSim
To my knowledge, no one has tried that yet. The tool we use to manage software workloads in FireSim/Chipyard is called FireMarshal. The only OSs officially supported by FireMarshal are Buildroot and Fedora. Debian seems pretty stable and we'd love to support it, but it just hasn't been a priority. I guess PK is also sort of an OS that we run sometimes, though Marshal doesn't have any special support for it.

FireMarshal has a fairly pluggable interface for adding Linux-based distributions, and it makes a few Linux-specific assumptions. Supporting a non-Linux OS properly is interesting, but would definitely take some deep thought from the FireMarshal perspective.

Instead, I think you'd treat xv6 as a 'bare-metal' workload, which basically means that FireMarshal lets the user figure out how to build the binary and disk images and only handles some integration stuff like launching in spike/qemu, output analysis, or generating FireSim configs. This is how PK works. In this case, you provide a build script (which would just call xv6's make) and then write a simple Marshal config. The porting tricks for you will be around device tree handling, uart setup, and SBI stuff if you have to do something special. Our Cores are pretty standard RISC-V, so if your stuff works on Spike, it should be pretty much good to go for FireSim (other than the stuff I mentioned).

I'd be happy to help out where I can, feel free to email me directly at nat...@berkeley.edu for a more nuts and bolts discussion. Keep us in the loop on how it goes. I'd love to include it or at least reference it as a standard workload.

Nathan

Steve Ibanez

unread,
Jul 2, 2021, 6:59:55 PM7/2/21
to FireSim
Hi Nathan,

Thanks for the useful suggestions and being willing to help out :-) I think it makes sense to treat xv6 as a 'bare metal' workload. I'll look into this some more and will keep you posted.

Best,
Steve
Reply all
Reply to author
Forward
0 new messages