Skip to content

Commit 8b74dc7

Browse files
committed
doc: uefi: partially duplicate protocol 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 5f2fa32 commit 8b74dc7

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

uefi/src/proto/mod.rs

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

3-
//! High-level wrappers for [UEFI protocols].
3+
//! High-level wrappers for UEFI protocols.
44
//!
5-
//! See the [`boot`] documentation for details of how to open a protocol.
5+
//! # TL;DR
6+
//! Technically, a protocol is a `C` struct holding functions and/or data, with
7+
//! an associated [`GUID`].
8+
//!
9+
//! # About
10+
//! UEFI protocols are a structured collection of functions and/or data,
11+
//! identified by a [`GUID`], which defines an interface between components in
12+
//! the UEFI environment, such as between drivers, applications, or firmware
13+
//! services.
14+
//!
15+
//! Protocols are central to UEFI’s handle-based object model, and they provide
16+
//! a clean, extensible way for components to discover and use services from one
17+
//! another.
18+
//!
19+
//! Implementation-wise, a protocol is a `C` struct holding function pointers
20+
//! and/or data. Please note that some protocols may use [`core::ptr::null`] as
21+
//! interface. For example, the device path protocol can be implemented but
22+
//! return `null`.
23+
//!
24+
//! [`GUID`]: crate::Guid
25+
//!
26+
//! # More Info
27+
//! - See the [`boot`] documentation for details of how to open a protocol.
28+
//! - Please find additional low-level information in the
29+
//! [protocol section of `uefi-raw`].
630
//!
731
//! [`boot`]: crate::boot#accessing-protocols
8-
//! [UEFI protocols]: uefi_raw::protocol
32+
//! [protocol section of `uefi-raw`]: uefi_raw::protocol
933
1034
#[cfg(feature = "alloc")]
1135
pub mod ata;

0 commit comments

Comments
 (0)