资源与支持

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

SiFive Performance™ P570 Gen 3 深度解析:面向下一代消费级与商用应用的高性能能效设计
最新文章
SiFive Performance™ P570 Gen 3 深度解析:面向下一代消费级与商用应用的高性能能效设计
SiFive 的核心是 RISC-V,这是 SiFive 创始人在公司成立 5 年前发明的指令集架构 (ISA)。SiFive 正持续演进基于 RISC-V 的 IP 基础模块,重新定义并推动各类计算平台的普及化发展。在技术领域,演进并非一串随机变化的时间线,而是一系列精心规划、环环相扣的里程碑。每一步演进都会创造一系列新的环境条件,从而推动下一次更复杂的跨越成为必然。要赢得这场竞赛,关键在于具备适应变化的灵活性与持续创新能力,而这两点正是 SiFive 与 RISC-V 的核心价值观所在。
P570 Gen 3:系统视角
最新文章
P570 Gen 3:系统视角
然而,CPU 的需求横跨性能、功耗和成本等多个维度。在某些细分市场中,需要在不同的功耗与成本约束下实现性能提升。基于这类 CPU 的系统需要可信赖的产品路线图,才能切实交付新的系统能力。尽管部分供应商已退出“低端市场”,SiFive 仍坚持在整条性能曲线上持续创新。本次发布的 P570 Gen 3 Performance IP,旨在为中低端、具备 Linux 能力的系统提供显著的性价比与能效比提升。
全力投入:开启增长新篇章
最新文章
全力投入:开启增长新篇章
我们自信地宣布公司发展历程中最重要的里程碑之一:完成 4 亿美元 的融资。本轮融资由 Atreides Management 领投,其他顶级投资机构\*包括 Apollo Global Management、NVIDIA(英伟达)、Point72 Turion 和 T. Rowe Price Investment Management, Inc.,以及现有投资者 Prosperity7 Ventures 和 Sutter Hill Ventures 参投。此次融资使公司估值达到 36.5 亿美元,并将加速 SiFive 的 RISC-V CPU 及 AI IP 解决方案推向数据中心和 AI 基础设施市场的核心地带。