Skip to content
STIMSMITH

Bare-Metal Software

Concept WIKI v1 · 6/11/2026

Bare-metal software refers to programs that run directly on a processor or virtual prototype (VP) without an underlying operating system. In the context of the CHERI-RISC-V VP++ thesis, bare-metal software is used as a stepping stone to demonstrate and evaluate CHERI's fine-grained, capability-based memory protection on a virtual platform, progressing from simple CHERI-enabled RISC-V assembly programs to CHERI-enabled C applications.

Bare-Metal Software

Definition

In the context of the CHERI-RISC-V VP++ master's thesis, bare-metal software refers to programs executed directly on a target platform — here, the CHERI-enabled RISC-V Virtual Prototype — without an operating system mediating accesses. Such programs interact with hardware (or the VP) primitives directly, including memory-mapped I/O for peripherals and explicit stack and capability table initialization.

Role on CHERI-RISC-V VP++

Chapter 5 of the CHERI-RISC-V VP++ thesis is devoted to "Running Bare-Metal Software on CHERI-RISC-V VP++". The bare-metal examples sit between two milestones of the thesis:

  1. The verified CHERI implementation produced in Chapter 4 (using the TestRIG random-testing framework), and
  2. The full-scale capability-enabled operating system boot (CheriBSD) demonstrated in Chapter 6.

Bare-metal programs therefore serve as a controlled environment to:

  • Demonstrate the basic principles of CHERI in practice.
  • Highlight CHERI's implications on the architecture from a control-flow-oriented perspective.
  • Confirm the correct implementation of the CHERI-RISC-V VP++ by exercising its capability-based memory protection on small, observable programs before moving to a full OS context.

Topics Covered with Bare-Metal Software

The chapter on bare-metal software is organized into two main parts.

CHERI-enabled RISC-V Assembly Programs (Section 5.1)

The complexity of bare-metal programs is gradually increased to expose low-level programming details introduced by CHERI:

  • Initial Assembly Implementation (5.1.1): A simple assembly program is used as a starting point.
  • Modifying Assembly for CHERI (5.1.2): Adaptations required to make the assembly program CHERI-aware are explained.
  • Initializing the Stack Pointer (5.1.3): How the stack pointer must be set up under CHERI's capability regime.
  • The Global Capability Table (5.1.4): Use of a global capability table to manage capabilities available to bare-metal code.

CHERI-enabled C Programs (Section 5.2)

The thesis then transitions to more realistic bare-metal code written in C:

  • Prerequisites (5.2.1): Toolchain and configuration requirements for compiling CHERI-enabled C applications.
  • Adapting Peripheral Access: Conventional techniques such as memory-mapped I/O must be adapted to ensure compatibility with CHERI's capability-based memory protection.
  • Evaluating Boundary Protection (5.2.2): Experiments confirming that CHERI prevents out-of-bounds memory accesses.
  • Evaluating Function Pointers (5.2.3): Experiments showing how CHERI constrains and protects function-pointer use.

Connection to Memory Protection

The bare-metal programs are used to demonstrate how CHERI prevents common memory corruption bugs at the architectural level. These small examples establish confidence in the platform's implementation and provide a foundation that the later full-OS work (CheriBSD on CHERI-RISC-V VP++) builds upon, where the same protection mechanisms are revisited in an OS context.

LINKED ENTITIES

1 links

CITATIONS

7 sources
7 citations
[1] Chapter 5 of the CHERI-RISC-V VP++ thesis is titled 'Running Bare-Metal Software on CHERI-RISC-V VP++' and explores CHERI-enabled software running directly on the virtual prototype without an operating system. CHERI-RISC-V VP++: A Virtual Prototyping Platform Enabling Fine-Grained Memory Protection
[2] Bare-metal programs on CHERI-RISC-V VP++ begin as a simple assembly program and are gradually extended in complexity to expose low-level CHERI programming details. CHERI-RISC-V VP++: A Virtual Prototyping Platform Enabling Fine-Grained Memory Protection
[3] Section 5.1 covers CHERI-enabled RISC-V assembly programs, including the initial implementation, modifications for CHERI, stack pointer initialization, and the global capability table. CHERI-RISC-V VP++: A Virtual Prototyping Platform Enabling Fine-Grained Memory Protection
[4] Section 5.2 covers CHERI-enabled C programs, including toolchain prerequisites, evaluation of boundary protection, and evaluation of function pointers, with peripheral access techniques like memory-mapped I/O adapted for CHERI's capability-based memory protection. CHERI-RISC-V VP++: A Virtual Prototyping Platform Enabling Fine-Grained Memory Protection
[5] Bare-metal software serves as a bridge between the verified CHERI implementation (Chapter 4, using TestRIG) and the booting of a full capability-enabled operating system, CheriBSD, in Chapter 6. CHERI-RISC-V VP++: A Virtual Prototyping Platform Enabling Fine-Grained Memory Protection
[6] Bare-metal programs are used to demonstrate how CHERI prevents common memory corruption bugs, confirming the correct implementation of the CHERI-RISC-V VP++. CHERI-RISC-V VP++: A Virtual Prototyping Platform Enabling Fine-Grained Memory Protection
[7] The CHERI-RISC-V VP++ master's thesis is authored by Andreas Hinterdorfer, BSc, supervised by Univ.-Prof. Dr. Daniel Große and DI Manfred Schlägl, at the Institute for Complex Systems, Johannes Kepler University Linz, submitted September 2025. CHERI-RISC-V VP++: A Virtual Prototyping Platform Enabling Fine-Grained Memory Protection