A UEFI device path is a packed, variable-length binary structure that describes every step of the hardware route to a boot image — from the PCI bus controller, through the disk partition, down to the exact EFI executable file. Each step is a typed node called a device path protocol. Unified.Firmware models these nodes as strongly-typed C# classes so you can build, inspect, and serialize device paths without writing any binary marshalling code yourself.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.
DevicePathProtocolBase
All device path protocol classes inherit from the abstractDevicePathProtocolBase. It captures the two header fields that appear in every UEFI device path node and declares the serialization contract.
DeviceProtocolType enum covers all top-level categories defined by the UEFI specification:
| Value | Byte | Description |
|---|---|---|
Hardware | 0x01 | Physical hardware connection (PCI, memory map, controller) |
ACPI | 0x02 | ACPI device namespace path |
Message | 0x03 | Messaging devices (USB, SCSI, NVMe, …) |
Media | 0x04 | Logical partition or file within a media device |
BIOS | 0x05 | BIOS Boot Specification compatibility node |
End | 0x7F | End-of-path sentinel node |
Hardware Device Path Protocols
Hardware device path protocols are provided by theUnified.Firmware.DevicePathProtocols.Hardware package. They describe the physical connection between the firmware and a device on the system board.
PciProtocol
Identifies a PCI function on a specific device. Corresponds to UEFI spec PCI Device Path, sub-type 1.MemoryMappedProtocol
Describes a device that is mapped directly into the physical address space. Sub-type 3.ControllerProtocol
Identifies a child controller number underneath a parent bus controller. Sub-type 5.VendorProtocol (Hardware)
Carries an arbitrary vendor GUID and a variable-length byte payload. Sub-type 4. Used when no standard hardware node type applies.Media Device Path Protocols
Media device path protocols are provided by theUnified.Firmware.DevicePathProtocols.Media package. They describe logical partitions and files that live above the physical hardware layer.
HardDriveProtocol
Represents a single GPT or MBR partition. This is the most common first step in any disk-based boot entry’s device path. Sub-type 1.Guid-based constructor calls into the platform backend to locate the partition and fill in all fields automatically, so you only need the GPT partition GUID (which you can read from FirmwareInterface.SystemPartition or any disk enumeration API).
FilePathProtocol
Holds a null-terminated Unicode path string relative to the root of the partition identified by the preceding node. Sub-type 4.Use backslash (
\) as the path separator, matching the convention in the UEFI specification. Forward slashes are not standard in EFI_DEVICE_PATH file path nodes.CdRomProtocol
Describes a partition on an ISO 9660 / El Torito CD-ROM. Sub-type 2.VendorDefinedProtocol (Media)
Carries a vendor GUID and arbitrary byte payload for media nodes that do not fit a standard type. Sub-type 3.DefineDevicePathProtocolAttribute
Every concrete protocol class is decorated with[DefineDevicePathProtocol(type, subType)]. This attribute registers the class with the library’s internal protocol deserializer. When FirmwareBootService reads a raw Boot#### variable, it walks each device path node and looks up the registered type for the (Type, SubType) pair. If a match is found, the typed class is instantiated and Deserialize is called. If no match is found, the node is wrapped in a raw fallback type, so unrecognised nodes do not break deserialization of the rest of the path.
Building a Typical Boot Entry Device Path
The most common pattern is a two-node path:HardDriveProtocol to select the ESP partition, followed by FilePathProtocol to select the EFI application within that partition.