|
1 | 1 | // SPDX-License-Identifier: MIT OR Apache-2.0
|
2 | 2 |
|
3 |
| -//! High-level wrappers for the UEFI device path [`Protocol`], i.e., |
4 |
| -//! [UEFI device paths]. |
| 3 | +//! The UEFI device path [`Protocol`], i.e., UEFI device paths. |
| 4 | +//! |
| 5 | +//! This module provides high-level wrappers to work with UEFI device paths. |
| 6 | +//! Please find additional low-level information in the |
| 7 | +//! [device path section of `uefi-raw`]. |
| 8 | +//! |
| 9 | +//! # Terminology: Device Paths, Device Path Instances, and Device Path Nodes |
| 10 | +//! An open UEFI device path [`Protocol`], also called _device path_, is a |
| 11 | +//! flexible and structured sequence of binary nodes that describe a route from |
| 12 | +//! the UEFI root to a particular device, controller, or file. |
| 13 | +//! |
| 14 | +//! An entire device path can be made up of multiple device path instances, |
| 15 | +//! and each instance is made up of multiple device path nodes. A device path |
| 16 | +//! _may_ contain multiple device-path instances, but typical paths contain only |
| 17 | +//! a single instance. |
| 18 | +//! |
| 19 | +//! Each node represents a step in the path: PCI device, partition, filesystem, |
| 20 | +//! file path, etc. Each node represents a step in the path: PCI device, |
| 21 | +//! partition, filesystem, file path, etc. |
| 22 | +//! |
| 23 | +//! Example of what a device path containing two instances (each comprised of |
| 24 | +//! three nodes) might look like: |
| 25 | +//! |
| 26 | +//! ```text |
| 27 | +//! ┌──────┬──────┬──────────────╥───────┬──────────┬────────────┐ |
| 28 | +//! │ ACPI │ PCI │ END_INSTANCE ║ CDROM │ FILEPATH │ END_ENTIRE │ |
| 29 | +//! └──────┴──────┴──────────────╨───────┴──────────┴────────────┘ |
| 30 | +//! ↑ ↑ ↑ ↑ ↑ ↑ ↑ |
| 31 | +//! ├─Node─╨─Node─╨─────Node─────╨─Node──╨───Node───╨────Node────┤ |
| 32 | +//! ↑ ↑ ↑ |
| 33 | +//! ├─── DevicePathInstance ─────╨────── DevicePathInstance ─────┤ |
| 34 | +//! │ │ |
| 35 | +//! └──────────────────── Entire DevicePath ─────────────────────┘ |
| 36 | +//! ``` |
5 | 37 | //!
|
6 | 38 | //! # Types
|
7 | 39 | //!
|
|
53 | 85 | //! [`Protocol`]: crate::proto::Protocol
|
54 | 86 | //! [`device_type`]: DevicePathNode::device_type
|
55 | 87 | //! [`sub_type`]: DevicePathNode::sub_type
|
56 |
| -//! [UEFI device paths]: uefi_raw::protocol::device_path |
| 88 | +//! [device path section of `uefi-raw`]: uefi_raw::protocol::device_path |
57 | 89 |
|
58 | 90 | pub mod build;
|
59 | 91 | pub mod text;
|
|
0 commit comments