Skip to content

Commit 1829dca

Browse files
committed
doc: update READMEs and CHANGELOGs
1 parent f545c6a commit 1829dca

File tree

7 files changed

+36
-49
lines changed

7 files changed

+36
-49
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ This repository provides various crates:
2323

2424
- `uefi-raw`: Raw Rust UEFI bindings for basic structures and functions.
2525
- `uefi`: High-level wrapper around various low-level UEFI APIs. \
26-
Most probably, you want to use this crate.
27-
- `uefi-services`: Optional Rust convenience with a global allocator and a
28-
`log`-based logger implementation.
26+
Offers various optional features for typical Rust convenience, such as a
27+
Logger and an Allocator.
2928

3029
You can use the abstractions for example to:
3130

@@ -44,6 +43,8 @@ our Rust library.
4443

4544
## User Documentation
4645

46+
<!-- KEEP IN SYNC WITH uefi/README -->
47+
4748
For a quick start, please check out [the UEFI application template](template).
4849

4950
The [uefi-rs book] contains a tutorial, how-tos, and overviews of some important

uefi-services/README.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
11
# uefi-services
22

3-
[![Crates.io](https://img.shields.io/crates/v/uefi-services)](https://crates.io/crates/uefi-services)
4-
[![Docs.rs](https://docs.rs/uefi-macros/badge.svg)](https://docs.rs/uefi-services)
5-
6-
This crate enables you some convenience features on top of the
7-
[`uefi`](https://crates.io/crates/uefi) crate. It includes a panic handler, a logger, and
8-
a global allocator.
9-
10-
`uefi-services` is part of the `uefi-rs` project. Please refer to
11-
<https://github.com/rust-osdev/uefi-rs/> for comprehensive documentation.
12-
13-
## Optional features
14-
15-
This crate's features are described in [`src/lib.rs`].
16-
17-
[`src/lib.rs`]: src/lib.rs
3+
WARNING: `uefi-services` is deprecated. Functionality was moved to `uefi::helpers::init`.

uefi/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
- Added `Timestamp` protocol.
55
- Added `UnalignedSlice::as_ptr`.
66
- Added common derives for `Event` and `Handle`.
7+
- `uefi::helpers::init` with the functionality that used to be in
8+
`uefi::services`. With that, new features were added:
9+
- `global_allocator`
10+
- `panic_handler`
11+
- `qemu`
712

813
# uefi - 0.27.0 (2024-03-17)
914

uefi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ panic_handler = []
2727
# were observed on the VirtualBox UEFI implementation (see uefi-rs#121).
2828
# In those cases, this feature can be excluded by removing the default features.
2929
panic-on-logger-errors = []
30-
qemu = ["dep:qemu-exit"]
30+
qemu = ["dep:qemu-exit", "panic_handler"] # panic_handler: logical, not technical dependency
3131

3232
[dependencies]
3333
bitflags.workspace = true

uefi/README.md

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,37 @@
22

33
[![Crates.io](https://img.shields.io/crates/v/uefi)](https://crates.io/crates/uefi)
44
[![Docs.rs](https://docs.rs/uefi/badge.svg)](https://docs.rs/uefi)
5-
![Stars](https://img.shields.io/github/stars/rust-osdev/uefi-rs)
65
![License](https://img.shields.io/github/license/rust-osdev/uefi-rs)
76
![Build status](https://github.com/rust-osdev/uefi-rs/workflows/Rust/badge.svg)
7+
![Stars](https://img.shields.io/github/stars/rust-osdev/uefi-rs)
88

9-
[UEFI] is the successor to the BIOS. It provides an early boot environment for
10-
OS loaders, hypervisors and other low-level applications.
11-
12-
The `uefi` crate makes it easy to:
13-
- Write UEFI applications in Rust (for `i686`, `x86_64`, or `aarch64`)
14-
- Call UEFI functions from an OS (usually built with a [custom target][rustc-custom])
15-
16-
The objective is to provide **safe** and **performant** wrappers for UEFI interfaces,
17-
and allow developers to write idiomatic Rust code.
189

19-
Check out the [UEFI application template] for a quick start.
10+
For an introduction to the `uefi-rs` project and documentation, please refer to
11+
our main [README].
2012

21-
[UEFI]: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface
22-
[rustc-custom]: https://doc.rust-lang.org/rustc/targets/custom.html
23-
[UEFI application template]: https://github.com/rust-osdev/uefi-rs/tree/HEAD/template
13+
[README]: https://github.com/rust-osdev/uefi-rs/blob/main/README.md
2414

2515
## Optional features
2616

2717
This crate's features are described in [`src/lib.rs`].
2818

29-
See also the [`uefi-services`] crate, which provides a panic handler and
30-
initializes the `global_allocator` and `logger` features.
31-
3219
[`src/lib.rs`]: src/lib.rs
33-
[`uefi-services`]: https://crates.io/crates/uefi-services
3420

35-
## Documentation
21+
## User Documentation
22+
23+
<!-- KEEP IN SYNC WITH MAIN README -->
3624

37-
The [uefi-rs book] contains a tutorial, how-tos, and overviews of some
38-
important UEFI concepts.
25+
For a quick start, please check out [the UEFI application template](template).
26+
27+
The [uefi-rs book] contains a tutorial, how-tos, and overviews of some important
28+
UEFI concepts. Reference documentation for the various crates can be found on
29+
[docs.rs]:
3930

40-
Reference documentation can be found on docs.rs:
4131
- [docs.rs/uefi](https://docs.rs/uefi)
4232
- [docs.rs/uefi-macros](https://docs.rs/uefi-macros)
33+
- [docs.rs/uefi-raw](https://docs.rs/uefi-raw)
4334
- [docs.rs/uefi-services](https://docs.rs/uefi-services)
4435

45-
For additional information, refer to the [UEFI specification][spec].
46-
4736
[spec]: http://www.uefi.org/specifications
4837
[uefi-rs book]: https://rust-osdev.github.io/uefi-rs/HEAD
4938

uefi/src/lib.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
//!
77
//! Feel free to file bug reports and questions in our [issue tracker], and [PR
88
//! contributions][contributing] are also welcome!
9+
//!
10+
//! # Interaction with uefi services
11+
//!
12+
//! With this crate you can write code for the pre- and post-exit boot services
13+
//! epochs. However, the `uefi` crate unfolds its true potential when
14+
//! interacting with UEFI boot services.
915
//!
1016
//! # Crate organisation
1117
//!
@@ -51,24 +57,25 @@
5157
//! - `logger`: Logging implementation for the standard [`log`] crate
5258
//! that prints output to the UEFI console. No buffering is done; this
5359
//! is not a high-performance logger.
60+
//! - `panic_handler`: Add a default panic handler that logs to `stdout`.
5461
//! - `panic-on-logger-errors` (enabled by default): Panic if a text
5562
//! output error occurs in the logger.
5663
//! - `unstable`: Enable functionality that depends on [unstable
5764
//! features] in the nightly compiler.
5865
//! As example, in conjunction with the `alloc`-feature, this gate allows
5966
//! the `allocator_api` on certain functions.
67+
//! - `qemu`: Use the special `qemu-exit` device when a panic occurs to signal
68+
//! an error. Also needs the `panic_handler` feature to make any sense.
6069
//!
61-
//! The `global_allocator` and `logger` features require special
62-
//! handling to perform initialization and tear-down. The
63-
//! [`uefi-services`] crate provides an `init` method that takes care of
64-
//! this.
70+
//! Some of these features, such as the `logger` or `panic_Handler` features,
71+
//! unfold their true potential when you invoke `uefi::helpers::init` as soon
72+
//! as possible in your application.
6573
//!
6674
//! [Rust UEFI Book]: https://rust-osdev.github.io/uefi-rs/HEAD/
6775
//! [UEFI]: https://uefi.org/
6876
//! [`BootServices`]: table::boot::BootServices
6977
//! [`GlobalAlloc`]: alloc::alloc::GlobalAlloc
7078
//! [`SystemTable`]: table::SystemTable
71-
//! [`uefi-services`]: https://crates.io/crates/uefi-services
7279
//! [`unsafe_protocol`]: proto::unsafe_protocol
7380
//! [contributing]: https://github.com/rust-osdev/uefi-rs/blob/main/CONTRIBUTING.md
7481
//! [issue tracker]: https://github.com/rust-osdev/uefi-rs/issues

uefi/src/table/system.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ impl SystemTable<Boot> {
225225
///
226226
/// [`allocator::exit_boot_services`]: crate::allocator::exit_boot_services
227227
/// [`Logger::disable`]: crate::logger::Logger::disable
228-
/// [`uefi_services::init`]: https://docs.rs/uefi-services/latest/uefi_services/fn.init.html
229228
#[must_use]
230229
pub fn exit_boot_services(
231230
self,

0 commit comments

Comments
 (0)