Skip to main content
πŸŽ“ Claude Code Masterclass Learn AI-assisted development on Udemy β€” plus the companion book on Leanpub & Amazon. Start Learning
RISC-V hardware and development systems at RISC-V Summit Europe 2026
RISC-V

RISC-V Boot Flow: OpenSBI, U-Boot & the SBI

How a RISC-V system boots β€” the SBI, OpenSBI, U-Boot, UEFI, and the journey from reset vector to a running Linux kernel, explained step by step.

LB
Luca Berton
Β· 4 min read

When you press power on a RISC-V board, a precise sequence of handoffs takes the chip from a single instruction at the reset vector all the way to a multi-user Linux login. Understanding that boot flow demystifies a lot of RISC-V β€” and explains why terms like SBI, OpenSBI, and U-Boot come up constantly. Here is the journey, stage by stage.

RISC-V hardware and development systems at the Summit

The Big Picture: A Chain of Handoffs

RISC-V boot is a relay race across privilege modes, each stage more capable and less privileged than the last:

Reset vector β†’ ZSBL (ROM) β†’ FSBL β†’ OpenSBI (M-mode) β†’ U-Boot (S-mode) β†’ Linux kernel (S-mode)

Each stage initializes a bit more of the system and hands control to the next. The genius of the design is standardized interfaces between stages, so the kernel does not need to know the gory platform details.

Stage 0: The Reset Vector and ROM

At power-on, every hart (hardware thread) starts executing in Machine mode at a fixed reset vector address. A tiny Zero-Stage Boot Loader (ZSBL) baked into on-chip ROM runs first. Its only job is to bring up just enough β€” often loading a First-Stage Boot Loader (FSBL) from flash into SRAM, since DRAM is not initialized yet.

Stage 1: First-Stage Boot Loader

The FSBL initializes critical hardware: the DRAM controller, clocks, and basic I/O. Once main memory works, it can load the larger firmware stages into RAM. On some SoCs this stage is vendor-specific; on others it is folded into the next stage.

Stage 2: OpenSBI β€” The M-mode Firmware

This is the heart of RISC-V firmware. OpenSBI is the reference implementation of the Supervisor Binary Interface (SBI) β€” the standardized contract between machine mode and the supervisor-mode OS.

OpenSBI runs in the most privileged M-mode and provides services the kernel calls via the ecall instruction:

  • Timer management (setting the next timer interrupt)
  • IPI (inter-processor interrupts) to wake other harts
  • Console output during early boot
  • System reset and shutdown
  • Hart state management (bringing CPUs online/offline)

Think of OpenSBI as RISC-V’s equivalent of PSCI plus low-level firmware on Arm. Because the SBI is standardized, the same Linux kernel can run on wildly different RISC-V hardware β€” the platform differences hide behind OpenSBI. It then loads the next stage, usually U-Boot.

Stage 3: U-Boot β€” The Bootloader

Das U-Boot is the familiar, full-featured bootloader from the embedded world, and it runs in Supervisor mode on RISC-V. It can:

  • Read filesystems and load a kernel + device tree + initramfs
  • Provide an interactive console for development
  • Implement UEFI services via its EFI stub
  • Drive network boot, USB, and storage

U-Boot’s UEFI support is the bridge that lets standard distributions boot with GRUB and an EFI stub β€” the same way they do on a PC.

Stage 4: The Device Tree

A recurring character throughout: the Device Tree Blob (DTB). RISC-V (like Arm) uses a device tree to describe the hardware β€” CPUs, memory, peripherals, interrupt controllers β€” to the OS, since there is no x86-style enumerable bus for everything. Firmware passes the DTB to the kernel so Linux knows what hardware exists without hardcoding it. (UEFI + ACPI is an emerging alternative on application-class platforms.)

Stage 5: The Linux Kernel

Finally, the Linux kernel boots in Supervisor mode, parses the device tree, and calls into OpenSBI (still resident in M-mode) for privileged operations throughout its lifetime. From here it mounts the root filesystem and starts userspace β€” and you reach a login prompt on your RISC-V Linux distribution.

Why This Standardization Matters

The whole point is portability. Because SBI, device tree, and UEFI are standardized, a single distribution image can boot across many vendors’ boards β€” exactly the β€œinstall once, run anywhere” experience the profiles effort (RVA23) is designed to guarantee. It is what turns a pile of incompatible dev boards into a real platform.

See It Yourself in QEMU

You can watch the entire chain in QEMU, which ships with OpenSBI built in:

qemu-system-riscv64 -machine virt -nographic \
  -bios default \
  -kernel u-boot.bin

QEMU prints the OpenSBI banner (showing the SBI version and platform), then hands off to whatever you loaded β€” a great way to study each stage without hardware.

The Bottom Line

RISC-V boots as a relay of privilege levels β€” ROM to FSBL to OpenSBI (M-mode firmware and SBI provider) to U-Boot (the bootloader, often via UEFI) to the Linux kernel β€” with the device tree describing hardware along the way. The standardized SBI and UEFI interfaces are what make one OS image run across diverse RISC-V silicon. Once this flow clicks, the rest of the platform makes a lot more sense.


Part of my RISC-V series. Next: Running Linux distributions on RISC-V and RISC-V interrupts explained.

Frequently Asked Questions

What is the SBI in RISC-V?

The Supervisor Binary Interface (SBI) is the standardized contract between the operating system running in supervisor mode and the firmware running in machine mode. It lets the kernel request privileged services β€” like setting timers, sending inter-processor interrupts, or rebooting β€” without knowing platform-specific details. OpenSBI is its reference implementation.

What is OpenSBI?

OpenSBI is the reference open-source implementation of the RISC-V Supervisor Binary Interface. It runs in machine mode (M-mode) as the most privileged firmware, provides SBI services to the supervisor-mode OS, and typically loads the next-stage bootloader such as U-Boot. It is analogous to the role PSCI/firmware plays on Arm.

Do RISC-V systems use UEFI?

Yes, increasingly. The RISC-V boot chain supports UEFI through U-Boot's EFI implementation or dedicated firmware, which lets standard distributions (Ubuntu, Fedora, Debian) boot with GRUB and the EFI stub just as they do on x86 and Arm. This standardization is key to a unified 'just works' install experience.

#RISC-V #OpenSBI #U-Boot #firmware #Linux
Share:

πŸ“¬ Don't miss the next one

Get AI & Cloud insights delivered weekly

Join engineers getting practical tips on AI, Kubernetes, Ansible, and Platform Engineering.

Subscribe Free β†’
Luca Berton β€” AI & Cloud Advisor, Docker Captain

Luca Berton

AI & Cloud Advisor Β· Docker Captain Β· KubeCon Speaker

18+ years in enterprise infrastructure. Author of 8 technical books, creator of Ansible Pilot (1M+ YouTube views, 648K site users). Former Red Hat engineer. Speaker at KubeCon EU 2026 and Red Hat Summit 2026.

Free 30-min AI & Cloud consultation

Book Now