Skip to content

Commit 21db13e

Browse files
Merge pull request #1857 from rust-osdev/doc
uefi: improve doc (add short glossary/important terms overview)
2 parents ec53ab0 + 1a0c43d commit 21db13e

File tree

1 file changed

+34
-7
lines changed

1 file changed

+34
-7
lines changed

uefi/src/lib.rs

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

3+
//! # `uefi-rs`
4+
//!
35
//! Rusty wrapper for the [Unified Extensible Firmware Interface][UEFI].
46
//!
57
//! This crate makes it easy to develop Rust software that leverages **safe**,
@@ -126,9 +128,13 @@
126128
//!
127129
//! - `alloc`: Enable functionality requiring the [`alloc`] crate from
128130
//! the Rust standard library. For example, methods that return a
129-
//! `Vec` rather than filling a statically-sized array. This requires
130-
//! a global allocator; you can use the `global_allocator` feature or
131-
//! provide your own. This is independent of internal direct usages of the
131+
//! `Vec` rather than filling a statically-sized array.
132+
//! We **highly recommend** activating this feature as more and more
133+
//! functionality in `uefi-rs` depends and will depend on `alloc` for
134+
//! convenience and good developer experience.
135+
//! The `alloc` feature requires a global allocator: you can use the
136+
//! `global_allocator` feature or provide your own. The global allocator and
137+
//! the `alloc` feature are independent of internal direct usages of the
132138
//! UEFI boot service allocator which may happen anyway, where necessary.
133139
//! - `global_allocator`: Set [`allocator::Allocator`] as the global Rust
134140
//! allocator. This is a simple allocator that relies on the UEFI pool
@@ -204,10 +210,31 @@
204210
//! Licensed under either of [Apache License, Version 2.0][apache] or
205211
//! [MIT license][mit] at your option.
206212
//!
207-
//! # Terminology
208-
//!
209-
//! Both "EFI" and "UEFI" can be used interchangeably, such as "UEFI image" or
210-
//! "EFI image". We prefer "UEFI" in our crate and its documentation.
213+
//! # UEFI and `uefi-rs` Terminology
214+
//!
215+
//! Please look into the [specification][spec] for a comprehensive overview. In
216+
//! UEFI, both "EFI" and "UEFI" are often used interchangeably, such as
217+
//! "UEFI image" or "EFI image". We prefer "UEFI" in our crate and its
218+
//! documentation.
219+
//!
220+
//! ## Important UEFI Terms and Abstractions
221+
//!
222+
//! - **agent**: The entity (usually a driver or application) performing
223+
//! operations on a handle or protocol.
224+
//! - **controller**: A handle that represents a hardware device managed by
225+
//! drivers.
226+
//! - **device path**: A structured description of a device's location or
227+
//! access method, used for booting and device identification.
228+
//! - **driver binding**: A service that matches drivers to controllers and
229+
//! manages their lifecycle.
230+
//! - **image**: A loaded executable (e.g., UEFI application or driver) with its
231+
//! own execution context - an `.efi` file (PE/COFF executable).
232+
//! - **handle**: An opaque identifier representing a UEFI object to which
233+
//! protocols can be attached.
234+
//! - **protocol**: A standardized set of functions and data structures defining
235+
//! an interface for services.
236+
//! - **(protocol) interface**: A concrete implementation of a protocol attached
237+
//! to a handle.
211238
//!
212239
//! [Rust UEFI Book]: https://rust-osdev.github.io/uefi-rs/HEAD/
213240
//! [UEFI]: https://uefi.org/

0 commit comments

Comments
 (0)