资源与支持

SiFive 博客

来自 RISC-V 专家的最新洞察与深度技术解析

December 05, 2017

All Aboard, Part 8: The RISC-V Linux Port is Upstream!

As some of you may have heard, the RISC-V Linux port has been accepted into Linus' tree and is slated to release as part of 4.15. While this is a major milestone, we're far from done in Linux kernel land and there's a whole lot of work left to be done in userspace.

That said, this is a big enough development that it warrants a blog post of its own -- at the least as an excuse for why I haven't been blogging for a bit :).

What is Upstream?

The core of our port has landed upstream. That includes:

  • Device Tree bindings for RISC-V CPUs.
  • Early boot and initialization code.
  • The Linux atomic and memory model intrinsics, targeted at a non-formal memory model (aka, a bunch of guesses I've made).
  • Some interrupt and timer infrastructure, but this needs to be cleaned up.
  • Paging and MMU related code.
  • An implementation of the user-facing ABIs for RISC-V Linux systems, which will be turned into a specification.

All this code, in addition to a handful of fixups, will be included in the 4.15 tarball release. We're targeting the next glibc release, which should be out in early February. At that point, the ABIs will be set in stone and distributions will be able to begin work while maintaining binary forever.

What isn't Upstream?

We're still missing quite a few features, most notably:

  • We need to clean up first-level interrupt handling on RISC-V systems, which I will probably borrow from how ARMv8 and OpenRISC are doing it.
  • The SBI console driver isn't upstream yet, but it appears to be in pretty good shape.
  • The per-hart interrupt controller will need to be modified to work with the new interrupt handling scheme.
  • The PLIC driver should be converted to the FastEOI flow, but I've yet to finish that refactoring.
  • The ISA mandated timer driver needs to be converted to avoid initialization code in arch/riscv/, to handle more of the device tree specification, and to use the new interrupt handling infrastructure.
  • Our 32-bit DMA patches need to be cleanup up and submitted for review.
  • We have some workarounds for bugs in the Xilinx PCIe controller that need to be fixed sanely .
  • There's a handful of cleanups floating around in PCI and OF land that need to eventually make it in. Some of these were also being worked on in better ways by upstream, so hopefully that sorts itself out.
  • We have a handful of device tree documentation fixes that should go in.

How to Help

If you're interested in helping with the RISC-V Linux effort (or any other RISC-V software project), the best place to get started is on our GitHub page. Each project has its own development repository on GitHub that contains various outstanding patches, and the RISC-V maintainers of those projects are active on those GitHub pages to discuss development.

If you're already familiar with the development process for a particular project, then we of course follow the standard development practices on a per-project basis for all the ports that have landed upstream. In general, a MAINTAINERS file of some sort will contain the mechanism for contacting the RISC-V developers. There is also a patches@groups.riscv.org mailing list where all patches for upstream RISC-V software are meant to be CC'd -- this is mainly meant for distribution maintainers as an easy place to find all software patches, but also serves as a place for discussion.

Additionally, for questions that don't fit into any of the above bins you're welcome to send them to the RISC-V software mailing list, sw-dev@groups.riscv.org or ask on #riscv on freenode.


Read more of the All Aboard blog series:

Palmer Dabbelt
Palmer Dabbelt

Palmer Dabbelt is an Engineer for Meta, having prior experience as an Engineer at Rivos and Software Engineer at Google. Prior to that he worked at SiFive as Director of Software Engineering and as an Engineer.

Read more Insights from the RISC-V Experts

为您介绍 SKL:SiFive 算子库
最新文章
为您介绍 SKL:SiFive 算子库
我们非常高兴地宣布推出 SiFive 算子库(SiFive Kernel Library,简称 SKL,发音为 “skill”)。这是一个开源的高性能计算例程集合,专为 RISC-V Vector ISA (RVV) 及其各种扩展(包括 SiFive 的矩阵引擎)进行了深度优化。
RISC-V EU Summit 2026: An Ecosystem Coming of Age
最新文章
RISC-V EU Summit 2026: An Ecosystem Coming of Age
I recently returned from the RISC-V Europe Summit 2026 in Bologna and, like many attendees, I came away energized by the announcements, the technical discussions and the sheer number of people building products around RISC-V.
P570 Gen 3:系统视角
最新文章
P570 Gen 3:系统视角
然而,CPU 的需求横跨性能、功耗和成本等多个维度。在某些细分市场中,需要在不同的功耗与成本约束下实现性能提升。基于这类 CPU 的系统需要可信赖的产品路线图,才能切实交付新的系统能力。尽管部分供应商已退出“低端市场”,SiFive 仍坚持在整条性能曲线上持续创新。本次发布的 P570 Gen 3 Performance IP,旨在为中低端、具备 Linux 能力的系统提供显著的性价比与能效比提升。