Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Rikitav/Unified.Firmware/llms.txt

Use this file to discover all available pages before exploring further.

Unified.Firmware is distributed as a family of NuGet packages, all versioned together at 1.4.0. The packages target netstandard2.1, making them compatible with every modern .NET runtime (.NET 5 through .NET 8 and beyond) as well as Mono and Xamarin runtimes that implement .NET Standard 2.1. Install only the packages your application actually needs — the core package is required by all others, while the boot-service and device-path packages are optional add-ons.

Package Overview

PackagePurpose
Unified.FirmwareCore library. FirmwareInterface, FirmwareEnvironment, GlobalFirmwareEnvironment, EfiPartition, IFirmwareBackend, Win32PlatformBackend, LinuxPlatfromBackend. Required by all other packages.
Unified.Firmware.BootServiceBoot entry CRUD. FirmwareBootService, FirmwareBootOption, LoadOptionBase, LoadOptionAttributes, DevicePathProtocolBase. Depends on Unified.Firmware.
Unified.Firmware.DevicePathProtocols.HardwareHardware device path protocol implementations: PciProtocol, MemoryMappedProtocol, ControllerProtocol, VendorProtocol. Depends on Unified.Firmware.BootService.
Unified.Firmware.DevicePathProtocols.MediaMedia device path protocol implementations: HardDriveProtocol, FilePathProtocol, CdRomProtocol, VendorDefinedProtocol. Depends on Unified.Firmware.BootService.

Install via dotnet CLI

dotnet add package Unified.Firmware
To pin a specific version, append --version 1.4.0 to any command:
dotnet add package Unified.Firmware --version 1.4.0

Install via Package Manager Console

Install-Package Unified.Firmware

PackageReference (csproj)

Add one or more <PackageReference> items to your .csproj file inside an <ItemGroup>:
<ItemGroup>
  <!-- Required: core firmware interface, environment variables, EFI System Partition -->
  <PackageReference Include="Unified.Firmware" Version="1.4.0" />

  <!-- Optional: boot entry read/write/create/delete operations -->
  <PackageReference Include="Unified.Firmware.BootService" Version="1.4.0" />

  <!-- Optional: PCI, MemoryMapped, Controller, and Vendor hardware device path protocols -->
  <PackageReference Include="Unified.Firmware.DevicePathProtocols.Hardware" Version="1.4.0" />

  <!-- Optional: HardDrive, FilePath, CdRom, and VendorDefined media device path protocols -->
  <PackageReference Include="Unified.Firmware.DevicePathProtocols.Media" Version="1.4.0" />
</ItemGroup>
Most OS-level boot tools only need Unified.Firmware and Unified.Firmware.BootService. Add the media protocols package if you need to construct HardDriveProtocol or FilePathProtocol instances when creating new boot entries.

Target Framework

All packages target netstandard2.1. This means they are compatible with:
  • .NET 5, .NET 6, .NET 7, .NET 8, and later
  • Mono 6.4+
  • Xamarin.Android 10.0+, Xamarin.iOS 12.16+, Xamarin.Mac 3.8+
There is no separate multi-targeting — the single netstandard2.1 binary runs on all of the above. Your consuming project can target any framework that implements .NET Standard 2.1.
If your project targets .NET Framework 4.x, upgrade to .NET Standard 2.1-compatible runtime. .NET Framework does not implement .NET Standard 2.1.

Platform Requirements

Windows

  • Any Windows version that supports UEFI (Windows 7 SP1 and later on UEFI hardware).
  • EfiExecutableInfo and volume name path resolution require Windows 8 or later.
  • The process must run as Administrator to read or write UEFI NVRAM variables. The underlying Win32 APIs (GetFirmwareEnvironmentVariable / SetFirmwareEnvironmentVariable) require SE_SYSTEM_ENVIRONMENT_NAME privilege, which is only granted to Administrators by default.

Linux

  • Any Linux distribution booted in UEFI mode with efivarfs mounted (the default on all modern distributions).
  • Firmware variable access goes through /sys/firmware/efi/efivars. The kernel exposes this interface automatically when the system is UEFI-booted.
  • The process must run as root or hold the CAP_SYS_ADMIN capability to read or write variables. Without it, the sysfs calls will return permission errors.
  • UEFI availability is detected by checking whether the /sys/firmware/efi/efivars directory exists; FirmwareInterface.Available returns false on Legacy BIOS systems where it is absent.
UEFI NVRAM is non-volatile storage — writes made by FirmwareBootService.CreateLoadOption, FirmwareBootService.UpdateLoadOption, FirmwareBootService.DeleteLoadOption, and FirmwareEnvironment.WriteStringVariable (and related write methods) persist across reboots. A malformed or incorrect boot entry can prevent the system from booting. Always test firmware modifications on a non-production machine or virtual machine first, and keep a recovery USB drive or alternative boot option available before making changes to the boot order.

Build docs developers (and LLMs) love