Thanks to visit codestin.com
Credit goes to github.com

Skip to content

AMDEPYC/devpath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devpath

CI Crates.io License: MIT Rust

A no_std Rust library for parsing and manipulating UEFI device paths as defined in the UEFI 2.11 specification.

Usage

cargo add devpath

Basic Example

use devpath::{Paths, FromBytes};

// Parse device paths from raw bytes
let raw_bytes = &[
    0x02, 0x01, 0x0c, 0x00,  // ACPI device path
    0xd0, 0x41, 0x03, 0x0a,  // HID: PNP0A03 (PCI Root Bridge)
    0x00, 0x00, 0x00, 0x00,  // UID: 0
    0x01, 0x01, 0x06, 0x00,  // PCI device path  
    0x00, 0x1f,              // Function: 0, Device: 31
    0x7f, 0xff, 0x04, 0x00,  // End of device path
];

let paths = Paths::from_bytes(raw_bytes)?;
println!("Parsed {} device path(s)", paths.len());

Features

  • Complete UEFI 2.11 Support - All device path types: Hardware, ACPI, Messaging, Media, and BIOS
  • Type-Safe Parsing - Structured representation of device path nodes
  • no_std Compatible - Works in embedded and firmware environments
  • Zero Unsafe Code - Memory-safe parsing with comprehensive error handling

Device Path Types

  • Hardware - PCI, memory-mapped devices, controllers
  • ACPI - ACPI namespace devices, _ADR devices
  • Messaging - USB, SATA, NVMe, network protocols, Bluetooth
  • Media - Hard drives, file paths, CD-ROM, RAM disks
  • BIOS - Legacy BIOS boot specification devices

Documentation

Full API documentation is available on docs.rs.

License

This project is licensed under the MIT License.

About

UEFI Device Path parsing library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages