[systemd-devel] [PATCH] architecture: Add support for the RISC-V architecture.
lennart at poettering.net
Tue Oct 4 13:36:48 UTC 2016
On Fri, 30.09.16 16:45, Richard W.M. Jones (rjones at redhat.com) wrote:
> [This is only compile-tested, as our kernel doesn't (yet) have
> enough configured features to run systemd, but I'll report back
> when I get it running.]
> RISC-V is an open source ISA in development since 2010 at UCB.
> For more information, see https://riscv.org/
> I am adding RISC-V support to Fedora:
> There are three major variants of the architecture (32-, 64- and
> 128-bit). The 128-bit variant is a paper exercise, but the other two
> really exist in silicon. RISC-V is always little endian.
> On Linux, the default kernel uname(2) can return "riscv" for all
> variants. However a patch was added recently which makes the kernel
> return one of "riscv32" or "riscv64" (or in future "riscv128"). So
> systemd should be prepared to handle any of "riscv", "riscv32",
> "riscv64" or "riscv128". If the kernel returns "riscv" then you
> need to use the pointer size in order to know the real variant.
> The Fedora/RISC-V kernel only ever returns "riscv64" since we're only
> doing Fedora for 64 bit at the moment, and we've patched the kernel so
> it doesn't return "riscv".
> As well as the major bitsize variants, there are also architecture
> extensions. However I'm trying to ensure that uname(2) does *not*
> return any other information about those in utsname.machine, so that
> we don't end up with "riscv64abcde" nonsense. Instead those
> extensions will be exposed in /proc/cpuinfo similar to how flags work
> in x86.
> I should also note that __SIZEOF_POINTER__ is a GCC extension, but it
> appears to be used already in systemd so I guess that's OK.
Any chance you can move this cover letter (or at least most of it into
the commit itself? I think it would be great to have all of this in
Also, if riscv128 is a paper excercise for now, then I'd prefer if
this was left out of the current patch for now.
I created a github PR from this:
Would be good to follow up discussion there.
Lennart Poettering, Red Hat
More information about the systemd-devel