What is Device Path?
Quick note explaining Device Path for BIOS/UEFI and embedded firmware readers.
A UEFI Device Path describes the route to a device, controller, partition, or boot file. It is not a string path like C:\Windows; it is a binary sequence of Device Path Nodes. Each node has a Type, SubType, Length, and node-specific data.
In simple terms, a filesystem path tells you where a file lives inside a volume. A Device Path tells firmware how to reach that volume and then the file.
Node structure
Every Device Path node starts with the same header:
typedef struct {
UINT8 Type;
UINT8 SubType;
UINT8 Length[2];
} EFI_DEVICE_PATH_PROTOCOL;
| Field | Meaning | What to check while debugging |
|---|---|---|
Type | Major node group: hardware, ACPI, messaging, media… | Which layer of the path is this node describing? |
SubType | Specific node kind | PCI, USB, SATA, HD, FilePath, and so on |
Length | Total node length including the header | A bad length can make the parser walk into garbage |
| Data | Node-specific payload | Device/function, partition GUID, file path, etc. |
Quick checklist
Real Boot#### example
A Windows boot option may contain a path like this:
PciRoot(0x0)
/Pci(0x17,0x0)
/Sata(0x0,0xFFFF,0x0)
/HD(1,GPT,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,0x800,0x100000)
/\EFI\Microsoft\Boot\bootmgfw.efi
| Node | Meaning | Values worth checking |
|---|---|---|
PciRoot(0x0) | PCI root bridge 0 | Usually the main root complex |
Pci(0x17,0x0) | PCI device/function | 0x17 is the device number, 0x0 is the function |
Sata(...) | SATA controller/port path | Port or controller changes can invalidate the path |
HD(...) | Partition that contains the loader | Partition number, GPT GUID/signature, start LBA, size |
\EFI\...\bootmgfw.efi | FilePath node | The .efi file firmware must open |
The key point: a Device Path does not merely say “open bootmgfw.efi”. It also describes the controller and partition that must be reached first.
Common failure pattern
After cloning a disk, recreating the EFI System Partition, updating BIOS, or clearing CMOS, a Boot#### variable may still exist while its embedded Device Path is stale. Boot Manager can read the variable, but it cannot open the referenced partition or file. The visible symptom may be “missing boot option”, “boots the wrong Windows Boot Manager”, or “No bootable device”.
Takeaway
A Device Path is firmware’s binary map. DevicePathToText() only renders that map for humans; firmware still walks the structured nodes.
Related notes
- What is Device Path Node?
- What is FilePath Device Path Node?
- What is HD Device Path Node?
- What is PCI Device Path Node?
- What is BootOrder?
Public references
- UEFI Specification 2.11 - Device Path Protocol
- UEFI Specification 2.11
- UEFI PI Specification 1.9
- EDK II source code
Found this useful?
Save it or share it with someone learning firmware, BIOS/UEFI, and embedded systems.
Nội dung liên quan
Một số bài viết, ghi chú hoặc project có liên quan đến nội dung bạn vừa đọc.
What is Boot####, BootOrder, and BootNext?
Quick note explaining Boot####, BootOrder, and BootNext for BIOS/UEFI and embedded firmware readers.
What is BDS?
Quick note explaining BDS for BIOS/UEFI and embedded firmware readers.
Boot Failure Playbook
A firmware engineer playbook for debugging missing boot options, invalid BootOrder, broken Device Paths, and BDS boot failures.
Biến note thành bài viết hoàn chỉnh
Notes là nơi ghi nhanh khái niệm.