Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 32d121a

Browse filesBrowse files
committed
uefi/raw: streamline documentation of Protocol
We don't deduplicate everything and keep a few important things in uefi as well. See #1641 (comment) for a discussion.
1 parent 6fb6005 commit 32d121a
Copy full SHA for 32d121a

File tree

Expand file treeCollapse file tree

2 files changed

+46
-8
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+46
-8
lines changed

‎uefi-raw/src/protocol/mod.rs

Copy file name to clipboardExpand all lines: uefi-raw/src/protocol/mod.rs
+20-3Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,26 @@
22

33
//! Protocol definitions.
44
//!
5-
//! Protocols are sets of related functionality identified by a unique
6-
//! ID. They can be implemented by a UEFI driver or occasionally by a
7-
//! UEFI application.
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
825
926
pub mod ata;
1027
pub mod block;

‎uefi/src/proto/mod.rs

Copy file name to clipboardExpand all lines: uefi/src/proto/mod.rs
+26-5Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,35 @@
11
// SPDX-License-Identifier: MIT OR Apache-2.0
22

3-
//! Protocol definitions.
3+
//! High-level wrappers for [UEFI protocols].
44
//!
5-
//! Protocols are sets of related functionality identified by a unique
6-
//! ID. They can be implemented by a UEFI driver or occasionally by a
7-
//! UEFI application.
5+
//! # TL;DR
6+
//! Technically, a protocol is a `C` struct holding functions and/or data, with
7+
//! an associated [`GUID`].
88
//!
9-
//! See the [`boot`] documentation for details of how to open a protocol.
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`][[UEFI protocols]].
1030
//!
1131
//! [`boot`]: crate::boot#accessing-protocols
32+
//! [UEFI protocols]: uefi_raw::protocol
1233
1334
#[cfg(feature = "alloc")]
1435
pub mod ata;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.