CheriBSD

CheriBSD adapts FreeBSD for CHERI-RISC-V and Morello, providing a complete environment for pure-capability software and compartment research.

Testing CHERI with real software requires more than a small runtime. The operating system must save capability registers, preserve tags, load capability-aware binaries, map memory with suitable authority, deliver faults, and expose system calls through a compatible application binary interface (ABI).

CheriBSD provides that full-system environment. It is FreeBSD adapted for CHERI-RISC-V and Arm Morello.

What CheriBSD includes

CheriBSD integrates CHERI across:

Because it is derived from FreeBSD, developers can work with familiar Unix tools, source layouts, network stacks, filesystems, and application interfaces.

Supported development routes

CHERI-RISC-V in QEMU

This is the most accessible application-class route. cheribuild builds the CHERI compiler, QEMU, CheriBSD, and a disk image, then boots the pure-capability system.

git clone https://github.com/CTSRD-CHERI/cheribuild.git
cd cheribuild
./cheribuild.py --include-dependencies run-riscv64-purecap

Use current cheribuild documentation for prerequisites and target changes.

Morello

CheriBSD runs on the Morello board and supports Morello-specific hybrid and pure-capability software. This route is useful for hardware evaluation and existing Morello projects. Firmware, operating-system image, software development kit (SDK), and board revision must remain compatible.

FPGA and other CHERI-RISC-V implementations

CheriBSD can support additional processors when they implement a compatible application-class CHERI architecture and the required platform devices. Confirm the exact processor, instruction-set architecture (ISA) revision, and board support rather than assuming every CHERI-RISC-V core boots the same image.

Pure-capability user space

The CheriABI work established a process environment where language-visible pointers use capabilities. This enables large C and C++ codebases to receive capability bounds and permissions through normal compilation.

The pure-capability environment has been used to port operating-system utilities, libraries, servers, databases, language runtimes, and other applications. The ports tree records many of the compatibility changes required by real software.

Why developers use CheriBSD

Relationship to FreeBSD

CheriBSD tracks and adapts FreeBSD rather than defining an unrelated operating system. Some generally useful changes can move into the main FreeBSD project, while CHERI-specific architecture and ABI work remains in the CheriBSD repositories until a suitable contribution path exists.

A stock FreeBSD release does not include complete CHERI support by default. A CheriBSD package also needs to be built for the correct architecture and ABI.

Constraints

Getting started and contributing

Begin with QEMU, build a small pure-capability program, and record the CheriBSD, compiler, and architecture revisions before attempting a larger port.

Where next

An overview of FreeBSD in relation to CHERI development and contributions to mainline software projects.

FreeBSD →