Skip to content

Commit ef6a895

Browse files
committed
doc: uefi: partially duplicate device path documentation
The idea is that people should not always read the uefi-raw doc in any case. Therefore, a briefly simplified version of the uefi-raw doc is now also in uefi. See #1641 (comment) for a discussion.
1 parent fb4e62f commit ef6a895

File tree

1 file changed

+35
-3
lines changed
  • uefi/src/proto/device_path

1 file changed

+35
-3
lines changed

uefi/src/proto/device_path/mod.rs

+35-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,39 @@
11
// SPDX-License-Identifier: MIT OR Apache-2.0
22

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+
//! ```
537
//!
638
//! # Types
739
//!
@@ -53,7 +85,7 @@
5385
//! [`Protocol`]: crate::proto::Protocol
5486
//! [`device_type`]: DevicePathNode::device_type
5587
//! [`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
5789
5890
pub mod build;
5991
pub mod text;

0 commit comments

Comments
 (0)