Introduction

Welcome to Patina - a pure Rust project dedicated to evolving and modernizing UEFI firmware with a strong focus on security, performance, and reliability. This book serves as high-level documentation for developers and platform owners working with or contributing to Patina.

To put it simply, Patina is a UEFI spec compliant pure Rust DXE Core with an interface for writing monolithically compiled Patina components (drivers) using a dependency injection model. It should be noted that Patina takes a more opinionated stance on some implementation details to provide a more secure runtime, so we are not fully PI spec compliant. Due to this, there are some key platform requirements that differ from a non-Patina implementation. See Patina Requirements for more information regarding this.

This book is the "catch-all" for Patina: it contains various documentation regarding Patina that can be broken up into these 5 categories:

  1. Background of Patina and its goals.
  2. Integrating the Patina code into your platform.
  3. Developing Patina components.
  4. Contributing to Patina.
  5. Development guidance and standards that apply to both Patina and Patina component developers.

If you have not read this book before, we suggest you start with (1) Patina Background, which outlines the project's goals and design philosophy. You can also watch an overview of Patina presented at UEFI Plugfest 2025.

Patina In Action

If you want to see Patina being actively used and "in action", then check out these two repositories:

1. patina-qemu: This repository has two virtual platforms, both of which use the patina-dxe-core. You can find setup instructions for building and running them locally in that repository's readme.

2. patina-dxe-core-qemu: This repository contains the patina-dxe-core binary crates used by the two virtual platforms in patina-qemu. If you'd like to experiment, you can clone this repo, modify the DXE core, and use the override feature in patina-qemu to boot with your customized build.

Important Crates and Repositories

The Patina project maintains a large list of distinct crates throughout our various repositories (See below) in order to support proper decoupling and faster build times. If you are just starting with Patina, there are two main crates that you should review:

1. patina_dxe_core: The library crate containing the Patina DXE Core struct definition. This struct is instantiated and configured by a platform in their own respective binary crate, which ultimately compiles to an EFI binary.

2. patina: The SDK for working with Patina, whether you are creating a Patina component or developing the Patina DXE core.

Putting it all together

The patina-dxe-core crate provides the UEFI spec compliant Patina DXE Core. The Core produces the EFI System Table (with the core provided services) and a PI spec compliant* DXE Dispatcher.

Outside of UEFI spec compliance, platforms can attach Patina Components, which are conceptually similar to UEFI components, but are pure Rust and monolithically compiled with the Patina DXE Core. Some components are written and maintained by Patina, but are still optional. Over time, the Patina project will add more generically useful components. We are expecting that additional components will be written by platform maintainers. These may be specific to their platform or generic for the Patina ecosystem. See Patina Component Model for more information.

flowchart TD
 subgraph internal_crates["Internal Crates (1..N)"]
    direction TB
        internal2["Crate"]
        internalN["Crate"]
  end
 subgraph plugin_crates["Component Crates (1..N)"]
    direction TB
        plugin2["Component"]
        pluginN["Component"]
  end
    consumer_bin["Platform Patina DXE Core (binary)"] -- uses --> patina_core["patina_dxe_core"]
    consumer_bin -. optionally uses .-> plugin_crates
    patina_core -- uses --> internal_crates
    patina_core -. depends on .-> patina_sdk["patina (SDK crate)"]
    plugin2 -. depends on .-> patina_sdk
    pluginN -. depends on .-> patina_sdk
    internal2 -. depends on .-> patina_sdk
    internalN -. depends on .-> patina_sdk

All Repositories

RepositoryDescription
patinaCore codebase for Patina containing Patina-only crates.
patina-readiness-toolA DXE core replacement binary that reviews HOBs passed from PEI to DXE to validate your platform is ready to use the Patina DXE Core.
patina-fw-patcherA developer tool to quickly patch a new patina-dxe-core binary into a platform's firmware
patina-pagingA paging solution we believe is generic enough to be useful outside of Patina.
patina-mtrrA x86_64 MTRR solution we believe is generic enough to be useful outside of Patina.
patina-edk2A collection of definitions and helper utilities designed for EDK II-style C firmware projects that integrate Patina.
patina-dxe-core-qemuA reference implementation of patina-dxe-core for our two virtual QEMU platforms.
patina-qemuTwo reference virtual platforms (Q35, SBSA)
patina-devopsA repository containing github workflows, actions, and notebooks used across our repositories.

Final Notes

Info

This documentation aims to be as detailed as possible, not assuming any previous knowledge. However some general Rust knowledge is beneficial throughout the book, and some EDK II knowledge is beneficial to understanding how consume the final pure-Rust platform Patina DXE core in EDK II style firmware.

While you can navigate to any section in this book via the left-side navigation bar, here are the quick links to the start of the different sections mentioned above:

  1. Patina Background
  2. Platform Integration
  3. Component Development
  4. Contributing to Patina
  5. Developer Guides

Patina Overview at UEFI Plugfest 2025