Linux on RISC-V
with Open Source Hardware
Drew Fustini (@pdp7)
<drew@beagleboard.org>
Open Source Summit Japan 2020
$ whoami
RISC-V (virtual) meetups around the world
Find many more at: https://riscv.org/local/
Upcoming Events
Upcoming Events
Hardware whose design is made publicly available so that anyone can study, modify, distribute, make, and sell the design or hardware based on that design
(source: Open Source Hardware (OSHW) Statement of Principles 1.0)
Upcoming Events
Linux on Open Source Hardware with Open Source chip design�Chaos Communication Congress (36c3), December 2019
Instruction Set Architecture (ISA)
RISC-V: a Free and Open ISA
What is different about RISC-V?
RISC-V Base Integer ISA
(source: RISC-V Summit 2019: State of the Union)
RISC-V Standard Extensions
(source: RISC-V Summit 2019: State of the Union)
(source: Hot Chips Tutorial, Part 1: RISC-V overview and ISA design, Krste Asanovic)
Learn more about RISC-V
RISC-V and Industry
RISC-V and Industry
RISC-V around the world
“Is RISC-V an Open Source processor?”
RISC-V Privileged Architecture
(source: Co-developing RISC-V Hypervisor Support, Anup Patel)
RISC-V Boot Flow
(source: RISC-V software ecosystem in 2020, Atish Patra)
What is SBI?
(source: OpenSBI Deep Dive, Anup Patel)
What is OpenSBI?
(source: OpenSBI Deep Dive, Anup Patel)
UEFI Support
(source: Introduction to RISC-V Boot Flow, Atish Patra and Anup Patel)
RISC-V emulation in QEMU
(source: OpenSBI Deep Dive, Anup Patel)
RISC-V in the Linux kernel
(source: “What's missing in RISC-V Linux, and how YOU can help!”, Björn Töpel)
RISC-V in the Linux kernel
(source: “What's missing in RISC-V Linux, and how YOU can help!”, Björn Töpel)
$ ./Documentation/features/list-arch.sh riscv | grep TODO�� core/ cBPF-JIT : TODO | HAVE_CBPF_JIT # arch supports cBPF JIT optimizations� debug/ kprobes : TODO | HAVE_KPROBES # arch supports live patched kernel probe� debug/ kprobes-on-ftrace : TODO | HAVE_KPROBES_ON_FTRACE # arch supports combined kprobes and ftrace live patching� debug/ kretprobes : TODO | HAVE_KRETPROBES # arch supports kernel function-return probes� debug/ optprobes : TODO | HAVE_OPTPROBES # arch supports live patched optprobes� debug/ uprobes : TODO | ARCH_SUPPORTS_UPROBES # arch supports live patched user probes� debug/ user-ret-profiler : TODO | HAVE_USER_RETURN_NOTIFIER # arch supports user-space return from system call profiler� locking/ cmpxchg-local : TODO | HAVE_CMPXCHG_LOCAL # arch supports the this_cpu_cmpxchg() API� locking/ queued-rwlocks : TODO | ARCH_USE_QUEUED_RWLOCKS # arch supports queued rwlocks� locking/ queued-spinlocks : TODO | ARCH_USE_QUEUED_SPINLOCKS # arch supports queued spinlocks� perf/ kprobes-event : TODO | HAVE_REGS_AND_STACK_ACCESS_API # arch supports kprobes with perf events� sched/ membarrier-sync-core : TODO | ARCH_HAS_MEMBARRIER_SYNC_CORE # arch supports core serializing membarrier� sched/ numa-balancing : TODO | ARCH_SUPPORTS_NUMA_BALANCING # arch supports NUMA balancing� time/ arch-tick-broadcast : TODO | ARCH_HAS_TICK_BROADCAST # arch provides tick_broadcast()� time/ irq-time-acct : TODO | HAVE_IRQ_TIME_ACCOUNTING # arch supports precise IRQ time accounting� time/ virt-cpuacct : TODO | HAVE_VIRT_CPU_ACCOUNTING # arch supports precise virtual CPU time accounting� vm/ ELF-ASLR : TODO | ARCH_HAS_ELF_RANDOMIZE # arch randomizes the stack, heap and binary images of ELF binaries� vm/ huge-vmap : TODO | HAVE_ARCH_HUGE_VMAP # arch supports the ioremap_pud_enabled() and ioremap_pmd_enabled()� vm/ ioremap_prot : TODO | HAVE_IOREMAP_PROT # arch has ioremap_prot()� vm/ PG_uncached : TODO | ARCH_USES_PG_UNCACHED # arch supports the PG_uncached page flag� vm/ THP : TODO | HAVE_ARCH_TRANSPARENT_HUGEPAGE # arch supports transparent hugepages� vm/ batch-unmap-tlb-flush: TODO | ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH # arch supports deferral of TLB flush until multiple pages are unmapped
RISC-V in the Linux kernel
(source: “What's missing in RISC-V Linux, and how YOU can help!” (Björn Töpel) and linux-riscv mailing list)
RISC-V in the Linux kernel
(source: “What's missing in RISC-V Linux, and how YOU can help!” (Björn Töpel) and linux-riscv mailing list)
Linux distro: Fedora
(source: Fedora on RISC-V, Wei Fu)
Linux distro: Fedora
(source: Fedora on RISC-V, Wei Fu)
Linux distro: Debian
OpenEmbedded / Yocto
BuildRoot
SiFive Freedom FU540 SoC
SiFive Freedom Unleashed
NOTE: ASIC is a term often used to indicate that an SoC (System-on-Chip) has a “hard” processor core constructed by silicon fab instead of “soft” core in an FPGA
SiFive Freedom Unleashed
Microchip PolarFire SoC
Microchip Icicle board
SAVVY-V board
Kendryte K210
Kendryte K210
Kendryte�K210
PicoRio
SiFive Unmatched
SiFive Unmatched
Alibaba XuanTie 910
Sipeed board with Allwinner SoC
Open source FPGA toolchains
“RISC-V and FPGAs: Open Source Hardware Hacking”�Keynote at Hackday Supercon 2019 by Dr. Megan Wachs
Open source FPGA toolchains
Open source FPGA toolchains
Open source FPGA toolchains
Hackaday Supercon badge
“Team Linux on Badge”
“Team Linux on Badge”
Why design an SoC in Python?
LiteX
Open Source ECP5 FPGA boards
Open Source ECP5 FPGA boards
Want to learn FPGAs? Try Fomu!
No hardware? Try Renode!
source: Renode supported boards
source: Renode supported boards
Trustworthy self-hosted computer
Linux on RISC-V
with Open Source Hardware
Drew Fustini (@pdp7)
<drew@beagleboard.org>
Open Source Summit Japan 2020