|
1 |
| -//! Rusty wrapper for the Unified Extensible Firmware Interface. |
| 1 | +//! Rusty wrapper for the [Unified Extensible Firmware Interface][UEFI]. |
| 2 | +//! |
| 3 | +//! See the [Rust UEFI Book] for a tutorial, how-tos, and overviews of some |
| 4 | +//! important UEFI concepts. For more details of UEFI, see the latest [UEFI |
| 5 | +//! Specification][spec]. |
| 6 | +//! |
| 7 | +//! Feel free to file bug reports and questions in our [issue tracker], and [PR |
| 8 | +//! contributions][contributing] are also welcome! |
2 | 9 | //!
|
3 | 10 | //! # Crate organisation
|
4 | 11 | //!
|
5 |
| -//! The top-level module contains some of the most used types, |
6 |
| -//! such as the result and error types, or other common data structures |
7 |
| -//! such as GUIDs and handles. |
| 12 | +//! The top-level module contains some of the most used types and macros, |
| 13 | +//! including the [`Handle`] and [`Result`] types, the [`CStr16`] and |
| 14 | +//! [`CString16`] types for working with UCS-2 strings, and the [`entry`] and |
| 15 | +//! [`guid`] macros. |
| 16 | +//! |
| 17 | +//! ## Tables |
| 18 | +//! |
| 19 | +//! The [`SystemTable`] provides access to almost everything in UEFI. It comes |
| 20 | +//! in two flavors: |
| 21 | +//! - `SystemTable<Boot>`: for boot-time applications such as bootloaders, |
| 22 | +//! provides access to both boot and runtime services. |
| 23 | +//! - `SystemTable<Runtime>`: for operating systems after boot services have |
| 24 | +//! been exited. |
8 | 25 | //!
|
9 |
| -//! ## Tables and protocols |
| 26 | +//! ## Protocols |
10 | 27 | //!
|
11 |
| -//! The `table` module contains definitions of the UEFI tables, |
12 |
| -//! which are structures containing some basic functions and references to other tables. |
13 |
| -//! Most importantly, the boot services table also provides a way to obtain **protocol** handles. |
| 28 | +//! When boot services are active, most functionality is provided via UEFI |
| 29 | +//! protocols. Protocols provide operations such as reading and writing files, |
| 30 | +//! drawing to the screen, sending and receiving network requests, and much |
| 31 | +//! more. The list of protocols that are actually available when running an |
| 32 | +//! application depends on the device. For example, a PC with no network card |
| 33 | +//! may not provide network protocols. |
14 | 34 | //!
|
15 |
| -//! The `proto` module contains the standard UEFI protocols, which are normally provided |
16 |
| -//! by the various UEFI drivers and firmware layers. |
| 35 | +//! See the [`BootServices`] documentation for details of how to open a |
| 36 | +//! protocol, and see the [`proto`] module for protocol implementations. New |
| 37 | +//! protocols can be defined with the [`unsafe_protocol`] macro. |
17 | 38 | //!
|
18 | 39 | //! ## Optional crate features
|
19 | 40 | //!
|
|
46 | 67 | //! [`uefi-services`] crate provides an `init` method that takes care of
|
47 | 68 | //! this.
|
48 | 69 | //!
|
49 |
| -//! ## Adapting to local conditions |
50 |
| -//! |
51 |
| -//! Unlike system tables, which are present on *all* UEFI implementations, |
52 |
| -//! protocols *may* or *may not* be present on a certain system. |
53 |
| -//! |
54 |
| -//! For example, a PC with no network card might not contain a network driver, |
55 |
| -//! therefore all the network protocols will be unavailable. |
56 |
| -//! |
| 70 | +//! [Rust UEFI Book]: https://rust-osdev.github.io/uefi-rs/HEAD/ |
| 71 | +//! [UEFI]: https://uefi.org/ |
| 72 | +//! [`BootServices`]: table::boot::BootServices |
57 | 73 | //! [`GlobalAlloc`]: alloc::alloc::GlobalAlloc
|
| 74 | +//! [`SystemTable`]: table::SystemTable |
58 | 75 | //! [`uefi-services`]: https://crates.io/crates/uefi-services
|
| 76 | +//! [`unsafe_protocol`]: proto::unsafe_protocol |
| 77 | +//! [contributing]: https://github.com/rust-osdev/uefi-rs/blob/main/CONTRIBUTING.md |
| 78 | +//! [issue tracker]: https://github.com/rust-osdev/uefi-rs/issues |
| 79 | +//! [spec]: https://uefi.org/specifications |
59 | 80 | //! [unstable features]: https://doc.rust-lang.org/unstable-book/
|
60 | 81 |
|
61 | 82 | #![feature(abi_efiapi)]
|
|
0 commit comments