Skip to content

Commit 487130d

Browse files
committed
doc: stream documentation for device-paths between uefi-raw and uefi
1 parent 80a4da2 commit 487130d

File tree

2 files changed

+38
-23
lines changed

2 files changed

+38
-23
lines changed

uefi-raw/src/protocol/device_path.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
// SPDX-License-Identifier: MIT OR Apache-2.0
22

3+
//! UEFI device paths and the UEFI device path protocol.
4+
//!
5+
//! This module provides (generated) ABI-compatible bindings to all known device
6+
//! path node types.
7+
//!
8+
//! # Device Paths, Device Path Nodes, and Device Path Instances
9+
//! A UEFI device path is an open instance of the UEFI device path [protocol],
10+
//! which can be implemented for any UEFI handle. It is a very flexible
11+
//! structure for encoding a programmatic path to a device, such as a hard drive
12+
//! attached to the PCI bus.
13+
//!
14+
//! A device path is made up of a packed list of variable-length nodes of
15+
//! various types. The entire device path is terminated with an
16+
//! [`END_ENTIRE`] node. A device path _may_ contain multiple device-path
17+
//! instances separated by [`END_INSTANCE`] nodes, but typical paths contain
18+
//! only a single instance (in which case no [`END_INSTANCE`] node is needed).
19+
//!
20+
//! Example of what a device path containing two instances (each comprised of
21+
//! three nodes) might look like:
22+
//!
23+
//! ```text
24+
//! ┌──────┬──────┬──────────────╥───────┬──────────┬────────────┐
25+
//! │ ACPI │ PCI │ END_INSTANCE ║ CDROM │ FILEPATH │ END_ENTIRE │
26+
//! └──────┴──────┴──────────────╨───────┴──────────┴────────────┘
27+
//! ↑ ↑ ↑ ↑ ↑ ↑ ↑
28+
//! ├─Node─╨─Node─╨─────Node─────╨─Node──╨───Node───╨────Node────┤
29+
//! ↑ ↑ ↑
30+
//! ├─── DevicePathInstance ─────╨────── DevicePathInstance ─────┤
31+
//! │ │
32+
//! └──────────────────── Entire DevicePath ─────────────────────┘
33+
//! ```
34+
//!
35+
//! [`END_ENTIRE`]: DeviceSubType::END_ENTIRE
36+
//! [`END_INSTANCE`]: DeviceSubType::END_INSTANCE
37+
//! [protocol]: crate::protocol
38+
339
mod device_path_gen;
440

541
use crate::{guid, Boolean, Char16, Guid};

uefi/src/proto/device_path/mod.rs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,7 @@
11
// SPDX-License-Identifier: MIT OR Apache-2.0
22

3-
//! Device Path protocol
4-
//!
5-
//! A UEFI device path is a very flexible structure for encoding a
6-
//! programmatic path such as a hard drive or console.
7-
//!
8-
//! A device path is made up of a packed list of variable-length nodes of
9-
//! various types. The entire device path is terminated with an
10-
//! [`END_ENTIRE`] node. A device path _may_ contain multiple device-path
11-
//! instances separated by [`END_INSTANCE`] nodes, but typical paths contain
12-
//! only a single instance (in which case no `END_INSTANCE` node is needed).
13-
//!
14-
//! Example of what a device path containing two instances (each comprised of
15-
//! three nodes) might look like:
16-
//!
17-
//! ```text
18-
//! ┌──────┬─────┬──────────────╥───────┬──────────┬────────────┐
19-
//! │ ACPI │ PCI │ END_INSTANCE ║ CDROM │ FILEPATH │ END_ENTIRE │
20-
//! └──────┴─────┴──────────────╨───────┴──────────┴────────────┘
21-
//! ↑ ↑ ↑
22-
//! ├─── DevicePathInstance ────╨────── DevicePathInstance ─────┤
23-
//! │ │
24-
//! └─────────────────── Entire DevicePath ─────────────────────┘
25-
//! ```
3+
//! High-level wrappers for UEFI [device path](uefi_raw::protocol::device_path)s
4+
//! and the UEFI device path [`Protocol`].
265
//!
276
//! # Types
287
//!

0 commit comments

Comments
 (0)